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_mad.h File Reference
#include <linux/list.h>
#include <rdma/ib_verbs.h>

Go to the source code of this file.

Data Structures

struct  ib_mad_hdr
 
struct  ib_rmpp_hdr
 
struct  ib_sa_hdr
 
struct  ib_mad
 
struct  ib_rmpp_mad
 
struct  ib_sa_mad
 
struct  ib_vendor_mad
 
struct  ib_class_port_info
 
struct  ib_mad_send_buf
 
struct  ib_mad_agent
 
struct  ib_mad_send_wc
 
struct  ib_mad_recv_buf
 
struct  ib_mad_recv_wc
 
struct  ib_mad_reg_req
 

Macros

#define IB_MGMT_BASE_VERSION   1
 
#define IB_MGMT_CLASS_SUBN_LID_ROUTED   0x01
 
#define IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE   0x81
 
#define IB_MGMT_CLASS_SUBN_ADM   0x03
 
#define IB_MGMT_CLASS_PERF_MGMT   0x04
 
#define IB_MGMT_CLASS_BM   0x05
 
#define IB_MGMT_CLASS_DEVICE_MGMT   0x06
 
#define IB_MGMT_CLASS_CM   0x07
 
#define IB_MGMT_CLASS_SNMP   0x08
 
#define IB_MGMT_CLASS_DEVICE_ADM   0x10
 
#define IB_MGMT_CLASS_BOOT_MGMT   0x11
 
#define IB_MGMT_CLASS_BIS   0x12
 
#define IB_MGMT_CLASS_CONG_MGMT   0x21
 
#define IB_MGMT_CLASS_VENDOR_RANGE2_START   0x30
 
#define IB_MGMT_CLASS_VENDOR_RANGE2_END   0x4F
 
#define IB_OPENIB_OUI   (0x001405)
 
#define IB_MGMT_METHOD_GET   0x01
 
#define IB_MGMT_METHOD_SET   0x02
 
#define IB_MGMT_METHOD_GET_RESP   0x81
 
#define IB_MGMT_METHOD_SEND   0x03
 
#define IB_MGMT_METHOD_TRAP   0x05
 
#define IB_MGMT_METHOD_REPORT   0x06
 
#define IB_MGMT_METHOD_REPORT_RESP   0x86
 
#define IB_MGMT_METHOD_TRAP_REPRESS   0x07
 
#define IB_MGMT_METHOD_RESP   0x80
 
#define IB_BM_ATTR_MOD_RESP   cpu_to_be32(1)
 
#define IB_MGMT_MAX_METHODS   128
 
#define IB_MGMT_MAD_STATUS_SUCCESS   0x0000
 
#define IB_MGMT_MAD_STATUS_BUSY   0x0001
 
#define IB_MGMT_MAD_STATUS_REDIRECT_REQD   0x0002
 
#define IB_MGMT_MAD_STATUS_BAD_VERSION   0x0004
 
#define IB_MGMT_MAD_STATUS_UNSUPPORTED_METHOD   0x0008
 
#define IB_MGMT_MAD_STATUS_UNSUPPORTED_METHOD_ATTRIB   0x000c
 
#define IB_MGMT_MAD_STATUS_INVALID_ATTRIB_VALUE   0x001c
 
#define IB_MGMT_RMPP_VERSION   1
 
#define IB_MGMT_RMPP_TYPE_DATA   1
 
#define IB_MGMT_RMPP_TYPE_ACK   2
 
#define IB_MGMT_RMPP_TYPE_STOP   3
 
#define IB_MGMT_RMPP_TYPE_ABORT   4
 
#define IB_MGMT_RMPP_FLAG_ACTIVE   1
 
#define IB_MGMT_RMPP_FLAG_FIRST   (1<<1)
 
#define IB_MGMT_RMPP_FLAG_LAST   (1<<2)
 
#define IB_MGMT_RMPP_NO_RESPTIME   0x1F
 
#define IB_MGMT_RMPP_STATUS_SUCCESS   0
 
#define IB_MGMT_RMPP_STATUS_RESX   1
 
#define IB_MGMT_RMPP_STATUS_ABORT_MIN   118
 
#define IB_MGMT_RMPP_STATUS_T2L   118
 
#define IB_MGMT_RMPP_STATUS_BAD_LEN   119
 
#define IB_MGMT_RMPP_STATUS_BAD_SEG   120
 
#define IB_MGMT_RMPP_STATUS_BADT   121
 
#define IB_MGMT_RMPP_STATUS_W2S   122
 
#define IB_MGMT_RMPP_STATUS_S2B   123
 
#define IB_MGMT_RMPP_STATUS_BAD_STATUS   124
 
#define IB_MGMT_RMPP_STATUS_UNV   125
 
#define IB_MGMT_RMPP_STATUS_TMR   126
 
#define IB_MGMT_RMPP_STATUS_UNSPEC   127
 
#define IB_MGMT_RMPP_STATUS_ABORT_MAX   127
 
#define IB_QP0   0
 
#define IB_QP1   cpu_to_be32(1)
 
#define IB_QP1_QKEY   0x80010000
 
#define IB_QP_SET_QKEY   0x80000000
 
#define IB_DEFAULT_PKEY_PARTIAL   0x7FFF
 
#define IB_DEFAULT_PKEY_FULL   0xFFFF
 
#define IB_SA_COMP_MASK(n)   ((__force ib_sa_comp_mask) cpu_to_be64(1ull << (n)))
 

Typedefs

typedef u64 __bitwise ib_sa_comp_mask
 
typedef void(* ib_mad_send_handler )(struct ib_mad_agent *mad_agent, struct ib_mad_send_wc *mad_send_wc)
 
typedef void(* ib_mad_snoop_handler )(struct ib_mad_agent *mad_agent, struct ib_mad_send_buf *send_buf, struct ib_mad_send_wc *mad_send_wc)
 
typedef void(* ib_mad_recv_handler )(struct ib_mad_agent *mad_agent, struct ib_mad_recv_wc *mad_recv_wc)
 

Enumerations

enum  {
  IB_MGMT_MAD_HDR = 24, IB_MGMT_MAD_DATA = 232, IB_MGMT_RMPP_HDR = 36, IB_MGMT_RMPP_DATA = 220,
  IB_MGMT_VENDOR_HDR = 40, IB_MGMT_VENDOR_DATA = 216, IB_MGMT_SA_HDR = 56, IB_MGMT_SA_DATA = 200,
  IB_MGMT_DEVICE_HDR = 64, IB_MGMT_DEVICE_DATA = 192
}
 
enum  ib_mad_snoop_flags { IB_MAD_SNOOP_SEND_COMPLETIONS = (1<<2), IB_MAD_SNOOP_RECVS = (1<<4) }
 

Functions

struct ib_sa_hdr __attribute__ ((packed))
 
int ib_response_mad (struct ib_mad *mad)
 
struct ib_mad_agentib_register_mad_agent (struct ib_device *device, u8 port_num, enum ib_qp_type qp_type, struct ib_mad_reg_req *mad_reg_req, u8 rmpp_version, ib_mad_send_handler send_handler, ib_mad_recv_handler recv_handler, void *context)
 
struct ib_mad_agentib_register_mad_snoop (struct ib_device *device, u8 port_num, enum ib_qp_type qp_type, int mad_snoop_flags, ib_mad_snoop_handler snoop_handler, ib_mad_recv_handler recv_handler, void *context)
 
int ib_unregister_mad_agent (struct ib_mad_agent *mad_agent)
 
int ib_post_send_mad (struct ib_mad_send_buf *send_buf, struct ib_mad_send_buf **bad_send_buf)
 
void ib_free_recv_mad (struct ib_mad_recv_wc *mad_recv_wc)
 
void ib_cancel_mad (struct ib_mad_agent *mad_agent, struct ib_mad_send_buf *send_buf)
 
int ib_modify_mad (struct ib_mad_agent *mad_agent, struct ib_mad_send_buf *send_buf, u32 timeout_ms)
 
struct ib_mad_agentib_redirect_mad_qp (struct ib_qp *qp, u8 rmpp_version, ib_mad_send_handler send_handler, ib_mad_recv_handler recv_handler, void *context)
 
int ib_process_mad_wc (struct ib_mad_agent *mad_agent, struct ib_wc *wc)
 
struct ib_mad_send_bufib_create_send_mad (struct ib_mad_agent *mad_agent, u32 remote_qpn, u16 pkey_index, int rmpp_active, int hdr_len, int data_len, gfp_t gfp_mask)
 
int ib_is_mad_class_rmpp (u8 mgmt_class)
 
int ib_get_mad_data_offset (u8 mgmt_class)
 
voidib_get_rmpp_segment (struct ib_mad_send_buf *send_buf, int seg_num)
 
void ib_free_send_mad (struct ib_mad_send_buf *send_buf)
 

Variables

__be64 sm_key
 
__be16 attr_offset
 
__be16 reserved
 
ib_sa_comp_mask comp_mask
 
struct ib_mad __attribute__
 
struct ib_mad_hdr mad_hdr
 
struct ib_rmpp_hdr rmpp_hdr
 
struct ib_sa_hdr sa_hdr
 
u8 data [IB_MGMT_SA_DATA]
 

Macro Definition Documentation

#define IB_BM_ATTR_MOD_RESP   cpu_to_be32(1)

Definition at line 76 of file ib_mad.h.

#define IB_DEFAULT_PKEY_FULL   0xFFFF

Definition at line 124 of file ib_mad.h.

#define IB_DEFAULT_PKEY_PARTIAL   0x7FFF

Definition at line 123 of file ib_mad.h.

#define IB_MGMT_BASE_VERSION   1

Definition at line 45 of file ib_mad.h.

#define IB_MGMT_CLASS_BIS   0x12

Definition at line 58 of file ib_mad.h.

#define IB_MGMT_CLASS_BM   0x05

Definition at line 52 of file ib_mad.h.

#define IB_MGMT_CLASS_BOOT_MGMT   0x11

Definition at line 57 of file ib_mad.h.

#define IB_MGMT_CLASS_CM   0x07

Definition at line 54 of file ib_mad.h.

#define IB_MGMT_CLASS_CONG_MGMT   0x21

Definition at line 59 of file ib_mad.h.

#define IB_MGMT_CLASS_DEVICE_ADM   0x10

Definition at line 56 of file ib_mad.h.

#define IB_MGMT_CLASS_DEVICE_MGMT   0x06

Definition at line 53 of file ib_mad.h.

#define IB_MGMT_CLASS_PERF_MGMT   0x04

Definition at line 51 of file ib_mad.h.

#define IB_MGMT_CLASS_SNMP   0x08

Definition at line 55 of file ib_mad.h.

#define IB_MGMT_CLASS_SUBN_ADM   0x03

Definition at line 50 of file ib_mad.h.

#define IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE   0x81

Definition at line 49 of file ib_mad.h.

#define IB_MGMT_CLASS_SUBN_LID_ROUTED   0x01

Definition at line 48 of file ib_mad.h.

#define IB_MGMT_CLASS_VENDOR_RANGE2_END   0x4F

Definition at line 61 of file ib_mad.h.

#define IB_MGMT_CLASS_VENDOR_RANGE2_START   0x30

Definition at line 60 of file ib_mad.h.

#define IB_MGMT_MAD_STATUS_BAD_VERSION   0x0004

Definition at line 84 of file ib_mad.h.

#define IB_MGMT_MAD_STATUS_BUSY   0x0001

Definition at line 82 of file ib_mad.h.

#define IB_MGMT_MAD_STATUS_INVALID_ATTRIB_VALUE   0x001c

Definition at line 87 of file ib_mad.h.

#define IB_MGMT_MAD_STATUS_REDIRECT_REQD   0x0002

Definition at line 83 of file ib_mad.h.

#define IB_MGMT_MAD_STATUS_SUCCESS   0x0000

Definition at line 81 of file ib_mad.h.

#define IB_MGMT_MAD_STATUS_UNSUPPORTED_METHOD   0x0008

Definition at line 85 of file ib_mad.h.

#define IB_MGMT_MAD_STATUS_UNSUPPORTED_METHOD_ATTRIB   0x000c

Definition at line 86 of file ib_mad.h.

#define IB_MGMT_MAX_METHODS   128

Definition at line 78 of file ib_mad.h.

#define IB_MGMT_METHOD_GET   0x01

Definition at line 66 of file ib_mad.h.

#define IB_MGMT_METHOD_GET_RESP   0x81

Definition at line 68 of file ib_mad.h.

#define IB_MGMT_METHOD_REPORT   0x06

Definition at line 71 of file ib_mad.h.

#define IB_MGMT_METHOD_REPORT_RESP   0x86

Definition at line 72 of file ib_mad.h.

#define IB_MGMT_METHOD_RESP   0x80

Definition at line 75 of file ib_mad.h.

#define IB_MGMT_METHOD_SEND   0x03

Definition at line 69 of file ib_mad.h.

#define IB_MGMT_METHOD_SET   0x02

Definition at line 67 of file ib_mad.h.

#define IB_MGMT_METHOD_TRAP   0x05

Definition at line 70 of file ib_mad.h.

#define IB_MGMT_METHOD_TRAP_REPRESS   0x07

Definition at line 73 of file ib_mad.h.

#define IB_MGMT_RMPP_FLAG_ACTIVE   1

Definition at line 97 of file ib_mad.h.

#define IB_MGMT_RMPP_FLAG_FIRST   (1<<1)

Definition at line 98 of file ib_mad.h.

#define IB_MGMT_RMPP_FLAG_LAST   (1<<2)

Definition at line 99 of file ib_mad.h.

#define IB_MGMT_RMPP_NO_RESPTIME   0x1F

Definition at line 101 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_ABORT_MAX   127

Definition at line 116 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_ABORT_MIN   118

Definition at line 105 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_BAD_LEN   119

Definition at line 107 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_BAD_SEG   120

Definition at line 108 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_BAD_STATUS   124

Definition at line 112 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_BADT   121

Definition at line 109 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_RESX   1

Definition at line 104 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_S2B   123

Definition at line 111 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_SUCCESS   0

Definition at line 103 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_T2L   118

Definition at line 106 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_TMR   126

Definition at line 114 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_UNSPEC   127

Definition at line 115 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_UNV   125

Definition at line 113 of file ib_mad.h.

#define IB_MGMT_RMPP_STATUS_W2S   122

Definition at line 110 of file ib_mad.h.

#define IB_MGMT_RMPP_TYPE_ABORT   4

Definition at line 95 of file ib_mad.h.

#define IB_MGMT_RMPP_TYPE_ACK   2

Definition at line 93 of file ib_mad.h.

#define IB_MGMT_RMPP_TYPE_DATA   1

Definition at line 92 of file ib_mad.h.

#define IB_MGMT_RMPP_TYPE_STOP   3

Definition at line 94 of file ib_mad.h.

#define IB_MGMT_RMPP_VERSION   1

Definition at line 90 of file ib_mad.h.

#define IB_OPENIB_OUI   (0x001405)

Definition at line 63 of file ib_mad.h.

#define IB_QP0   0

Definition at line 118 of file ib_mad.h.

#define IB_QP1   cpu_to_be32(1)

Definition at line 119 of file ib_mad.h.

#define IB_QP1_QKEY   0x80010000

Definition at line 120 of file ib_mad.h.

#define IB_QP_SET_QKEY   0x80000000

Definition at line 121 of file ib_mad.h.

#define IB_SA_COMP_MASK (   n)    ((__force ib_sa_comp_mask) cpu_to_be64(1ull << (n)))

Definition at line 163 of file ib_mad.h.

Typedef Documentation

typedef void(* ib_mad_recv_handler)(struct ib_mad_agent *mad_agent, struct ib_mad_recv_wc *mad_recv_wc)

ib_mad_recv_handler - callback handler for a received MAD. : MAD agent requesting the received MAD. : Received work completion information on the received MAD.

MADs received in response to a send request operation will be handed to the user before the send operation completes. All data buffers given to registered agents through this routine are owned by the receiving client, except for snooping agents. Clients snooping MADs should not modify the data referenced by .

Definition at line 343 of file ib_mad.h.

typedef void(* ib_mad_send_handler)(struct ib_mad_agent *mad_agent, struct ib_mad_send_wc *mad_send_wc)

ib_mad_send_handler - callback handler for a sent MAD. : MAD agent that sent the MAD. : Send work completion information on the sent MAD.

Definition at line 315 of file ib_mad.h.

typedef void(* ib_mad_snoop_handler)(struct ib_mad_agent *mad_agent, struct ib_mad_send_buf *send_buf, struct ib_mad_send_wc *mad_send_wc)

ib_mad_snoop_handler - Callback handler for snooping sent MADs. : MAD agent that snooped the MAD. : Work request information on the sent MAD. : Work completion information on the sent MAD. Valid only for snooping that occurs on a send completion.

Clients snooping MADs should not modify data referenced by the or .

Definition at line 328 of file ib_mad.h.

Definition at line 161 of file ib_mad.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
IB_MGMT_MAD_HDR 
IB_MGMT_MAD_DATA 
IB_MGMT_RMPP_HDR 
IB_MGMT_RMPP_DATA 
IB_MGMT_VENDOR_HDR 
IB_MGMT_VENDOR_DATA 
IB_MGMT_SA_HDR 
IB_MGMT_SA_DATA 
IB_MGMT_DEVICE_HDR 
IB_MGMT_DEVICE_DATA 

Definition at line 126 of file ib_mad.h.

Enumerator:
IB_MAD_SNOOP_SEND_COMPLETIONS 
IB_MAD_SNOOP_RECVS 

Definition at line 464 of file ib_mad.h.

Function Documentation

struct ib_sa_hdr __attribute__ ( (packed)  )
read

mcontroller : adapter info structure for old mimd_t apps

: base address : irq number : number of logical drives : pci bus : pci device : pci function : pci id : vendor id : slot number : unique id

Definition at line 171 of file esd_usb2.c.

void ib_cancel_mad ( struct ib_mad_agent mad_agent,
struct ib_mad_send_buf send_buf 
)

ib_cancel_mad - Cancels an outstanding send MAD operation. : Specifies the registration associated with sent MAD. : Indicates the MAD to cancel.

MADs will be returned to the user through the corresponding ib_mad_send_handler.

Definition at line 2371 of file mad.c.

struct ib_mad_send_buf* ib_create_send_mad ( struct ib_mad_agent mad_agent,
u32  remote_qpn,
u16  pkey_index,
int  rmpp_active,
int  hdr_len,
int  data_len,
gfp_t  gfp_mask 
)
read

ib_create_send_mad - Allocate and initialize a data buffer and work request for sending a MAD. : Specifies the registered MAD service to associate with the MAD. : Specifies the QPN of the receiving node. : Specifies which PKey the MAD will be sent using. This field is valid only if the remote_qpn is QP 1. : Indicates if the send will enable RMPP. : Indicates the size of the data header of the MAD. This length should include the common MAD header, RMPP header, plus any class specific header. : Indicates the size of any user-transferred data. The call will automatically adjust the allocated buffer size to account for any additional padding that may be necessary. : GFP mask used for the memory allocation.

This routine allocates a MAD for sending. The returned MAD send buffer will reference a data buffer usable for sending a MAD, along with an initialized work request structure. Users may modify the returned MAD data buffer before posting the send.

The returned MAD header, class specific headers, and any padding will be cleared. Users are responsible for initializing the common MAD header, any class specific header, and MAD data area. If is set, the RMPP header will be initialized for sending.

Definition at line 865 of file mad.c.

void ib_free_recv_mad ( struct ib_mad_recv_wc mad_recv_wc)

ib_free_recv_mad - Returns data buffers used to receive a MAD. : Work completion information for a received MAD.

Clients receiving MADs through their ib_mad_recv_handler must call this routine to return the work completion buffers to the access layer.

Definition at line 1156 of file mad.c.

void ib_free_send_mad ( struct ib_mad_send_buf send_buf)

ib_free_send_mad - Returns data buffers used to send a MAD. : Previously allocated send data buffer.

Definition at line 988 of file mad.c.

int ib_get_mad_data_offset ( u8  mgmt_class)

ib_get_mad_data_offset - returns the data offset for a given management class. : management class

This routine returns the data offset in the MAD for the management class requested.

Definition at line 927 of file mad.c.

void* ib_get_rmpp_segment ( struct ib_mad_send_buf send_buf,
int  seg_num 
)

ib_get_rmpp_segment - returns the data buffer for a given RMPP segment. : Previously allocated send data buffer. : number of segment to return

This routine returns a pointer to the data buffer of an RMPP MAD. Users must provide synchronization to around this call.

Definition at line 956 of file mad.c.

int ib_is_mad_class_rmpp ( u8  mgmt_class)

ib_is_mad_class_rmpp - returns whether given management class supports RMPP. : management class

This routine returns whether the management class supports RMPP.

Definition at line 943 of file mad.c.

int ib_modify_mad ( struct ib_mad_agent mad_agent,
struct ib_mad_send_buf send_buf,
u32  timeout_ms 
)

ib_modify_mad - Modifies an outstanding send MAD operation. : Specifies the registration associated with sent MAD. : Indicates the MAD to modify. : New timeout value for sent MAD.

This call will reset the timeout value for a sent MAD to the specified value.

Definition at line 2337 of file mad.c.

int ib_post_send_mad ( struct ib_mad_send_buf send_buf,
struct ib_mad_send_buf **  bad_send_buf 
)

ib_post_send_mad - Posts MAD(s) to the send queue of the QP associated with the registered client. : Specifies the information needed to send the MAD(s). : Specifies the MAD on which an error was encountered. This parameter is optional if only a single MAD is posted.

Sent MADs are not guaranteed to complete in the order that they were posted.

If the MAD requires RMPP, the data buffer should contain a single copy of the common MAD, RMPP, and class specific headers, followed by the class defined data. If the class defined data would not divide evenly into RMPP segments, then space must be allocated at the end of the referenced buffer for any required padding. To indicate the amount of class defined data being transferred, the paylen_newwin field in the RMPP header should be set to the size of the class specific header plus the amount of class defined data being transferred. The paylen_newwin field should be specified in network-byte order.

Definition at line 1063 of file mad.c.

int ib_process_mad_wc ( struct ib_mad_agent mad_agent,
struct ib_wc wc 
)

ib_process_mad_wc - Processes a work completion associated with a MAD sent or received on a redirected QP. : Specifies the registered MAD service using the redirected QP. : References a work completion associated with a sent or received MAD segment.

This routine is used to complete or continue processing on a MAD request. If the work completion is associated with a send operation, calling this routine is required to continue an RMPP transfer or to wait for a corresponding response, if it is a request. If the work completion is associated with a receive operation, calling this routine is required to process an inbound or outbound RMPP transfer, or to match a response MAD with its corresponding request.

Definition at line 1190 of file mad.c.

struct ib_mad_agent* ib_redirect_mad_qp ( struct ib_qp qp,
u8  rmpp_version,
ib_mad_send_handler  send_handler,
ib_mad_recv_handler  recv_handler,
void context 
)
read

ib_redirect_mad_qp - Registers a QP for MAD services. : Reference to a QP that requires MAD services. : If set, indicates that the client will send and receive MADs that contain the RMPP header for the given version. If set to 0, indicates that RMPP is not used by this client. : The completion callback routine invoked after a send request has completed. : The completion callback routine invoked for a received MAD. : User specified context associated with the registration.

Use of this call allows clients to use MAD services, such as RMPP, on user-owned QPs. After calling this routine, users may send MADs on the specified QP by calling ib_mad_post_send.

Definition at line 1180 of file mad.c.

struct ib_mad_agent* ib_register_mad_agent ( struct ib_device device,
u8  port_num,
enum ib_qp_type  qp_type,
struct ib_mad_reg_req mad_reg_req,
u8  rmpp_version,
ib_mad_send_handler  send_handler,
ib_mad_recv_handler  recv_handler,
void context 
)
read

ib_register_mad_agent - Register to send/receive MADs. : The device to register with. : The port on the specified device to use. : Specifies which QP to access. Must be either IB_QPT_SMI or IB_QPT_GSI. : Specifies which unsolicited MADs should be received by the caller. This parameter may be NULL if the caller only wishes to receive solicited responses. : If set, indicates that the client will send and receive MADs that contain the RMPP header for the given version. If set to 0, indicates that RMPP is not used by this client. : The completion callback routine invoked after a send request has completed. : The completion callback routine invoked for a received MAD. : User specified context associated with the registration.

Definition at line 191 of file mad.c.

struct ib_mad_agent* ib_register_mad_snoop ( struct ib_device device,
u8  port_num,
enum ib_qp_type  qp_type,
int  mad_snoop_flags,
ib_mad_snoop_handler  snoop_handler,
ib_mad_recv_handler  recv_handler,
void context 
)
read

ib_register_mad_snoop - Register to snoop sent and received MADs. : The device to register with. : The port on the specified device to use. : Specifies which QP traffic to snoop. Must be either IB_QPT_SMI or IB_QPT_GSI. : Specifies information where snooping occurs. : The callback routine invoked for a snooped send. : The callback routine invoked for a snooped receive. : User specified context associated with the registration.

Definition at line 442 of file mad.c.

int ib_response_mad ( struct ib_mad mad)

ib_response_mad - Returns if the specified MAD has been generated in response to a sent request or trap.

Definition at line 179 of file mad.c.

int ib_unregister_mad_agent ( struct ib_mad_agent mad_agent)

ib_unregister_mad_agent - Unregisters a client from using MAD services. : Corresponding MAD registration request to deregister.

After invoking this routine, MAD services are no longer usable by the client on the associated QP.

Definition at line 569 of file mad.c.

Variable Documentation

__be16 attr_offset

Definition at line 178 of file ib_mad.h.

ib_sa_comp_mask comp_mask

Definition at line 180 of file ib_mad.h.

Definition at line 198 of file ib_mad.h.

struct ib_mad_hdr mad_hdr

Definition at line 195 of file ib_mad.h.

__be16 reserved

Definition at line 179 of file ib_mad.h.

struct ib_rmpp_hdr rmpp_hdr

Definition at line 196 of file ib_mad.h.

struct ib_sa_hdr sa_hdr

Definition at line 197 of file ib_mad.h.

__be64 sm_key

Definition at line 177 of file ib_mad.h.