Linux Kernel
3.7.1
|
#include <linux/dma-mapping.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <rdma/ib_cache.h>
#include "mad_priv.h"
#include "mad_rmpp.h"
#include "smi.h"
#include "agent.h"
Go to the source code of this file.
EXPORT_SYMBOL | ( | ib_response_mad | ) |
EXPORT_SYMBOL | ( | ib_register_mad_agent | ) |
EXPORT_SYMBOL | ( | ib_register_mad_snoop | ) |
EXPORT_SYMBOL | ( | ib_unregister_mad_agent | ) |
EXPORT_SYMBOL | ( | ib_create_send_mad | ) |
EXPORT_SYMBOL | ( | ib_get_mad_data_offset | ) |
EXPORT_SYMBOL | ( | ib_is_mad_class_rmpp | ) |
EXPORT_SYMBOL | ( | ib_get_rmpp_segment | ) |
EXPORT_SYMBOL | ( | ib_free_send_mad | ) |
EXPORT_SYMBOL | ( | ib_post_send_mad | ) |
EXPORT_SYMBOL | ( | ib_free_recv_mad | ) |
EXPORT_SYMBOL | ( | ib_redirect_mad_qp | ) |
EXPORT_SYMBOL | ( | ib_process_mad_wc | ) |
EXPORT_SYMBOL | ( | ib_modify_mad | ) |
EXPORT_SYMBOL | ( | ib_cancel_mad | ) |
void ib_cancel_mad | ( | struct ib_mad_agent * | mad_agent, |
struct ib_mad_send_buf * | send_buf | ||
) |
|
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.
|
read |
void ib_free_recv_mad | ( | struct ib_mad_recv_wc * | mad_recv_wc | ) |
void ib_free_send_mad | ( | struct ib_mad_send_buf * | send_buf | ) |
void* ib_get_rmpp_segment | ( | struct ib_mad_send_buf * | send_buf, |
int | seg_num | ||
) |
void ib_mad_complete_send_wr | ( | struct ib_mad_send_wr_private * | mad_send_wr, |
struct ib_mad_send_wc * | mad_send_wc | ||
) |
void ib_mark_mad_done | ( | struct ib_mad_send_wr_private * | mad_send_wr | ) |
int ib_modify_mad | ( | struct ib_mad_agent * | mad_agent, |
struct ib_mad_send_buf * | send_buf, | ||
u32 | timeout_ms | ||
) |
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.
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.
|
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.
|
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.
|
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.
void ib_reset_mad_timeout | ( | struct ib_mad_send_wr_private * | mad_send_wr, |
int | timeout_ms | ||
) |
int ib_send_mad | ( | struct ib_mad_send_wr_private * | mad_send_wr | ) |
int ib_unregister_mad_agent | ( | struct ib_mad_agent * | mad_agent | ) |
MODULE_AUTHOR | ( | "Hal Rosenstock" | ) |
MODULE_AUTHOR | ( | "Sean Hefty" | ) |
MODULE_DESCRIPTION | ( | "kernel IB MAD API" | ) |
module_exit | ( | ib_mad_cleanup_module | ) |
module_init | ( | ib_mad_init_module | ) |
MODULE_LICENSE | ( | "Dual BSD/GPL" | ) |
module_param_named | ( | send_queue_size | , |
mad_sendq_size | , | ||
int | , | ||
0444 | |||
) |
module_param_named | ( | recv_queue_size | , |
mad_recvq_size | , | ||
int | , | ||
0444 | |||
) |