Linux Kernel
3.7.1
|
#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) |
Variables | |
struct workqueue_struct * | ib_wq |
#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 | |||
) |
Definition at line 385 of file ib_verbs.h.
typedef void(* ib_comp_handler)(struct ib_cq *cq, void *cq_context) |
Definition at line 932 of file ib_verbs.h.
anonymous enum |
Definition at line 409 of file ib_verbs.h.
enum ib_access_flags |
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.
enum ib_ah_flags |
Definition at line 415 of file ib_verbs.h.
enum ib_atomic_cap |
Definition at line 120 of file ib_verbs.h.
enum ib_cq_notify_flags |
Definition at line 544 of file ib_verbs.h.
enum ib_device_cap_flags |
Definition at line 87 of file ib_verbs.h.
Definition at line 324 of file ib_verbs.h.
enum ib_event_type |
Definition at line 346 of file ib_verbs.h.
enum ib_mad_result |
Definition at line 1013 of file ib_verbs.h.
enum ib_mig_state |
Definition at line 712 of file ib_verbs.h.
enum ib_mr_rereg_flags |
Definition at line 859 of file ib_verbs.h.
enum ib_mtu |
Definition at line 169 of file ib_verbs.h.
enum ib_port_cap_flags |
Definition at line 198 of file ib_verbs.h.
enum ib_port_modify_flags |
Definition at line 334 of file ib_verbs.h.
enum ib_port_speed |
Definition at line 242 of file ib_verbs.h.
enum ib_port_state |
Definition at line 189 of file ib_verbs.h.
enum ib_port_width |
Definition at line 224 of file ib_verbs.h.
enum ib_process_mad_flags |
Definition at line 1007 of file ib_verbs.h.
enum ib_qp_attr_mask |
Definition at line 678 of file ib_verbs.h.
enum ib_qp_create_flags |
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.
enum ib_qp_state |
Definition at line 702 of file ib_verbs.h.
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 | |
IB_QPT_XRC_INI | |
IB_QPT_XRC_TGT | |
IB_QPT_MAX |
Definition at line 594 of file ib_verbs.h.
enum ib_rate |
Definition at line 419 of file ib_verbs.h.
enum ib_rnr_timeout |
Definition at line 643 of file ib_verbs.h.
enum ib_send_flags |
Definition at line 763 of file ib_verbs.h.
enum ib_sig_type |
Definition at line 589 of file ib_verbs.h.
enum ib_srq_attr_mask |
Definition at line 556 of file ib_verbs.h.
enum ib_srq_type |
Definition at line 551 of file ib_verbs.h.
enum ib_wc_flags |
Definition at line 517 of file ib_verbs.h.
enum ib_wc_opcode |
Definition at line 497 of file ib_verbs.h.
enum ib_wc_status |
Definition at line 472 of file ib_verbs.h.
enum ib_wr_opcode |
Definition at line 746 of file ib_verbs.h.
enum rdma_link_layer |
Definition at line 81 of file ib_verbs.h.
enum rdma_node_type |
Definition at line 65 of file ib_verbs.h.
enum rdma_transport_type |
Definition at line 73 of file ib_verbs.h.
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().
|
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.
|
read |
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.
|
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.
|
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.
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.
ib_dealloc_device - free an IB device struct :structure to free
Free a structure allocated with ib_alloc_device().
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.
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.
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().
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().
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.
int ib_modify_ah | ( | struct ib_ah * | ah, |
struct ib_ah_attr * | ah_attr | ||
) |
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.
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.
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.
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.
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.
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 | ||
) |
int ib_query_device | ( | struct ib_device * | device, |
struct ib_device_attr * | device_attr | ||
) |
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.
int ib_query_mr | ( | struct ib_mr * | mr, |
struct ib_mr_attr * | mr_attr | ||
) |
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.
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.
int ib_query_srq | ( | struct ib_srq * | srq, |
struct ib_srq_attr * | srq_attr | ||
) |
|
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.
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.
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().
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.
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.
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().
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.
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().
enum rdma_transport_type rdma_node_get_transport | ( | enum rdma_node_type | node_type | ) | const |
enum rdma_link_layer rdma_port_get_link_layer | ( | struct ib_device * | device, |
u8 | port_num | ||
) |
struct workqueue_struct* ib_wq |