Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
ehea_qmr.h File Reference
#include <linux/prefetch.h>
#include "ehea.h"
#include "ehea_hw.h"

Go to the source code of this file.

Data Structures

struct  ehea_vsgentry
 
struct  ehea_swqe
 
struct  ehea_rwqe
 
struct  ehea_cqe
 
struct  ehea_eqe
 

Macros

#define EHEA_PAGESHIFT   12
 
#define EHEA_PAGESIZE   (1UL << EHEA_PAGESHIFT)
 
#define EHEA_SECTSIZE   (1UL << 24)
 
#define EHEA_PAGES_PER_SECTION   (EHEA_SECTSIZE >> EHEA_PAGESHIFT)
 
#define EHEA_HUGEPAGESHIFT   34
 
#define EHEA_HUGEPAGE_SIZE   (1UL << EHEA_HUGEPAGESHIFT)
 
#define EHEA_HUGEPAGE_PFN_MASK   ((EHEA_HUGEPAGE_SIZE - 1) >> PAGE_SHIFT)
 
#define EHEA_WR_ID_COUNT   EHEA_BMASK_IBM(0, 19)
 
#define EHEA_WR_ID_TYPE   EHEA_BMASK_IBM(20, 23)
 
#define EHEA_SWQE2_TYPE   0x1
 
#define EHEA_SWQE3_TYPE   0x2
 
#define EHEA_RWQE2_TYPE   0x3
 
#define EHEA_RWQE3_TYPE   0x4
 
#define EHEA_WR_ID_INDEX   EHEA_BMASK_IBM(24, 47)
 
#define EHEA_WR_ID_REFILL   EHEA_BMASK_IBM(48, 63)
 
#define EHEA_MAX_WQE_SG_ENTRIES   252
 
#define SWQE2_MAX_IMM   (0xD0 - 0x30)
 
#define SWQE3_MAX_IMM   224
 
#define EHEA_SWQE_CRC   0x8000
 
#define EHEA_SWQE_IP_CHECKSUM   0x4000
 
#define EHEA_SWQE_TCP_CHECKSUM   0x2000
 
#define EHEA_SWQE_TSO   0x1000
 
#define EHEA_SWQE_SIGNALLED_COMPLETION   0x0800
 
#define EHEA_SWQE_VLAN_INSERT   0x0400
 
#define EHEA_SWQE_IMM_DATA_PRESENT   0x0200
 
#define EHEA_SWQE_DESCRIPTORS_PRESENT   0x0100
 
#define EHEA_SWQE_WRAP_CTL_REC   0x0080
 
#define EHEA_SWQE_WRAP_CTL_FORCE   0x0040
 
#define EHEA_SWQE_BIND   0x0020
 
#define EHEA_SWQE_PURGE   0x0010
 
#define SWQE_HEADER_SIZE   32
 
#define EHEA_CQE_VLAN_TAG_XTRACT   0x0400
 
#define EHEA_CQE_TYPE_RQ   0x60
 
#define EHEA_CQE_STAT_ERR_MASK   0x700F
 
#define EHEA_CQE_STAT_FAT_ERR_MASK   0xF
 
#define EHEA_CQE_BLIND_CKSUM   0x8000
 
#define EHEA_CQE_STAT_ERR_TCP   0x4000
 
#define EHEA_CQE_STAT_ERR_IP   0x2000
 
#define EHEA_CQE_STAT_ERR_CRC   0x1000
 
#define EHEA_CQE_STAT_RESET_MASK   0x0002
 
#define EHEA_EQE_VALID   EHEA_BMASK_IBM(0, 0)
 
#define EHEA_EQE_IS_CQE   EHEA_BMASK_IBM(1, 1)
 
#define EHEA_EQE_IDENTIFIER   EHEA_BMASK_IBM(2, 7)
 
#define EHEA_EQE_QP_CQ_NUMBER   EHEA_BMASK_IBM(8, 31)
 
#define EHEA_EQE_QP_TOKEN   EHEA_BMASK_IBM(32, 63)
 
#define EHEA_EQE_CQ_TOKEN   EHEA_BMASK_IBM(32, 63)
 
#define EHEA_EQE_KEY   EHEA_BMASK_IBM(32, 63)
 
#define EHEA_EQE_PORT_NUMBER   EHEA_BMASK_IBM(56, 63)
 
#define EHEA_EQE_EQ_NUMBER   EHEA_BMASK_IBM(48, 63)
 
#define EHEA_EQE_SM_ID   EHEA_BMASK_IBM(48, 63)
 
#define EHEA_EQE_SM_MECH_NUMBER   EHEA_BMASK_IBM(48, 55)
 
#define EHEA_EQE_SM_PORT_NUMBER   EHEA_BMASK_IBM(56, 63)
 
#define EHEA_AER_RESTYPE_QP   0x8
 
#define EHEA_AER_RESTYPE_CQ   0x4
 
#define EHEA_AER_RESTYPE_EQ   0x3
 
#define EHEA_AER_RESET_MASK   0xFFFFFFFFFEFFFFFFULL
 
#define EHEA_AERR_RESET_MASK   0xFFFFFFFFFFFFFFFFULL
 
#define ERROR_DATA_LENGTH   EHEA_BMASK_IBM(52, 63)
 
#define ERROR_DATA_TYPE   EHEA_BMASK_IBM(0, 7)
 
#define EHEA_CQ_REGISTER_ORIG   0
 
#define EHEA_EQ_REGISTER_ORIG   0
 

Enumerations

enum  ehea_eq_type { EHEA_EQ = 0, EHEA_NEQ }
 

Functions

struct ehea_eqehea_create_eq (struct ehea_adapter *adapter, enum ehea_eq_type type, const u32 length, const u8 eqe_gen)
 
int ehea_destroy_eq (struct ehea_eq *eq)
 
struct ehea_eqeehea_poll_eq (struct ehea_eq *eq)
 
struct ehea_cqehea_create_cq (struct ehea_adapter *adapter, int cqe, u64 eq_handle, u32 cq_token)
 
int ehea_destroy_cq (struct ehea_cq *cq)
 
struct ehea_qpehea_create_qp (struct ehea_adapter *adapter, u32 pd, struct ehea_qp_init_attr *init_attr)
 
int ehea_destroy_qp (struct ehea_qp *qp)
 
int ehea_reg_kernel_mr (struct ehea_adapter *adapter, struct ehea_mr *mr)
 
int ehea_gen_smr (struct ehea_adapter *adapter, struct ehea_mr *old_mr, struct ehea_mr *shared_mr)
 
int ehea_rem_mr (struct ehea_mr *mr)
 
u64 ehea_error_data (struct ehea_adapter *adapter, u64 res_handle, u64 *aer, u64 *aerr)
 
int ehea_add_sect_bmap (unsigned long pfn, unsigned long nr_pages)
 
int ehea_rem_sect_bmap (unsigned long pfn, unsigned long nr_pages)
 
int ehea_create_busmap (void)
 
void ehea_destroy_busmap (void)
 
u64 ehea_map_vaddr (void *caddr)
 

Macro Definition Documentation

#define EHEA_AER_RESET_MASK   0xFFFFFFFFFEFFFFFFULL

Definition at line 200 of file ehea_qmr.h.

#define EHEA_AER_RESTYPE_CQ   0x4

Definition at line 196 of file ehea_qmr.h.

#define EHEA_AER_RESTYPE_EQ   0x3

Definition at line 197 of file ehea_qmr.h.

#define EHEA_AER_RESTYPE_QP   0x8

Definition at line 195 of file ehea_qmr.h.

#define EHEA_AERR_RESET_MASK   0xFFFFFFFFFFFFFFFFULL

Definition at line 201 of file ehea_qmr.h.

#define EHEA_CQ_REGISTER_ORIG   0

Definition at line 362 of file ehea_qmr.h.

#define EHEA_CQE_BLIND_CKSUM   0x8000

Definition at line 154 of file ehea_qmr.h.

#define EHEA_CQE_STAT_ERR_CRC   0x1000

Definition at line 157 of file ehea_qmr.h.

#define EHEA_CQE_STAT_ERR_IP   0x2000

Definition at line 156 of file ehea_qmr.h.

#define EHEA_CQE_STAT_ERR_MASK   0x700F

Definition at line 152 of file ehea_qmr.h.

#define EHEA_CQE_STAT_ERR_TCP   0x4000

Definition at line 155 of file ehea_qmr.h.

#define EHEA_CQE_STAT_FAT_ERR_MASK   0xF

Definition at line 153 of file ehea_qmr.h.

#define EHEA_CQE_STAT_RESET_MASK   0x0002

Definition at line 160 of file ehea_qmr.h.

#define EHEA_CQE_TYPE_RQ   0x60

Definition at line 151 of file ehea_qmr.h.

#define EHEA_CQE_VLAN_TAG_XTRACT   0x0400

Definition at line 149 of file ehea_qmr.h.

#define EHEA_EQ_REGISTER_ORIG   0

Definition at line 363 of file ehea_qmr.h.

#define EHEA_EQE_CQ_TOKEN   EHEA_BMASK_IBM(32, 63)

Definition at line 187 of file ehea_qmr.h.

#define EHEA_EQE_EQ_NUMBER   EHEA_BMASK_IBM(48, 63)

Definition at line 190 of file ehea_qmr.h.

#define EHEA_EQE_IDENTIFIER   EHEA_BMASK_IBM(2, 7)

Definition at line 184 of file ehea_qmr.h.

#define EHEA_EQE_IS_CQE   EHEA_BMASK_IBM(1, 1)

Definition at line 183 of file ehea_qmr.h.

#define EHEA_EQE_KEY   EHEA_BMASK_IBM(32, 63)

Definition at line 188 of file ehea_qmr.h.

#define EHEA_EQE_PORT_NUMBER   EHEA_BMASK_IBM(56, 63)

Definition at line 189 of file ehea_qmr.h.

#define EHEA_EQE_QP_CQ_NUMBER   EHEA_BMASK_IBM(8, 31)

Definition at line 185 of file ehea_qmr.h.

#define EHEA_EQE_QP_TOKEN   EHEA_BMASK_IBM(32, 63)

Definition at line 186 of file ehea_qmr.h.

#define EHEA_EQE_SM_ID   EHEA_BMASK_IBM(48, 63)

Definition at line 191 of file ehea_qmr.h.

#define EHEA_EQE_SM_MECH_NUMBER   EHEA_BMASK_IBM(48, 55)

Definition at line 192 of file ehea_qmr.h.

#define EHEA_EQE_SM_PORT_NUMBER   EHEA_BMASK_IBM(56, 63)

Definition at line 193 of file ehea_qmr.h.

#define EHEA_EQE_VALID   EHEA_BMASK_IBM(0, 0)

Definition at line 182 of file ehea_qmr.h.

#define EHEA_HUGEPAGE_PFN_MASK   ((EHEA_HUGEPAGE_SIZE - 1) >> PAGE_SHIFT)

Definition at line 46 of file ehea_qmr.h.

#define EHEA_HUGEPAGE_SIZE   (1UL << EHEA_HUGEPAGESHIFT)

Definition at line 45 of file ehea_qmr.h.

#define EHEA_HUGEPAGESHIFT   34

Definition at line 44 of file ehea_qmr.h.

#define EHEA_MAX_WQE_SG_ENTRIES   252

Definition at line 79 of file ehea_qmr.h.

#define EHEA_PAGES_PER_SECTION   (EHEA_SECTSIZE >> EHEA_PAGESHIFT)

Definition at line 43 of file ehea_qmr.h.

#define EHEA_PAGESHIFT   12

Definition at line 40 of file ehea_qmr.h.

#define EHEA_PAGESIZE   (1UL << EHEA_PAGESHIFT)

Definition at line 41 of file ehea_qmr.h.

#define EHEA_RWQE2_TYPE   0x3

Definition at line 67 of file ehea_qmr.h.

#define EHEA_RWQE3_TYPE   0x4

Definition at line 68 of file ehea_qmr.h.

#define EHEA_SECTSIZE   (1UL << 24)

Definition at line 42 of file ehea_qmr.h.

#define EHEA_SWQE2_TYPE   0x1

Definition at line 65 of file ehea_qmr.h.

#define EHEA_SWQE3_TYPE   0x2

Definition at line 66 of file ehea_qmr.h.

#define EHEA_SWQE_BIND   0x0020

Definition at line 94 of file ehea_qmr.h.

#define EHEA_SWQE_CRC   0x8000

Definition at line 84 of file ehea_qmr.h.

#define EHEA_SWQE_DESCRIPTORS_PRESENT   0x0100

Definition at line 91 of file ehea_qmr.h.

#define EHEA_SWQE_IMM_DATA_PRESENT   0x0200

Definition at line 90 of file ehea_qmr.h.

#define EHEA_SWQE_IP_CHECKSUM   0x4000

Definition at line 85 of file ehea_qmr.h.

#define EHEA_SWQE_PURGE   0x0010

Definition at line 95 of file ehea_qmr.h.

#define EHEA_SWQE_SIGNALLED_COMPLETION   0x0800

Definition at line 88 of file ehea_qmr.h.

#define EHEA_SWQE_TCP_CHECKSUM   0x2000

Definition at line 86 of file ehea_qmr.h.

#define EHEA_SWQE_TSO   0x1000

Definition at line 87 of file ehea_qmr.h.

#define EHEA_SWQE_VLAN_INSERT   0x0400

Definition at line 89 of file ehea_qmr.h.

#define EHEA_SWQE_WRAP_CTL_FORCE   0x0040

Definition at line 93 of file ehea_qmr.h.

#define EHEA_SWQE_WRAP_CTL_REC   0x0080

Definition at line 92 of file ehea_qmr.h.

#define EHEA_WR_ID_COUNT   EHEA_BMASK_IBM(0, 19)

Definition at line 63 of file ehea_qmr.h.

#define EHEA_WR_ID_INDEX   EHEA_BMASK_IBM(24, 47)

Definition at line 69 of file ehea_qmr.h.

#define EHEA_WR_ID_REFILL   EHEA_BMASK_IBM(48, 63)

Definition at line 70 of file ehea_qmr.h.

#define EHEA_WR_ID_TYPE   EHEA_BMASK_IBM(20, 23)

Definition at line 64 of file ehea_qmr.h.

#define ERROR_DATA_LENGTH   EHEA_BMASK_IBM(52, 63)

Definition at line 207 of file ehea_qmr.h.

#define ERROR_DATA_TYPE   EHEA_BMASK_IBM(0, 7)

Definition at line 208 of file ehea_qmr.h.

#define SWQE2_MAX_IMM   (0xD0 - 0x30)

Definition at line 80 of file ehea_qmr.h.

#define SWQE3_MAX_IMM   224

Definition at line 81 of file ehea_qmr.h.

#define SWQE_HEADER_SIZE   32

Definition at line 98 of file ehea_qmr.h.

Enumeration Type Documentation

Enumerator:
EHEA_EQ 
EHEA_NEQ 

Definition at line 365 of file ehea_qmr.h.

Function Documentation

int ehea_add_sect_bmap ( unsigned long  pfn,
unsigned long  nr_pages 
)

Definition at line 676 of file ehea_qmr.c.

int ehea_create_busmap ( void  )

Definition at line 746 of file ehea_qmr.c.

struct ehea_cq* ehea_create_cq ( struct ehea_adapter adapter,
int  cqe,
u64  eq_handle,
u32  cq_token 
)
read

Definition at line 121 of file ehea_qmr.c.

struct ehea_eq* ehea_create_eq ( struct ehea_adapter adapter,
enum ehea_eq_type  type,
const u32  length,
const u8  eqe_gen 
)
read

Definition at line 250 of file ehea_qmr.c.

struct ehea_qp* ehea_create_qp ( struct ehea_adapter adapter,
u32  pd,
struct ehea_qp_init_attr init_attr 
)
read

Definition at line 420 of file ehea_qmr.c.

void ehea_destroy_busmap ( void  )

Definition at line 758 of file ehea_qmr.c.

int ehea_destroy_cq ( struct ehea_cq cq)

Definition at line 229 of file ehea_qmr.c.

int ehea_destroy_eq ( struct ehea_eq eq)

Definition at line 357 of file ehea_qmr.c.

int ehea_destroy_qp ( struct ehea_qp qp)

Definition at line 538 of file ehea_qmr.c.

u64 ehea_error_data ( struct ehea_adapter adapter,
u64  res_handle,
u64 aer,
u64 aerr 
)

Definition at line 999 of file ehea_qmr.c.

int ehea_gen_smr ( struct ehea_adapter adapter,
struct ehea_mr old_mr,
struct ehea_mr shared_mr 
)

Definition at line 959 of file ehea_qmr.c.

u64 ehea_map_vaddr ( void caddr)

Definition at line 785 of file ehea_qmr.c.

struct ehea_eqe* ehea_poll_eq ( struct ehea_eq eq)
read

Definition at line 326 of file ehea_qmr.c.

int ehea_reg_kernel_mr ( struct ehea_adapter adapter,
struct ehea_mr mr 
)

Definition at line 885 of file ehea_qmr.c.

int ehea_rem_mr ( struct ehea_mr mr)

Definition at line 942 of file ehea_qmr.c.

int ehea_rem_sect_bmap ( unsigned long  pfn,
unsigned long  nr_pages 
)

Definition at line 686 of file ehea_qmr.c.