Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
ib_verbs.h File Reference
#include <linux/types.h>
#include <linux/device.h>
#include <linux/mm.h>
#include <linux/dma-mapping.h>
#include <linux/kref.h>
#include <linux/list.h>
#include <linux/rwsem.h>
#include <linux/scatterlist.h>
#include <linux/workqueue.h>
#include <linux/atomic.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Data Structures

union  ib_gid
 
struct  ib_device_attr
 
struct  ib_protocol_stats
 
struct  iw_protocol_stats
 
union  rdma_protocol_stats
 
struct  ib_port_attr
 
struct  ib_device_modify
 
struct  ib_port_modify
 
struct  ib_event
 
struct  ib_event_handler
 
struct  ib_global_route
 
struct  ib_grh
 
struct  ib_ah_attr
 
struct  ib_wc
 
struct  ib_srq_attr
 
struct  ib_srq_init_attr
 
struct  ib_qp_cap
 
struct  ib_qp_init_attr
 
struct  ib_qp_open_attr
 
struct  ib_qp_attr
 
struct  ib_sge
 
struct  ib_fast_reg_page_list
 
struct  ib_send_wr
 
struct  ib_recv_wr
 
struct  ib_phys_buf
 
struct  ib_mr_attr
 
struct  ib_mw_bind
 
struct  ib_fmr_attr
 
struct  ib_ucontext
 
struct  ib_uobject
 
struct  ib_udata
 
struct  ib_pd
 
struct  ib_xrcd
 
struct  ib_ah
 
struct  ib_cq
 
struct  ib_srq
 
struct  ib_qp
 
struct  ib_mr
 
struct  ib_mw
 
struct  ib_fmr
 
struct  ib_cache
 
struct  ib_dma_mapping_ops
 
struct  ib_device
 
struct  ib_client
 

Macros

#define INIT_IB_EVENT_HANDLER(_ptr, _device, _handler)
 
#define IB_LID_PERMISSIVE   cpu_to_be16(0xFFFF)
 
#define IB_DEVICE_NAME_MAX   64
 

Typedefs

typedef void(* ib_comp_handler )(struct ib_cq *cq, void *cq_context)
 

Enumerations

enum  rdma_node_type { RDMA_NODE_IB_CA = 1, RDMA_NODE_IB_SWITCH, RDMA_NODE_IB_ROUTER, RDMA_NODE_RNIC }
 
enum  rdma_transport_type { RDMA_TRANSPORT_IB, RDMA_TRANSPORT_IWARP }
 
enum  rdma_link_layer { IB_LINK_LAYER_UNSPECIFIED, IB_LINK_LAYER_INFINIBAND, IB_LINK_LAYER_ETHERNET }
 
enum  ib_device_cap_flags {
  IB_DEVICE_RESIZE_MAX_WR = 1, IB_DEVICE_BAD_PKEY_CNTR = (1<<1), IB_DEVICE_BAD_QKEY_CNTR = (1<<2), IB_DEVICE_RAW_MULTI = (1<<3),
  IB_DEVICE_AUTO_PATH_MIG = (1<<4), IB_DEVICE_CHANGE_PHY_PORT = (1<<5), IB_DEVICE_UD_AV_PORT_ENFORCE = (1<<6), IB_DEVICE_CURR_QP_STATE_MOD = (1<<7),
  IB_DEVICE_SHUTDOWN_PORT = (1<<8), IB_DEVICE_INIT_TYPE = (1<<9), IB_DEVICE_PORT_ACTIVE_EVENT = (1<<10), IB_DEVICE_SYS_IMAGE_GUID = (1<<11),
  IB_DEVICE_RC_RNR_NAK_GEN = (1<<12), IB_DEVICE_SRQ_RESIZE = (1<<13), IB_DEVICE_N_NOTIFY_CQ = (1<<14), IB_DEVICE_LOCAL_DMA_LKEY = (1<<15),
  IB_DEVICE_RESERVED = (1<<16), IB_DEVICE_MEM_WINDOW = (1<<17), IB_DEVICE_UD_IP_CSUM = (1<<18), IB_DEVICE_UD_TSO = (1<<19),
  IB_DEVICE_XRC = (1<<20), IB_DEVICE_MEM_MGT_EXTENSIONS = (1<<21), IB_DEVICE_BLOCK_MULTICAST_LOOPBACK = (1<<22)
}
 
enum  ib_atomic_cap { IB_ATOMIC_NONE, IB_ATOMIC_HCA, IB_ATOMIC_GLOB }
 
enum  ib_mtu {
  IB_MTU_256 = 1, IB_MTU_512 = 2, IB_MTU_1024 = 3, IB_MTU_2048 = 4,
  IB_MTU_4096 = 5
}
 
enum  ib_port_state {
  IB_PORT_NOP = 0, IB_PORT_DOWN = 1, IB_PORT_INIT = 2, IB_PORT_ARMED = 3,
  IB_PORT_ACTIVE = 4, IB_PORT_ACTIVE_DEFER = 5
}
 
enum  ib_port_cap_flags {
  IB_PORT_SM = 1 << 1, IB_PORT_NOTICE_SUP = 1 << 2, IB_PORT_TRAP_SUP = 1 << 3, IB_PORT_OPT_IPD_SUP = 1 << 4,
  IB_PORT_AUTO_MIGR_SUP = 1 << 5, IB_PORT_SL_MAP_SUP = 1 << 6, IB_PORT_MKEY_NVRAM = 1 << 7, IB_PORT_PKEY_NVRAM = 1 << 8,
  IB_PORT_LED_INFO_SUP = 1 << 9, IB_PORT_SM_DISABLED = 1 << 10, IB_PORT_SYS_IMAGE_GUID_SUP = 1 << 11, IB_PORT_PKEY_SW_EXT_PORT_TRAP_SUP = 1 << 12,
  IB_PORT_EXTENDED_SPEEDS_SUP = 1 << 14, IB_PORT_CM_SUP = 1 << 16, IB_PORT_SNMP_TUNNEL_SUP = 1 << 17, IB_PORT_REINIT_SUP = 1 << 18,
  IB_PORT_DEVICE_MGMT_SUP = 1 << 19, IB_PORT_VENDOR_CLASS_SUP = 1 << 20, IB_PORT_DR_NOTICE_SUP = 1 << 21, IB_PORT_CAP_MASK_NOTICE_SUP = 1 << 22,
  IB_PORT_BOOT_MGMT_SUP = 1 << 23, IB_PORT_LINK_LATENCY_SUP = 1 << 24, IB_PORT_CLIENT_REG_SUP = 1 << 25
}
 
enum  ib_port_width { IB_WIDTH_1X = 1, IB_WIDTH_4X = 2, IB_WIDTH_8X = 4, IB_WIDTH_12X = 8 }
 
enum  ib_port_speed {
  IB_SPEED_SDR = 1, IB_SPEED_DDR = 2, IB_SPEED_QDR = 4, IB_SPEED_FDR10 = 8,
  IB_SPEED_FDR = 16, IB_SPEED_EDR = 32
}
 
enum  ib_device_modify_flags { IB_DEVICE_MODIFY_SYS_IMAGE_GUID = 1 << 0, IB_DEVICE_MODIFY_NODE_DESC = 1 << 1 }
 
enum  ib_port_modify_flags { IB_PORT_SHUTDOWN = 1, IB_PORT_INIT_TYPE = (1<<2), IB_PORT_RESET_QKEY_CNTR = (1<<3) }
 
enum  ib_event_type {
  IB_EVENT_CQ_ERR, IB_EVENT_QP_FATAL, IB_EVENT_QP_REQ_ERR, IB_EVENT_QP_ACCESS_ERR,
  IB_EVENT_COMM_EST, IB_EVENT_SQ_DRAINED, IB_EVENT_PATH_MIG, IB_EVENT_PATH_MIG_ERR,
  IB_EVENT_DEVICE_FATAL, IB_EVENT_PORT_ACTIVE, IB_EVENT_PORT_ERR, IB_EVENT_LID_CHANGE,
  IB_EVENT_PKEY_CHANGE, IB_EVENT_SM_CHANGE, IB_EVENT_SRQ_ERR, IB_EVENT_SRQ_LIMIT_REACHED,
  IB_EVENT_QP_LAST_WQE_REACHED, IB_EVENT_CLIENT_REREGISTER, IB_EVENT_GID_CHANGE
}
 
enum  { IB_MULTICAST_QPN = 0xffffff }
 
enum  ib_ah_flags { IB_AH_GRH = 1 }
 
enum  ib_rate {
  IB_RATE_PORT_CURRENT = 0, IB_RATE_2_5_GBPS = 2, IB_RATE_5_GBPS = 5, IB_RATE_10_GBPS = 3,
  IB_RATE_20_GBPS = 6, IB_RATE_30_GBPS = 4, IB_RATE_40_GBPS = 7, IB_RATE_60_GBPS = 8,
  IB_RATE_80_GBPS = 9, IB_RATE_120_GBPS = 10, IB_RATE_14_GBPS = 11, IB_RATE_56_GBPS = 12,
  IB_RATE_112_GBPS = 13, IB_RATE_168_GBPS = 14, IB_RATE_25_GBPS = 15, IB_RATE_100_GBPS = 16,
  IB_RATE_200_GBPS = 17, IB_RATE_300_GBPS = 18
}
 
enum  ib_wc_status {
  IB_WC_SUCCESS, IB_WC_LOC_LEN_ERR, IB_WC_LOC_QP_OP_ERR, IB_WC_LOC_EEC_OP_ERR,
  IB_WC_LOC_PROT_ERR, IB_WC_WR_FLUSH_ERR, IB_WC_MW_BIND_ERR, IB_WC_BAD_RESP_ERR,
  IB_WC_LOC_ACCESS_ERR, IB_WC_REM_INV_REQ_ERR, IB_WC_REM_ACCESS_ERR, IB_WC_REM_OP_ERR,
  IB_WC_RETRY_EXC_ERR, IB_WC_RNR_RETRY_EXC_ERR, IB_WC_LOC_RDD_VIOL_ERR, IB_WC_REM_INV_RD_REQ_ERR,
  IB_WC_REM_ABORT_ERR, IB_WC_INV_EECN_ERR, IB_WC_INV_EEC_STATE_ERR, IB_WC_FATAL_ERR,
  IB_WC_RESP_TIMEOUT_ERR, IB_WC_GENERAL_ERR
}
 
enum  ib_wc_opcode {
  IB_WC_SEND, IB_WC_RDMA_WRITE, IB_WC_RDMA_READ, IB_WC_COMP_SWAP,
  IB_WC_FETCH_ADD, IB_WC_BIND_MW, IB_WC_LSO, IB_WC_LOCAL_INV,
  IB_WC_FAST_REG_MR, IB_WC_MASKED_COMP_SWAP, IB_WC_MASKED_FETCH_ADD, IB_WC_RECV = 1 << 7,
  IB_WC_RECV_RDMA_WITH_IMM
}
 
enum  ib_wc_flags { IB_WC_GRH = 1, IB_WC_WITH_IMM = (1<<1), IB_WC_WITH_INVALIDATE = (1<<2), IB_WC_IP_CSUM_OK = (1<<3) }
 
enum  ib_cq_notify_flags { IB_CQ_SOLICITED = 1 << 0, IB_CQ_NEXT_COMP = 1 << 1, IB_CQ_SOLICITED_MASK = IB_CQ_SOLICITED | IB_CQ_NEXT_COMP, IB_CQ_REPORT_MISSED_EVENTS = 1 << 2 }
 
enum  ib_srq_type { IB_SRQT_BASIC, IB_SRQT_XRC }
 
enum  ib_srq_attr_mask { IB_SRQ_MAX_WR = 1 << 0, IB_SRQ_LIMIT = 1 << 1 }
 
enum  ib_sig_type { IB_SIGNAL_ALL_WR, IB_SIGNAL_REQ_WR }
 
enum  ib_qp_type {
  IB_QPT_SMI, IB_QPT_GSI, IB_QPT_RC, IB_QPT_UC,
  IB_QPT_UD, IB_QPT_RAW_IPV6, IB_QPT_RAW_ETHERTYPE, IB_QPT_RAW_PACKET = 8,
  IB_QPT_XRC_INI = 9, IB_QPT_XRC_TGT, IB_QPT_MAX
}
 
enum  ib_qp_create_flags { IB_QP_CREATE_IPOIB_UD_LSO = 1 << 0, IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK = 1 << 1, IB_QP_CREATE_RESERVED_START = 1 << 26, IB_QP_CREATE_RESERVED_END = 1 << 31 }
 
enum  ib_rnr_timeout {
  IB_RNR_TIMER_655_36 = 0, IB_RNR_TIMER_000_01 = 1, IB_RNR_TIMER_000_02 = 2, IB_RNR_TIMER_000_03 = 3,
  IB_RNR_TIMER_000_04 = 4, IB_RNR_TIMER_000_06 = 5, IB_RNR_TIMER_000_08 = 6, IB_RNR_TIMER_000_12 = 7,
  IB_RNR_TIMER_000_16 = 8, IB_RNR_TIMER_000_24 = 9, IB_RNR_TIMER_000_32 = 10, IB_RNR_TIMER_000_48 = 11,
  IB_RNR_TIMER_000_64 = 12, IB_RNR_TIMER_000_96 = 13, IB_RNR_TIMER_001_28 = 14, IB_RNR_TIMER_001_92 = 15,
  IB_RNR_TIMER_002_56 = 16, IB_RNR_TIMER_003_84 = 17, IB_RNR_TIMER_005_12 = 18, IB_RNR_TIMER_007_68 = 19,
  IB_RNR_TIMER_010_24 = 20, IB_RNR_TIMER_015_36 = 21, IB_RNR_TIMER_020_48 = 22, IB_RNR_TIMER_030_72 = 23,
  IB_RNR_TIMER_040_96 = 24, IB_RNR_TIMER_061_44 = 25, IB_RNR_TIMER_081_92 = 26, IB_RNR_TIMER_122_88 = 27,
  IB_RNR_TIMER_163_84 = 28, IB_RNR_TIMER_245_76 = 29, IB_RNR_TIMER_327_68 = 30, IB_RNR_TIMER_491_52 = 31
}
 
enum  ib_qp_attr_mask {
  IB_QP_STATE = 1, IB_QP_CUR_STATE = (1<<1), IB_QP_EN_SQD_ASYNC_NOTIFY = (1<<2), IB_QP_ACCESS_FLAGS = (1<<3),
  IB_QP_PKEY_INDEX = (1<<4), IB_QP_PORT = (1<<5), IB_QP_QKEY = (1<<6), IB_QP_AV = (1<<7),
  IB_QP_PATH_MTU = (1<<8), IB_QP_TIMEOUT = (1<<9), IB_QP_RETRY_CNT = (1<<10), IB_QP_RNR_RETRY = (1<<11),
  IB_QP_RQ_PSN = (1<<12), IB_QP_MAX_QP_RD_ATOMIC = (1<<13), IB_QP_ALT_PATH = (1<<14), IB_QP_MIN_RNR_TIMER = (1<<15),
  IB_QP_SQ_PSN = (1<<16), IB_QP_MAX_DEST_RD_ATOMIC = (1<<17), IB_QP_PATH_MIG_STATE = (1<<18), IB_QP_CAP = (1<<19),
  IB_QP_DEST_QPN = (1<<20)
}
 
enum  ib_qp_state {
  IB_QPS_RESET, IB_QPS_INIT, IB_QPS_RTR, IB_QPS_RTS,
  IB_QPS_SQD, IB_QPS_SQE, IB_QPS_ERR
}
 
enum  ib_mig_state { IB_MIG_MIGRATED, IB_MIG_REARM, IB_MIG_ARMED }
 
enum  ib_wr_opcode {
  IB_WR_RDMA_WRITE, IB_WR_RDMA_WRITE_WITH_IMM, IB_WR_SEND, IB_WR_SEND_WITH_IMM,
  IB_WR_RDMA_READ, IB_WR_ATOMIC_CMP_AND_SWP, IB_WR_ATOMIC_FETCH_AND_ADD, IB_WR_LSO,
  IB_WR_SEND_WITH_INV, IB_WR_RDMA_READ_WITH_INV, IB_WR_LOCAL_INV, IB_WR_FAST_REG_MR,
  IB_WR_MASKED_ATOMIC_CMP_AND_SWP, IB_WR_MASKED_ATOMIC_FETCH_AND_ADD
}
 
enum  ib_send_flags {
  IB_SEND_FENCE = 1, IB_SEND_SIGNALED = (1<<1), IB_SEND_SOLICITED = (1<<2), IB_SEND_INLINE = (1<<3),
  IB_SEND_IP_CSUM = (1<<4)
}
 
enum  ib_access_flags {
  IB_ACCESS_LOCAL_WRITE = 1, IB_ACCESS_REMOTE_WRITE = (1<<1), IB_ACCESS_REMOTE_READ = (1<<2), IB_ACCESS_REMOTE_ATOMIC = (1<<3),
  IB_ACCESS_MW_BIND = (1<<4)
}
 
enum  ib_mr_rereg_flags { IB_MR_REREG_TRANS = 1, IB_MR_REREG_PD = (1<<1), IB_MR_REREG_ACCESS = (1<<2) }
 
enum  ib_process_mad_flags { IB_MAD_IGNORE_MKEY = 1, IB_MAD_IGNORE_BKEY = 2, IB_MAD_IGNORE_ALL = IB_MAD_IGNORE_MKEY | IB_MAD_IGNORE_BKEY }
 
enum  ib_mad_result { IB_MAD_RESULT_FAILURE = 0, IB_MAD_RESULT_SUCCESS = 1 << 0, IB_MAD_RESULT_REPLY = 1 << 1, IB_MAD_RESULT_CONSUMED = 1 << 2 }
 

Functions

enum rdma_transport_type rdma_node_get_transport (enum rdma_node_type node_type) __attribute_const__
 
int ib_rate_to_mult (enum ib_rate rate) __attribute_const__
 
int ib_rate_to_mbps (enum ib_rate rate) __attribute_const__
 
enum ib_rate mult_to_ib_rate (int mult) __attribute_const__
 
struct ib_deviceib_alloc_device (size_t size)
 
void ib_dealloc_device (struct ib_device *device)
 
int ib_register_device (struct ib_device *device, int(*port_callback)(struct ib_device *, u8, struct kobject *))
 
void ib_unregister_device (struct ib_device *device)
 
int ib_register_client (struct ib_client *client)
 
void ib_unregister_client (struct ib_client *client)
 
voidib_get_client_data (struct ib_device *device, struct ib_client *client)
 
void ib_set_client_data (struct ib_device *device, struct ib_client *client, void *data)
 
int ib_modify_qp_is_ok (enum ib_qp_state cur_state, enum ib_qp_state next_state, enum ib_qp_type type, enum ib_qp_attr_mask mask)
 
int ib_register_event_handler (struct ib_event_handler *event_handler)
 
int ib_unregister_event_handler (struct ib_event_handler *event_handler)
 
void ib_dispatch_event (struct ib_event *event)
 
int ib_query_device (struct ib_device *device, struct ib_device_attr *device_attr)
 
int ib_query_port (struct ib_device *device, u8 port_num, struct ib_port_attr *port_attr)
 
enum rdma_link_layer rdma_port_get_link_layer (struct ib_device *device, u8 port_num)
 
int ib_query_gid (struct ib_device *device, u8 port_num, int index, union ib_gid *gid)
 
int ib_query_pkey (struct ib_device *device, u8 port_num, u16 index, u16 *pkey)
 
int ib_modify_device (struct ib_device *device, int device_modify_mask, struct ib_device_modify *device_modify)
 
int ib_modify_port (struct ib_device *device, u8 port_num, int port_modify_mask, struct ib_port_modify *port_modify)
 
int ib_find_gid (struct ib_device *device, union ib_gid *gid, u8 *port_num, u16 *index)
 
int ib_find_pkey (struct ib_device *device, u8 port_num, u16 pkey, u16 *index)
 
struct ib_pdib_alloc_pd (struct ib_device *device)
 
int ib_dealloc_pd (struct ib_pd *pd)
 
struct ib_ahib_create_ah (struct ib_pd *pd, struct ib_ah_attr *ah_attr)
 
int ib_init_ah_from_wc (struct ib_device *device, u8 port_num, struct ib_wc *wc, struct ib_grh *grh, struct ib_ah_attr *ah_attr)
 
struct ib_ahib_create_ah_from_wc (struct ib_pd *pd, struct ib_wc *wc, struct ib_grh *grh, u8 port_num)
 
int ib_modify_ah (struct ib_ah *ah, struct ib_ah_attr *ah_attr)
 
int ib_query_ah (struct ib_ah *ah, struct ib_ah_attr *ah_attr)
 
int ib_destroy_ah (struct ib_ah *ah)
 
struct ib_srqib_create_srq (struct ib_pd *pd, struct ib_srq_init_attr *srq_init_attr)
 
int ib_modify_srq (struct ib_srq *srq, struct ib_srq_attr *srq_attr, enum ib_srq_attr_mask srq_attr_mask)
 
int ib_query_srq (struct ib_srq *srq, struct ib_srq_attr *srq_attr)
 
int ib_destroy_srq (struct ib_srq *srq)
 
struct ib_qpib_create_qp (struct ib_pd *pd, struct ib_qp_init_attr *qp_init_attr)
 
int ib_modify_qp (struct ib_qp *qp, struct ib_qp_attr *qp_attr, int qp_attr_mask)
 
int ib_query_qp (struct ib_qp *qp, struct ib_qp_attr *qp_attr, int qp_attr_mask, struct ib_qp_init_attr *qp_init_attr)
 
int ib_destroy_qp (struct ib_qp *qp)
 
struct ib_qpib_open_qp (struct ib_xrcd *xrcd, struct ib_qp_open_attr *qp_open_attr)
 
int ib_close_qp (struct ib_qp *qp)
 
struct ib_cqib_create_cq (struct ib_device *device, ib_comp_handler comp_handler, void(*event_handler)(struct ib_event *, void *), void *cq_context, int cqe, int comp_vector)
 
int ib_resize_cq (struct ib_cq *cq, int cqe)
 
int ib_modify_cq (struct ib_cq *cq, u16 cq_count, u16 cq_period)
 
int ib_destroy_cq (struct ib_cq *cq)
 
int ib_peek_cq (struct ib_cq *cq, int wc_cnt)
 
struct ib_mrib_get_dma_mr (struct ib_pd *pd, int mr_access_flags)
 
struct ib_mrib_reg_phys_mr (struct ib_pd *pd, struct ib_phys_buf *phys_buf_array, int num_phys_buf, int mr_access_flags, u64 *iova_start)
 
int ib_rereg_phys_mr (struct ib_mr *mr, int mr_rereg_mask, struct ib_pd *pd, struct ib_phys_buf *phys_buf_array, int num_phys_buf, int mr_access_flags, u64 *iova_start)
 
int ib_query_mr (struct ib_mr *mr, struct ib_mr_attr *mr_attr)
 
int ib_dereg_mr (struct ib_mr *mr)
 
struct ib_mrib_alloc_fast_reg_mr (struct ib_pd *pd, int max_page_list_len)
 
struct ib_fast_reg_page_listib_alloc_fast_reg_page_list (struct ib_device *device, int page_list_len)
 
void ib_free_fast_reg_page_list (struct ib_fast_reg_page_list *page_list)
 
struct ib_mwib_alloc_mw (struct ib_pd *pd)
 
int ib_dealloc_mw (struct ib_mw *mw)
 
struct ib_fmrib_alloc_fmr (struct ib_pd *pd, int mr_access_flags, struct ib_fmr_attr *fmr_attr)
 
int ib_unmap_fmr (struct list_head *fmr_list)
 
int ib_dealloc_fmr (struct ib_fmr *fmr)
 
int ib_attach_mcast (struct ib_qp *qp, union ib_gid *gid, u16 lid)
 
int ib_detach_mcast (struct ib_qp *qp, union ib_gid *gid, u16 lid)
 
struct ib_xrcdib_alloc_xrcd (struct ib_device *device)
 
int ib_dealloc_xrcd (struct ib_xrcd *xrcd)
 

Variables

struct workqueue_structib_wq
 

Macro Definition Documentation

#define IB_DEVICE_NAME_MAX   64

Definition at line 1020 of file ib_verbs.h.

#define IB_LID_PERMISSIVE   cpu_to_be16(0xFFFF)

Definition at line 413 of file ib_verbs.h.

#define INIT_IB_EVENT_HANDLER (   _ptr,
  _device,
  _handler 
)
Value:
do { \
(_ptr)->device = _device; \
(_ptr)->handler = _handler; \
INIT_LIST_HEAD(&(_ptr)->list); \
} while (0)

Definition at line 385 of file ib_verbs.h.

Typedef Documentation

typedef void(* ib_comp_handler)(struct ib_cq *cq, void *cq_context)

Definition at line 932 of file ib_verbs.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
IB_MULTICAST_QPN 

Definition at line 409 of file ib_verbs.h.

Enumerator:
IB_ACCESS_LOCAL_WRITE 
IB_ACCESS_REMOTE_WRITE 
IB_ACCESS_REMOTE_READ 
IB_ACCESS_REMOTE_ATOMIC 
IB_ACCESS_MW_BIND 

Definition at line 837 of file ib_verbs.h.

Enumerator:
IB_AH_GRH 

Definition at line 415 of file ib_verbs.h.

Enumerator:
IB_ATOMIC_NONE 
IB_ATOMIC_HCA 
IB_ATOMIC_GLOB 

Definition at line 120 of file ib_verbs.h.

Enumerator:
IB_CQ_SOLICITED 
IB_CQ_NEXT_COMP 
IB_CQ_SOLICITED_MASK 
IB_CQ_REPORT_MISSED_EVENTS 

Definition at line 544 of file ib_verbs.h.

Enumerator:
IB_DEVICE_RESIZE_MAX_WR 
IB_DEVICE_BAD_PKEY_CNTR 
IB_DEVICE_BAD_QKEY_CNTR 
IB_DEVICE_RAW_MULTI 
IB_DEVICE_AUTO_PATH_MIG 
IB_DEVICE_CHANGE_PHY_PORT 
IB_DEVICE_UD_AV_PORT_ENFORCE 
IB_DEVICE_CURR_QP_STATE_MOD 
IB_DEVICE_SHUTDOWN_PORT 
IB_DEVICE_INIT_TYPE 
IB_DEVICE_PORT_ACTIVE_EVENT 
IB_DEVICE_SYS_IMAGE_GUID 
IB_DEVICE_RC_RNR_NAK_GEN 
IB_DEVICE_SRQ_RESIZE 
IB_DEVICE_N_NOTIFY_CQ 
IB_DEVICE_LOCAL_DMA_LKEY 
IB_DEVICE_RESERVED 
IB_DEVICE_MEM_WINDOW 
IB_DEVICE_UD_IP_CSUM 
IB_DEVICE_UD_TSO 
IB_DEVICE_XRC 
IB_DEVICE_MEM_MGT_EXTENSIONS 
IB_DEVICE_BLOCK_MULTICAST_LOOPBACK 

Definition at line 87 of file ib_verbs.h.

Enumerator:
IB_DEVICE_MODIFY_SYS_IMAGE_GUID 
IB_DEVICE_MODIFY_NODE_DESC 

Definition at line 324 of file ib_verbs.h.

Enumerator:
IB_EVENT_CQ_ERR 
IB_EVENT_QP_FATAL 
IB_EVENT_QP_REQ_ERR 
IB_EVENT_QP_ACCESS_ERR 
IB_EVENT_COMM_EST 
IB_EVENT_SQ_DRAINED 
IB_EVENT_PATH_MIG 
IB_EVENT_PATH_MIG_ERR 
IB_EVENT_DEVICE_FATAL 
IB_EVENT_PORT_ACTIVE 
IB_EVENT_PORT_ERR 
IB_EVENT_LID_CHANGE 
IB_EVENT_PKEY_CHANGE 
IB_EVENT_SM_CHANGE 
IB_EVENT_SRQ_ERR 
IB_EVENT_SRQ_LIMIT_REACHED 
IB_EVENT_QP_LAST_WQE_REACHED 
IB_EVENT_CLIENT_REREGISTER 
IB_EVENT_GID_CHANGE 

Definition at line 346 of file ib_verbs.h.

Enumerator:
IB_MAD_RESULT_FAILURE 
IB_MAD_RESULT_SUCCESS 
IB_MAD_RESULT_REPLY 
IB_MAD_RESULT_CONSUMED 

Definition at line 1013 of file ib_verbs.h.

Enumerator:
IB_MIG_MIGRATED 
IB_MIG_REARM 
IB_MIG_ARMED 

Definition at line 712 of file ib_verbs.h.

Enumerator:
IB_MR_REREG_TRANS 
IB_MR_REREG_PD 
IB_MR_REREG_ACCESS 

Definition at line 859 of file ib_verbs.h.

enum ib_mtu
Enumerator:
IB_MTU_256 
IB_MTU_512 
IB_MTU_1024 
IB_MTU_2048 
IB_MTU_4096 

Definition at line 169 of file ib_verbs.h.

Enumerator:
IB_PORT_SM 
IB_PORT_NOTICE_SUP 
IB_PORT_TRAP_SUP 
IB_PORT_OPT_IPD_SUP 
IB_PORT_AUTO_MIGR_SUP 
IB_PORT_SL_MAP_SUP 
IB_PORT_MKEY_NVRAM 
IB_PORT_PKEY_NVRAM 
IB_PORT_LED_INFO_SUP 
IB_PORT_SM_DISABLED 
IB_PORT_SYS_IMAGE_GUID_SUP 
IB_PORT_PKEY_SW_EXT_PORT_TRAP_SUP 
IB_PORT_EXTENDED_SPEEDS_SUP 
IB_PORT_CM_SUP 
IB_PORT_SNMP_TUNNEL_SUP 
IB_PORT_REINIT_SUP 
IB_PORT_DEVICE_MGMT_SUP 
IB_PORT_VENDOR_CLASS_SUP 
IB_PORT_DR_NOTICE_SUP 
IB_PORT_CAP_MASK_NOTICE_SUP 
IB_PORT_BOOT_MGMT_SUP 
IB_PORT_LINK_LATENCY_SUP 
IB_PORT_CLIENT_REG_SUP 

Definition at line 198 of file ib_verbs.h.

Enumerator:
IB_PORT_SHUTDOWN 
IB_PORT_INIT_TYPE 
IB_PORT_RESET_QKEY_CNTR 

Definition at line 334 of file ib_verbs.h.

Enumerator:
IB_SPEED_SDR 
IB_SPEED_DDR 
IB_SPEED_QDR 
IB_SPEED_FDR10 
IB_SPEED_FDR 
IB_SPEED_EDR 

Definition at line 242 of file ib_verbs.h.

Enumerator:
IB_PORT_NOP 
IB_PORT_DOWN 
IB_PORT_INIT 
IB_PORT_ARMED 
IB_PORT_ACTIVE 
IB_PORT_ACTIVE_DEFER 

Definition at line 189 of file ib_verbs.h.

Enumerator:
IB_WIDTH_1X 
IB_WIDTH_4X 
IB_WIDTH_8X 
IB_WIDTH_12X 

Definition at line 224 of file ib_verbs.h.

Enumerator:
IB_MAD_IGNORE_MKEY 
IB_MAD_IGNORE_BKEY 
IB_MAD_IGNORE_ALL 

Definition at line 1007 of file ib_verbs.h.

Enumerator:
IB_QP_STATE 
IB_QP_CUR_STATE 
IB_QP_EN_SQD_ASYNC_NOTIFY 
IB_QP_ACCESS_FLAGS 
IB_QP_PKEY_INDEX 
IB_QP_PORT 
IB_QP_QKEY 
IB_QP_AV 
IB_QP_PATH_MTU 
IB_QP_TIMEOUT 
IB_QP_RETRY_CNT 
IB_QP_RNR_RETRY 
IB_QP_RQ_PSN 
IB_QP_MAX_QP_RD_ATOMIC 
IB_QP_ALT_PATH 
IB_QP_MIN_RNR_TIMER 
IB_QP_SQ_PSN 
IB_QP_MAX_DEST_RD_ATOMIC 
IB_QP_PATH_MIG_STATE 
IB_QP_CAP 
IB_QP_DEST_QPN 

Definition at line 678 of file ib_verbs.h.

Enumerator:
IB_QP_CREATE_IPOIB_UD_LSO 
IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK 
IB_QP_CREATE_RESERVED_START 
IB_QP_CREATE_RESERVED_END 

Definition at line 614 of file ib_verbs.h.

Enumerator:
IB_QPS_RESET 
IB_QPS_INIT 
IB_QPS_RTR 
IB_QPS_RTS 
IB_QPS_SQD 
IB_QPS_SQE 
IB_QPS_ERR 

Definition at line 702 of file ib_verbs.h.

enum ib_qp_type
Enumerator:
IB_QPT_SMI 
IB_QPT_GSI 
IB_QPT_RC 
IB_QPT_UC 
IB_QPT_UD 
IB_QPT_RAW_IPV6 
IB_QPT_RAW_ETHERTYPE 
IB_QPT_RAW_PACKET 
IB_QPT_XRC_INI 
IB_QPT_XRC_TGT 
IB_QPT_MAX 

Definition at line 594 of file ib_verbs.h.

enum ib_rate
Enumerator:
IB_RATE_PORT_CURRENT 
IB_RATE_2_5_GBPS 
IB_RATE_5_GBPS 
IB_RATE_10_GBPS 
IB_RATE_20_GBPS 
IB_RATE_30_GBPS 
IB_RATE_40_GBPS 
IB_RATE_60_GBPS 
IB_RATE_80_GBPS 
IB_RATE_120_GBPS 
IB_RATE_14_GBPS 
IB_RATE_56_GBPS 
IB_RATE_112_GBPS 
IB_RATE_168_GBPS 
IB_RATE_25_GBPS 
IB_RATE_100_GBPS 
IB_RATE_200_GBPS 
IB_RATE_300_GBPS 

Definition at line 419 of file ib_verbs.h.

Enumerator:
IB_RNR_TIMER_655_36 
IB_RNR_TIMER_000_01 
IB_RNR_TIMER_000_02 
IB_RNR_TIMER_000_03 
IB_RNR_TIMER_000_04 
IB_RNR_TIMER_000_06 
IB_RNR_TIMER_000_08 
IB_RNR_TIMER_000_12 
IB_RNR_TIMER_000_16 
IB_RNR_TIMER_000_24 
IB_RNR_TIMER_000_32 
IB_RNR_TIMER_000_48 
IB_RNR_TIMER_000_64 
IB_RNR_TIMER_000_96 
IB_RNR_TIMER_001_28 
IB_RNR_TIMER_001_92 
IB_RNR_TIMER_002_56 
IB_RNR_TIMER_003_84 
IB_RNR_TIMER_005_12 
IB_RNR_TIMER_007_68 
IB_RNR_TIMER_010_24 
IB_RNR_TIMER_015_36 
IB_RNR_TIMER_020_48 
IB_RNR_TIMER_030_72 
IB_RNR_TIMER_040_96 
IB_RNR_TIMER_061_44 
IB_RNR_TIMER_081_92 
IB_RNR_TIMER_122_88 
IB_RNR_TIMER_163_84 
IB_RNR_TIMER_245_76 
IB_RNR_TIMER_327_68 
IB_RNR_TIMER_491_52 

Definition at line 643 of file ib_verbs.h.

Enumerator:
IB_SEND_FENCE 
IB_SEND_SIGNALED 
IB_SEND_SOLICITED 
IB_SEND_INLINE 
IB_SEND_IP_CSUM 

Definition at line 763 of file ib_verbs.h.

Enumerator:
IB_SIGNAL_ALL_WR 
IB_SIGNAL_REQ_WR 

Definition at line 589 of file ib_verbs.h.

Enumerator:
IB_SRQ_MAX_WR 
IB_SRQ_LIMIT 

Definition at line 556 of file ib_verbs.h.

Enumerator:
IB_SRQT_BASIC 
IB_SRQT_XRC 

Definition at line 551 of file ib_verbs.h.

Enumerator:
IB_WC_GRH 
IB_WC_WITH_IMM 
IB_WC_WITH_INVALIDATE 
IB_WC_IP_CSUM_OK 

Definition at line 517 of file ib_verbs.h.

Enumerator:
IB_WC_SEND 
IB_WC_RDMA_WRITE 
IB_WC_RDMA_READ 
IB_WC_COMP_SWAP 
IB_WC_FETCH_ADD 
IB_WC_BIND_MW 
IB_WC_LSO 
IB_WC_LOCAL_INV 
IB_WC_FAST_REG_MR 
IB_WC_MASKED_COMP_SWAP 
IB_WC_MASKED_FETCH_ADD 
IB_WC_RECV 
IB_WC_RECV_RDMA_WITH_IMM 

Definition at line 497 of file ib_verbs.h.

Enumerator:
IB_WC_SUCCESS 
IB_WC_LOC_LEN_ERR 
IB_WC_LOC_QP_OP_ERR 
IB_WC_LOC_EEC_OP_ERR 
IB_WC_LOC_PROT_ERR 
IB_WC_WR_FLUSH_ERR 
IB_WC_MW_BIND_ERR 
IB_WC_BAD_RESP_ERR 
IB_WC_LOC_ACCESS_ERR 
IB_WC_REM_INV_REQ_ERR 
IB_WC_REM_ACCESS_ERR 
IB_WC_REM_OP_ERR 
IB_WC_RETRY_EXC_ERR 
IB_WC_RNR_RETRY_EXC_ERR 
IB_WC_LOC_RDD_VIOL_ERR 
IB_WC_REM_INV_RD_REQ_ERR 
IB_WC_REM_ABORT_ERR 
IB_WC_INV_EECN_ERR 
IB_WC_INV_EEC_STATE_ERR 
IB_WC_FATAL_ERR 
IB_WC_RESP_TIMEOUT_ERR 
IB_WC_GENERAL_ERR 

Definition at line 472 of file ib_verbs.h.

Enumerator:
IB_WR_RDMA_WRITE 
IB_WR_RDMA_WRITE_WITH_IMM 
IB_WR_SEND 
IB_WR_SEND_WITH_IMM 
IB_WR_RDMA_READ 
IB_WR_ATOMIC_CMP_AND_SWP 
IB_WR_ATOMIC_FETCH_AND_ADD 
IB_WR_LSO 
IB_WR_SEND_WITH_INV 
IB_WR_RDMA_READ_WITH_INV 
IB_WR_LOCAL_INV 
IB_WR_FAST_REG_MR 
IB_WR_MASKED_ATOMIC_CMP_AND_SWP 
IB_WR_MASKED_ATOMIC_FETCH_AND_ADD 

Definition at line 746 of file ib_verbs.h.

Enumerator:
IB_LINK_LAYER_UNSPECIFIED 
IB_LINK_LAYER_INFINIBAND 
IB_LINK_LAYER_ETHERNET 

Definition at line 81 of file ib_verbs.h.

Enumerator:
RDMA_NODE_IB_CA 
RDMA_NODE_IB_SWITCH 
RDMA_NODE_IB_ROUTER 
RDMA_NODE_RNIC 

Definition at line 65 of file ib_verbs.h.

Enumerator:
RDMA_TRANSPORT_IB 
RDMA_TRANSPORT_IWARP 

Definition at line 73 of file ib_verbs.h.

Function Documentation

struct ib_device* ib_alloc_device ( size_t  size)
read

ib_alloc_device - allocate an IB device struct :size of structure to allocate

Low-level drivers should use ib_alloc_device() to allocate &struct ib_device. is the size of the structure to be allocated, including any private data used by the low-level driver. ib_dealloc_device() must be used to free structures allocated with ib_alloc_device().

Definition at line 176 of file device.c.

struct ib_mr* ib_alloc_fast_reg_mr ( struct ib_pd pd,
int  max_page_list_len 
)
read

ib_alloc_fast_reg_mr - Allocates memory region usable with the IB_WR_FAST_REG_MR send work request. : The protection domain associated with the region. : requested max physical buffer list length to be used with fast register work requests for this MR.

Definition at line 1054 of file verbs.c.

struct ib_fast_reg_page_list* ib_alloc_fast_reg_page_list ( struct ib_device device,
int  page_list_len 
)
read

ib_alloc_fast_reg_page_list - Allocates a page list array - ib device pointer. - size of the page list array to be allocated.

This allocates and returns a struct ib_fast_reg_page_list * and a page_list array that is at least page_list_len in size. The actual size is returned in max_page_list_len. The caller is responsible for initializing the contents of the page_list array before posting a send work request with the IB_WC_FAST_REG_MR opcode.

The page_list array entries must be translated using one of the ib_dma_*() functions just like the addresses passed to ib_map_phys_fmr(). Once the ib_post_send() is issued, the struct ib_fast_reg_page_list must not be modified by the caller until the IB_WC_FAST_REG_MR work request completes.

Definition at line 1075 of file verbs.c.

struct ib_fmr* ib_alloc_fmr ( struct ib_pd pd,
int  mr_access_flags,
struct ib_fmr_attr fmr_attr 
)
read

ib_alloc_fmr - Allocates a unmapped fast memory region. : The protection domain associated with the unmapped region. : Specifies the memory access rights. : Attributes of the unmapped region.

A fast memory region must be mapped before it can be used as part of a work request.

Definition at line 1137 of file verbs.c.

struct ib_mw* ib_alloc_mw ( struct ib_pd pd)
read

ib_alloc_mw - Allocates a memory window. : The protection domain associated with the memory window.

Definition at line 1102 of file verbs.c.

struct ib_pd* ib_alloc_pd ( struct ib_device device)
read

ib_alloc_pd - Allocates an unused protection domain. : The device on which to allocate the protection domain.

A protection domain object provides an association between QPs, shared receive queues, address handles, memory regions, and memory windows.

Definition at line 142 of file verbs.c.

struct ib_xrcd* ib_alloc_xrcd ( struct ib_device device)
read

ib_alloc_xrcd - Allocates an XRC domain. : The device on which to allocate the XRC domain.

Definition at line 1217 of file verbs.c.

int ib_attach_mcast ( struct ib_qp qp,
union ib_gid gid,
u16  lid 
)

ib_attach_mcast - Attaches the specified QP to a multicast group. : QP to attach to the multicast group. The QP must be type IB_QPT_UD. : Multicast group GID. : Multicast group LID in host byte order.

In order to send and receive multicast packets, subnet administration must have created the multicast group and configured the fabric appropriately. The port associated with the specified QP must also be a member of the multicast group.

Definition at line 1185 of file verbs.c.

int ib_close_qp ( struct ib_qp qp)

ib_close_qp - Release an external reference to a QP. : The QP handle to release

The opened QP handle is released by the caller. The underlying shared QP is not destroyed until all internal references are released.

Definition at line 823 of file verbs.c.

struct ib_ah* ib_create_ah ( struct ib_pd pd,
struct ib_ah_attr ah_attr 
)
read

ib_create_ah - Creates an address handle for the given address vector. : The protection domain associated with the address handle. : The attributes of the address vector.

The address handle is used to reference a local or global destination in all UD QP post sends.

Definition at line 169 of file verbs.c.

struct ib_ah* ib_create_ah_from_wc ( struct ib_pd pd,
struct ib_wc wc,
struct ib_grh grh,
u8  port_num 
)
read

ib_create_ah_from_wc - Creates an address handle associated with the sender of the specified work completion. : The protection domain associated with the address handle. : Work completion information associated with a received message. : References the received global route header. This parameter is ignored unless the work completion indicates that the GRH is valid. : The outbound port number to associate with the address.

The address handle is used to reference a local or global destination in all UD QP post sends.

Definition at line 218 of file verbs.c.

struct ib_cq* ib_create_cq ( struct ib_device device,
ib_comp_handler  comp_handler,
void(*)(struct ib_event *, void *)  event_handler,
void cq_context,
int  cqe,
int  comp_vector 
)
read

ib_create_cq - Creates a CQ on the specified device. : The device on which to create the CQ. : A user-specified callback that is invoked when a completion event occurs on the CQ. : A user-specified callback that is invoked when an asynchronous event not associated with a completion occurs on the CQ. : Context associated with the CQ returned to the user via the associated completion and event handlers. : The minimum size of the CQ. - Completion vector used to signal completion events. Must be >= 0 and < context->num_comp_vectors.

Users can examine the cq structure to determine the actual CQ size.

Definition at line 907 of file verbs.c.

struct ib_qp* ib_create_qp ( struct ib_pd pd,
struct ib_qp_init_attr qp_init_attr 
)
read

ib_create_qp - Creates a QP associated with the specified protection domain. : The protection domain associated with the QP. : A list of initial attributes required to create the QP. If QP creation succeeds, then the attributes are updated to the actual capabilities of the created QP.

Definition at line 409 of file verbs.c.

struct ib_srq* ib_create_srq ( struct ib_pd pd,
struct ib_srq_init_attr srq_init_attr 
)
read

ib_create_srq - Creates a SRQ associated with the specified protection domain. : The protection domain associated with the SRQ. : A list of initial attributes required to create the SRQ. If SRQ creation succeeds, then the attributes are updated to the actual capabilities of the created SRQ.

srq_attr->max_wr and srq_attr->max_sge are read the determine the requested size of the SRQ, and set to the actual values allocated on return. If ib_create_srq() succeeds, then max_wr and max_sge will always be at least as large as the requested values.

Definition at line 264 of file verbs.c.

void ib_dealloc_device ( struct ib_device device)

ib_dealloc_device - free an IB device struct :structure to free

Free a structure allocated with ib_alloc_device().

Definition at line 190 of file device.c.

int ib_dealloc_fmr ( struct ib_fmr fmr)

ib_dealloc_fmr - Deallocates a fast memory region. : The fast memory region to deallocate.

Definition at line 1169 of file verbs.c.

int ib_dealloc_mw ( struct ib_mw mw)

ib_dealloc_mw - Deallocates a memory window. : The memory window to deallocate.

Definition at line 1121 of file verbs.c.

int ib_dealloc_pd ( struct ib_pd pd)

ib_dealloc_pd - Deallocates a protection domain. : The protection domain to deallocate.

Definition at line 158 of file verbs.c.

int ib_dealloc_xrcd ( struct ib_xrcd xrcd)

ib_dealloc_xrcd - Deallocates an XRC domain. : The XRC domain to deallocate.

Definition at line 1237 of file verbs.c.

int ib_dereg_mr ( struct ib_mr mr)

ib_dereg_mr - Deregisters a memory region and removes it from the HCA translation table. : The memory region to deregister.

Definition at line 1037 of file verbs.c.

int ib_destroy_ah ( struct ib_ah ah)

ib_destroy_ah - Destroys an address handle. : The address handle to destroy.

Definition at line 248 of file verbs.c.

int ib_destroy_cq ( struct ib_cq cq)

ib_destroy_cq - Destroys the specified CQ. : The CQ to destroy.

Definition at line 936 of file verbs.c.

int ib_destroy_qp ( struct ib_qp qp)

ib_destroy_qp - Destroys the specified QP. : The QP to destroy.

Definition at line 871 of file verbs.c.

int ib_destroy_srq ( struct ib_srq srq)

ib_destroy_srq - Destroys the specified SRQ. : The SRQ to destroy.

Definition at line 313 of file verbs.c.

int ib_detach_mcast ( struct ib_qp qp,
union ib_gid gid,
u16  lid 
)

ib_detach_mcast - Detaches the specified QP from a multicast group. : QP to detach from the multicast group. : Multicast group GID. : Multicast group LID in host byte order.

Definition at line 1201 of file verbs.c.

void ib_dispatch_event ( struct ib_event event)

ib_dispatch_event - Dispatch an asynchronous event :Event to dispatch

Low-level drivers must call ib_dispatch_event() to dispatch the event to all registered event handlers when an asynchronous event occurs.

Definition at line 536 of file device.c.

int ib_find_gid ( struct ib_device device,
union ib_gid gid,
u8 port_num,
u16 index 
)

ib_find_gid - Returns the port number and GID table index where a specified GID value occurs. : The device to query. : The GID value to search for. : The port number of the device where the GID value was found. : The index into the GID table where the GID was found. This parameter may be NULL.

Definition at line 673 of file device.c.

int ib_find_pkey ( struct ib_device device,
u8  port_num,
u16  pkey,
u16 index 
)

ib_find_pkey - Returns the PKey table index where a specified PKey value occurs. : The device to query. : The port number of the device to search for the PKey. : The PKey value to search for. : The index into the PKey table where the PKey was found.

Definition at line 705 of file device.c.

void ib_free_fast_reg_page_list ( struct ib_fast_reg_page_list page_list)

ib_free_fast_reg_page_list - Deallocates a previously allocated page list array. - struct ib_fast_reg_page_list pointer to be deallocated.

Definition at line 1094 of file verbs.c.

void* ib_get_client_data ( struct ib_device device,
struct ib_client client 
)

ib_get_client_data - Get IB client context :Device to get context for :Client to get context for

ib_get_client_data() returns client context set with ib_set_client_data().

Definition at line 439 of file device.c.

struct ib_mr* ib_get_dma_mr ( struct ib_pd pd,
int  mr_access_flags 
)
read

ib_get_dma_mr - Returns a memory region for system memory that is usable for DMA. : The protection domain associated with the memory region. : Specifies the memory access rights.

Note that the ib_dma_*() functions defined below must be used to create/destroy addresses used with the Lkey or Rkey returned by ib_get_dma_mr().

Definition at line 954 of file verbs.c.

int ib_init_ah_from_wc ( struct ib_device device,
u8  port_num,
struct ib_wc wc,
struct ib_grh grh,
struct ib_ah_attr ah_attr 
)

ib_init_ah_from_wc - Initializes address handle attributes from a work completion. : Device on which the received message arrived. : Port on which the received message arrived. : Work completion associated with the received message. : References the received global route header. This parameter is ignored unless the work completion indicates that the GRH is valid. : Returned attributes that can be used when creating an address handle for replying to the message.

Definition at line 186 of file verbs.c.

int ib_modify_ah ( struct ib_ah ah,
struct ib_ah_attr ah_attr 
)

ib_modify_ah - Modifies the address vector associated with an address handle. : The address handle to modify. : The new address vector attributes to associate with the address handle.

Definition at line 232 of file verbs.c.

int ib_modify_cq ( struct ib_cq cq,
u16  cq_count,
u16  cq_period 
)

ib_modify_cq - Modifies moderation params of the CQ : The CQ to modify. : number of CQEs that will trigger an event : max period of time in usec before triggering an event

Definition at line 929 of file verbs.c.

int ib_modify_device ( struct ib_device device,
int  device_modify_mask,
struct ib_device_modify device_modify 
)

ib_modify_device - Change IB device attributes :Device to modify :Mask of attributes to change :New attribute values

ib_modify_device() changes a device's attributes as specified by the and structure.

Definition at line 626 of file device.c.

int ib_modify_port ( struct ib_device device,
u8  port_num,
int  port_modify_mask,
struct ib_port_modify port_modify 
)

ib_modify_port - Modifies the attributes for the specified port. : The device to modify. : The number of the port to modify. : Mask used to specify which attributes of the port to change. : New attribute values for the port.

ib_modify_port() changes a port's attributes as specified by the and structure.

Definition at line 649 of file device.c.

int ib_modify_qp ( struct ib_qp qp,
struct ib_qp_attr qp_attr,
int  qp_attr_mask 
)

ib_modify_qp - Modifies the attributes for the specified QP and then transitions the QP to the given state. : The QP to modify. : On input, specifies the QP attributes to modify. On output, the current values of selected QP attributes are returned. : A bit-mask used to specify which attributes of the QP are being modified.

Definition at line 804 of file verbs.c.

int ib_modify_qp_is_ok ( enum ib_qp_state  cur_state,
enum ib_qp_state  next_state,
enum ib_qp_type  type,
enum ib_qp_attr_mask  mask 
)

ib_modify_qp_is_ok - Check that the supplied attribute mask contains all required attributes and no attributes not allowed for the given QP state transition. : Current QP state : Next QP state : QP type : Mask of supplied QP attributes

This function is a helper function that a low-level driver's modify_qp method can use to validate the consumer's input. It checks that cur_state and next_state are valid QP states, that a transition from cur_state to next_state is allowed by the IB spec, and that the attribute mask supplied is allowed for the transition.

Definition at line 774 of file verbs.c.

int ib_modify_srq ( struct ib_srq srq,
struct ib_srq_attr srq_attr,
enum ib_srq_attr_mask  srq_attr_mask 
)

ib_modify_srq - Modifies the attributes for the specified SRQ. : The SRQ to modify. : On input, specifies the SRQ attributes to modify. On output, the current values of selected SRQ attributes are returned. : A bit-mask used to specify which attributes of the SRQ are being modified.

The mask may contain IB_SRQ_MAX_WR to resize the SRQ and/or IB_SRQ_LIMIT to set the SRQ's limit and request notification when the number of receives queued drops below the limit.

Definition at line 295 of file verbs.c.

struct ib_qp* ib_open_qp ( struct ib_xrcd xrcd,
struct ib_qp_open_attr qp_open_attr 
)
read

ib_open_qp - Obtain a reference to an existing sharable QP. - XRC domain : Attributes identifying the QP to open.

Returns a reference to a sharable QP.

Definition at line 387 of file verbs.c.

int ib_peek_cq ( struct ib_cq cq,
int  wc_cnt 
)

ib_peek_cq - Returns the number of unreaped completions currently on the specified CQ. : The CQ to peek. : A minimum number of unreaped completions to check for.

If the number of unreaped completions is greater than or equal to wc_cnt, this function returns wc_cnt, otherwise, it returns the actual number of unreaped completions.

int ib_query_ah ( struct ib_ah ah,
struct ib_ah_attr ah_attr 
)

ib_query_ah - Queries the address vector associated with an address handle. : The address handle to query. : The address vector attributes associated with the address handle.

Definition at line 240 of file verbs.c.

int ib_query_device ( struct ib_device device,
struct ib_device_attr device_attr 
)

ib_query_device - Query IB device attributes :Device to query :Device attributes

ib_query_device() returns the attributes of a device through the pointer.

Definition at line 558 of file device.c.

int ib_query_gid ( struct ib_device device,
u8  port_num,
int  index,
union ib_gid gid 
)

ib_query_gid - Get GID table entry :Device to query :Port number to query :GID table index to query :Returned GID

ib_query_gid() fetches the specified GID table entry.

Definition at line 594 of file device.c.

int ib_query_mr ( struct ib_mr mr,
struct ib_mr_attr mr_attr 
)

ib_query_mr - Retrieves information about a specific memory region. : The memory region to retrieve information about. : The attributes of the specified memory region.

Definition at line 1030 of file verbs.c.

int ib_query_pkey ( struct ib_device device,
u8  port_num,
u16  index,
u16 pkey 
)

ib_query_pkey - Get P_Key table entry :Device to query :Port number to query :P_Key table index to query :Returned P_Key

ib_query_pkey() fetches the specified P_Key table entry.

Definition at line 610 of file device.c.

int ib_query_port ( struct ib_device device,
u8  port_num,
struct ib_port_attr port_attr 
)

ib_query_port - Query IB port attributes :Device to query :Port number to query :Port attributes

ib_query_port() returns the attributes of a port through the pointer.

Definition at line 574 of file device.c.

int ib_query_qp ( struct ib_qp qp,
struct ib_qp_attr qp_attr,
int  qp_attr_mask,
struct ib_qp_init_attr qp_init_attr 
)

ib_query_qp - Returns the attribute list and current values for the specified QP. : The QP to query. : The attributes of the specified QP. : A bit-mask used to select specific attributes to query. : Additional attributes of the selected QP.

The qp_attr_mask may be used to limit the query to gathering only the selected attributes.

Definition at line 812 of file verbs.c.

int ib_query_srq ( struct ib_srq srq,
struct ib_srq_attr srq_attr 
)

ib_query_srq - Returns the attribute list and current values for the specified SRQ. : The SRQ to query. : The attributes of the specified SRQ.

Definition at line 305 of file verbs.c.

int ib_rate_to_mbps ( enum ib_rate  rate) const

ib_rate_to_mbps - Convert the IB rate enum to Mbps. For example, IB_RATE_2_5_GBPS will be converted to 2500. : rate to convert.

Definition at line 82 of file verbs.c.

int ib_rate_to_mult ( enum ib_rate  rate) const

ib_rate_to_mult - Convert the IB rate enum to a multiple of the base rate of 2.5 Gbit/sec. For example, IB_RATE_5_GBPS will be converted to 2, since 5 Gbit/sec is 2 * 2.5 Gbit/sec. : rate to convert.

Definition at line 48 of file verbs.c.

struct ib_mr* ib_reg_phys_mr ( struct ib_pd pd,
struct ib_phys_buf phys_buf_array,
int  num_phys_buf,
int  mr_access_flags,
u64 iova_start 
)
read

ib_reg_phys_mr - Prepares a virtually addressed memory region for use by an HCA. : The protection domain associated assigned to the registered region. : Specifies a list of physical buffers to use in the memory region. : Specifies the size of the phys_buf_array. : Specifies the memory access rights. : The offset of the region's starting I/O virtual address.

Definition at line 972 of file verbs.c.

int ib_register_client ( struct ib_client client)

ib_register_client - Register an IB client :Client to register

Upper level users of the IB drivers can use ib_register_client() to register callbacks for IB device addition and removal. When an IB device is added, each registered client's add method will be called (in the order the clients were registered), and when a device is removed, each client's remove method will be called (in the reverse order that clients were registered). In addition, when ib_register_client() is called, the client will receive an add callback for all devices already registered.

Definition at line 380 of file device.c.

int ib_register_device ( struct ib_device device,
int(*)(struct ib_device *, u8, struct kobject *)  port_callback 
)

ib_register_device - Register an IB device with IB core :Device to register

Low-level drivers use ib_register_device() to register their devices with the IB core. All registered clients will receive a callback for each device that is added. must be allocated with ib_alloc_device().

Definition at line 273 of file device.c.

int ib_register_event_handler ( struct ib_event_handler event_handler)

ib_register_event_handler - Register an IB event handler :Handler to register

ib_register_event_handler() registers an event handler that will be called back when asynchronous IB events occur (as defined in chapter 11 of the InfiniBand Architecture Specification). This callback may occur in interrupt context.

Definition at line 496 of file device.c.

int ib_rereg_phys_mr ( struct ib_mr mr,
int  mr_rereg_mask,
struct ib_pd pd,
struct ib_phys_buf phys_buf_array,
int  num_phys_buf,
int  mr_access_flags,
u64 iova_start 
)

ib_rereg_phys_mr - Modifies the attributes of an existing memory region. Conceptually, this call performs the functions deregister memory region followed by register physical memory region. Where possible, resources are reused instead of deallocated and reallocated. : The memory region to modify. : A bit-mask used to indicate which of the following properties of the memory region are being modified. : If IB_MR_REREG_PD is set in mr_rereg_mask, this field specifies the new protection domain to associated with the memory region, otherwise, this parameter is ignored. : If IB_MR_REREG_TRANS is set in mr_rereg_mask, this field specifies a list of physical buffers to use in the new translation, otherwise, this parameter is ignored. : If IB_MR_REREG_TRANS is set in mr_rereg_mask, this field specifies the size of the phys_buf_array, otherwise, this parameter is ignored. : If IB_MR_REREG_ACCESS is set in mr_rereg_mask, this field specifies the new memory access rights, otherwise, this parameter is ignored. : The offset of the region's starting I/O virtual address.

Definition at line 998 of file verbs.c.

int ib_resize_cq ( struct ib_cq cq,
int  cqe 
)

ib_resize_cq - Modifies the capacity of the CQ. : The CQ to resize. : The minimum size of the CQ.

Users can examine the cq structure to determine the actual CQ size.

Definition at line 945 of file verbs.c.

void ib_set_client_data ( struct ib_device device,
struct ib_client client,
void data 
)

ib_set_client_data - Set IB client context :Device to set context for :Client to set context for :Context to set

ib_set_client_data() sets client context that can be retrieved with ib_get_client_data().

Definition at line 466 of file device.c.

int ib_unmap_fmr ( struct list_head fmr_list)

ib_unmap_fmr - Removes the mapping from a list of fast memory regions. : A linked list of fast memory regions to unmap.

Definition at line 1157 of file verbs.c.

void ib_unregister_client ( struct ib_client client)

ib_unregister_client - Unregister an IB client :Client to unregister

Upper level users use ib_unregister_client() to remove their client registration. When ib_unregister_client() is called, the client will receive a remove callback for each IB device still registered.

Definition at line 405 of file device.c.

void ib_unregister_device ( struct ib_device device)

ib_unregister_device - Unregister an IB device :Device to unregister

Unregister an IB device. All clients will receive a remove callback.

Definition at line 337 of file device.c.

int ib_unregister_event_handler ( struct ib_event_handler event_handler)

ib_unregister_event_handler - Unregister an event handler :Handler to unregister

Unregister an event handler registered with ib_register_event_handler().

Definition at line 516 of file device.c.

enum ib_rate mult_to_ib_rate ( int  mult) const

mult_to_ib_rate - Convert a multiple of 2.5 Gbit/sec to an IB rate enum. : multiple to convert.

Definition at line 65 of file verbs.c.

enum rdma_transport_type rdma_node_get_transport ( enum rdma_node_type  node_type) const

Definition at line 108 of file verbs.c.

enum rdma_link_layer rdma_port_get_link_layer ( struct ib_device device,
u8  port_num 
)

Definition at line 124 of file verbs.c.

Variable Documentation

Definition at line 55 of file device.c.