Linux Kernel
3.7.1
|
#include <linux/completion.h>
#include <linux/compiler.h>
#include <linux/atomic.h>
#include <rdma/ib_verbs.h>
#include <rdma/ib_mad.h>
Go to the source code of this file.
Data Structures | |
struct | ib_sa_path_rec |
struct | ib_sa_mcmember_rec |
struct | ib_sa_service_rec |
struct | ib_sa_guidinfo_rec |
struct | ib_sa_client |
struct | ib_sa_multicast |
#define IB_SA_GUIDINFO_REC_BLOCK_NUM IB_SA_COMP_MASK(1) |
#define IB_SA_GUIDINFO_REC_GID0 IB_SA_COMP_MASK(4) |
#define IB_SA_GUIDINFO_REC_GID1 IB_SA_COMP_MASK(5) |
#define IB_SA_GUIDINFO_REC_GID2 IB_SA_COMP_MASK(6) |
#define IB_SA_GUIDINFO_REC_GID3 IB_SA_COMP_MASK(7) |
#define IB_SA_GUIDINFO_REC_GID4 IB_SA_COMP_MASK(8) |
#define IB_SA_GUIDINFO_REC_GID5 IB_SA_COMP_MASK(9) |
#define IB_SA_GUIDINFO_REC_GID6 IB_SA_COMP_MASK(10) |
#define IB_SA_GUIDINFO_REC_GID7 IB_SA_COMP_MASK(11) |
#define IB_SA_GUIDINFO_REC_LID IB_SA_COMP_MASK(0) |
#define IB_SA_GUIDINFO_REC_RES1 IB_SA_COMP_MASK(2) |
#define IB_SA_GUIDINFO_REC_RES2 IB_SA_COMP_MASK(3) |
#define IB_SA_MCMEMBER_REC_FLOW_LABEL IB_SA_COMP_MASK(13) |
#define IB_SA_MCMEMBER_REC_HOP_LIMIT IB_SA_COMP_MASK(14) |
#define IB_SA_MCMEMBER_REC_JOIN_STATE IB_SA_COMP_MASK(16) |
#define IB_SA_MCMEMBER_REC_MGID IB_SA_COMP_MASK( 0) |
#define IB_SA_MCMEMBER_REC_MLID IB_SA_COMP_MASK( 3) |
#define IB_SA_MCMEMBER_REC_MTU IB_SA_COMP_MASK( 5) |
#define IB_SA_MCMEMBER_REC_MTU_SELECTOR IB_SA_COMP_MASK( 4) |
#define IB_SA_MCMEMBER_REC_PACKET_LIFE_TIME IB_SA_COMP_MASK(11) |
#define IB_SA_MCMEMBER_REC_PACKET_LIFE_TIME_SELECTOR IB_SA_COMP_MASK(10) |
#define IB_SA_MCMEMBER_REC_PKEY IB_SA_COMP_MASK( 7) |
#define IB_SA_MCMEMBER_REC_PORT_GID IB_SA_COMP_MASK( 1) |
#define IB_SA_MCMEMBER_REC_PROXY_JOIN IB_SA_COMP_MASK(17) |
#define IB_SA_MCMEMBER_REC_QKEY IB_SA_COMP_MASK( 2) |
#define IB_SA_MCMEMBER_REC_RATE IB_SA_COMP_MASK( 9) |
#define IB_SA_MCMEMBER_REC_RATE_SELECTOR IB_SA_COMP_MASK( 8) |
#define IB_SA_MCMEMBER_REC_SCOPE IB_SA_COMP_MASK(15) |
#define IB_SA_MCMEMBER_REC_SL IB_SA_COMP_MASK(12) |
#define IB_SA_MCMEMBER_REC_TRAFFIC_CLASS IB_SA_COMP_MASK( 6) |
#define IB_SA_PATH_REC_DGID IB_SA_COMP_MASK( 2) |
#define IB_SA_PATH_REC_DLID IB_SA_COMP_MASK( 4) |
#define IB_SA_PATH_REC_FLOW_LABEL IB_SA_COMP_MASK( 8) |
#define IB_SA_PATH_REC_HOP_LIMIT IB_SA_COMP_MASK( 9) |
#define IB_SA_PATH_REC_MTU IB_SA_COMP_MASK(17) |
#define IB_SA_PATH_REC_MTU_SELECTOR IB_SA_COMP_MASK(16) |
#define IB_SA_PATH_REC_NUMB_PATH IB_SA_COMP_MASK(12) |
#define IB_SA_PATH_REC_PACKET_LIFE_TIME IB_SA_COMP_MASK(21) |
#define IB_SA_PATH_REC_PACKET_LIFE_TIME_SELECTOR IB_SA_COMP_MASK(20) |
#define IB_SA_PATH_REC_PKEY IB_SA_COMP_MASK(13) |
#define IB_SA_PATH_REC_PREFERENCE IB_SA_COMP_MASK(22) |
#define IB_SA_PATH_REC_QOS_CLASS IB_SA_COMP_MASK(14) |
#define IB_SA_PATH_REC_RATE IB_SA_COMP_MASK(19) |
#define IB_SA_PATH_REC_RATE_SELECTOR IB_SA_COMP_MASK(18) |
#define IB_SA_PATH_REC_RAW_TRAFFIC IB_SA_COMP_MASK( 6) |
#define IB_SA_PATH_REC_REVERSIBLE IB_SA_COMP_MASK(11) |
#define IB_SA_PATH_REC_SERVICE_ID |
#define IB_SA_PATH_REC_SGID IB_SA_COMP_MASK( 3) |
#define IB_SA_PATH_REC_SL IB_SA_COMP_MASK(15) |
#define IB_SA_PATH_REC_SLID IB_SA_COMP_MASK( 5) |
#define IB_SA_PATH_REC_TRAFFIC_CLASS IB_SA_COMP_MASK(10) |
#define IB_SA_SERVICE_REC_SERVICE_DATA16_0 IB_SA_COMP_MASK(23) |
#define IB_SA_SERVICE_REC_SERVICE_DATA16_1 IB_SA_COMP_MASK(24) |
#define IB_SA_SERVICE_REC_SERVICE_DATA16_2 IB_SA_COMP_MASK(25) |
#define IB_SA_SERVICE_REC_SERVICE_DATA16_3 IB_SA_COMP_MASK(26) |
#define IB_SA_SERVICE_REC_SERVICE_DATA16_4 IB_SA_COMP_MASK(27) |
#define IB_SA_SERVICE_REC_SERVICE_DATA16_5 IB_SA_COMP_MASK(28) |
#define IB_SA_SERVICE_REC_SERVICE_DATA16_6 IB_SA_COMP_MASK(29) |
#define IB_SA_SERVICE_REC_SERVICE_DATA16_7 IB_SA_COMP_MASK(30) |
#define IB_SA_SERVICE_REC_SERVICE_DATA32_0 IB_SA_COMP_MASK(31) |
#define IB_SA_SERVICE_REC_SERVICE_DATA32_1 IB_SA_COMP_MASK(32) |
#define IB_SA_SERVICE_REC_SERVICE_DATA32_2 IB_SA_COMP_MASK(33) |
#define IB_SA_SERVICE_REC_SERVICE_DATA32_3 IB_SA_COMP_MASK(34) |
#define IB_SA_SERVICE_REC_SERVICE_DATA64_0 IB_SA_COMP_MASK(35) |
#define IB_SA_SERVICE_REC_SERVICE_DATA64_1 IB_SA_COMP_MASK(36) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_0 IB_SA_COMP_MASK( 7) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_1 IB_SA_COMP_MASK( 8) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_10 IB_SA_COMP_MASK(17) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_11 IB_SA_COMP_MASK(18) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_12 IB_SA_COMP_MASK(19) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_13 IB_SA_COMP_MASK(20) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_14 IB_SA_COMP_MASK(21) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_15 IB_SA_COMP_MASK(22) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_2 IB_SA_COMP_MASK( 9) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_3 IB_SA_COMP_MASK(10) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_4 IB_SA_COMP_MASK(11) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_5 IB_SA_COMP_MASK(12) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_6 IB_SA_COMP_MASK(13) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_7 IB_SA_COMP_MASK(14) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_8 IB_SA_COMP_MASK(15) |
#define IB_SA_SERVICE_REC_SERVICE_DATA8_9 IB_SA_COMP_MASK(16) |
#define IB_SA_SERVICE_REC_SERVICE_GID IB_SA_COMP_MASK( 1) |
#define IB_SA_SERVICE_REC_SERVICE_ID IB_SA_COMP_MASK( 0) |
#define IB_SA_SERVICE_REC_SERVICE_KEY IB_SA_COMP_MASK( 5) |
#define IB_SA_SERVICE_REC_SERVICE_LEASE IB_SA_COMP_MASK( 4) |
#define IB_SA_SERVICE_REC_SERVICE_NAME IB_SA_COMP_MASK( 6) |
#define IB_SA_SERVICE_REC_SERVICE_PKEY IB_SA_COMP_MASK( 2) |
anonymous enum |
anonymous enum |
enum ib_sa_selector |
int ib_init_ah_from_mcmember | ( | struct ib_device * | device, |
u8 | port_num, | ||
struct ib_sa_mcmember_rec * | rec, | ||
struct ib_ah_attr * | ah_attr | ||
) |
ib_init_ah_from_mcmember - Initialize address handle attributes based on an SA multicast member record.
Definition at line 719 of file multicast.c.
int ib_init_ah_from_path | ( | struct ib_device * | device, |
u8 | port_num, | ||
struct ib_sa_path_rec * | rec, | ||
struct ib_ah_attr * | ah_attr | ||
) |
ib_init_ah_from_path - Initialize address handle attributes based on an SA path record.
Definition at line 528 of file sa_query.c.
void ib_sa_cancel_query | ( | int | id, |
struct ib_sa_query * | query | ||
) |
ib_sa_cancel_query - try to cancel an SA query :ID of query to cancel :query pointer to cancel
Try to cancel an SA query. If the id and query don't match up or the query has already completed, nothing is done. Otherwise the query is canceled and will complete with a status of -EINTR.
Definition at line 490 of file sa_query.c.
void ib_sa_free_multicast | ( | struct ib_sa_multicast * | multicast | ) |
ib_free_multicast - Frees the multicast tracking structure, and releases any reference on the multicast group. : Multicast tracking structure allocated by ib_join_multicast.
This call blocks until the multicast identifier is destroyed. It may not be called from within the multicast callback; however, returning a non- zero value from the callback will result in destroying the multicast tracking structure.
Definition at line 662 of file multicast.c.
int ib_sa_get_mcmember_rec | ( | struct ib_device * | device, |
u8 | port_num, | ||
union ib_gid * | mgid, | ||
struct ib_sa_mcmember_rec * | rec | ||
) |
ib_get_mcmember_rec - Looks up a multicast member record by its MGID and returns it if found. : Device associated with the multicast group. : Port on the specified device to associate with the multicast group. : MGID of multicast group. : Location to copy SA multicast member record.
Definition at line 693 of file multicast.c.
int ib_sa_guid_info_rec_query | ( | struct ib_sa_client * | client, |
struct ib_device * | device, | ||
u8 | port_num, | ||
struct ib_sa_guidinfo_rec * | rec, | ||
ib_sa_comp_mask | comp_mask, | ||
u8 | method, | ||
int | timeout_ms, | ||
gfp_t | gfp_mask, | ||
void(*)(int status, struct ib_sa_guidinfo_rec *resp, void *context) | callback, | ||
void * | context, | ||
struct ib_sa_query ** | sa_query | ||
) |
Definition at line 1005 of file sa_query.c.
|
read |
ib_sa_join_multicast - Initiates a join request to the specified multicast group. : SA client : Device associated with the multicast group. : Port on the specified device to associate with the multicast group. : SA multicast member record specifying group attributes. : Component mask indicating which group attributes of rec are valid. : GFP mask for memory allocations. : User callback invoked once the join operation completes. : User specified context stored with the ib_sa_multicast structure.
This call initiates a multicast join request with the SA for the specified multicast group. If the join operation is started successfully, it returns an ib_sa_multicast structure that is used to track the multicast operation. Users must free this structure by calling ib_free_multicast, even if the join operation later fails. (The callback status is non-zero.)
If the join operation fails; status will be non-zero, with the following failures possible: -ETIMEDOUT: The request timed out. -EIO: An error occurred sending the query. -EINVAL: The MCMemberRecord values differed from the existing group's. -ENETRESET: Indicates that an fatal error has occurred on the multicast group, and the user must rejoin the group to continue using it.
Definition at line 607 of file multicast.c.
int ib_sa_path_rec_get | ( | struct ib_sa_client * | client, |
struct ib_device * | device, | ||
u8 | port_num, | ||
struct ib_sa_path_rec * | rec, | ||
ib_sa_comp_mask | comp_mask, | ||
int | timeout_ms, | ||
gfp_t | gfp_mask, | ||
void(*)(int status, struct ib_sa_path_rec *resp, void *context) | callback, | ||
void * | context, | ||
struct ib_sa_query ** | sa_query | ||
) |
ib_sa_path_rec_get - Start a Path get query :SA client :device to send query on : port number to send query on :Path Record to send in query :component mask to send in query :time to wait for response :GFP mask to use for internal allocations :function called when query completes, times out or is canceled :opaque user context passed to callback :query context, used to cancel query
Send a Path Record Get query to the SA to look up a path. The callback function will be called when the query completes (or fails); status is 0 for a successful response, -EINTR if the query is canceled, -ETIMEDOUT is the query timed out, or -EIO if an error occurred sending the query. The resp parameter of the callback is only valid if status is 0.
If the return value of ib_sa_path_rec_get() is negative, it is an error code. Otherwise it is a query ID that can be used to cancel the query.
Definition at line 700 of file sa_query.c.
void ib_sa_register_client | ( | struct ib_sa_client * | client | ) |
ib_sa_register_client - Register an SA client.
Definition at line 467 of file sa_query.c.
int ib_sa_service_rec_query | ( | struct ib_sa_client * | client, |
struct ib_device * | device, | ||
u8 | port_num, | ||
u8 | method, | ||
struct ib_sa_service_rec * | rec, | ||
ib_sa_comp_mask | comp_mask, | ||
int | timeout_ms, | ||
gfp_t | gfp_mask, | ||
void(*)(int status, struct ib_sa_service_rec *resp, void *context) | callback, | ||
void * | context, | ||
struct ib_sa_query ** | sa_query | ||
) |
ib_sa_service_rec_query - Start Service Record operation :SA client :device to send request on : port number to send request on :SA method - should be get, set, or delete :Service Record to send in request :component mask to send in request :time to wait for response :GFP mask to use for internal allocations :function called when request completes, times out or is canceled :opaque user context passed to callback :request context, used to cancel request
Send a Service Record set/get/delete to the SA to register, unregister or query a service record. The callback function will be called when the request completes (or fails); status is 0 for a successful response, -EINTR if the query is canceled, -ETIMEDOUT is the query timed out, or -EIO if an error occurred sending the query. The resp parameter of the callback is only valid if status is 0.
If the return value of ib_sa_service_rec_query() is negative, it is an error code. Otherwise it is a request ID that can be used to cancel the query.
Definition at line 817 of file sa_query.c.
void ib_sa_unpack_path | ( | void * | attribute, |
struct ib_sa_path_rec * | rec | ||
) |
ib_sa_unpack_path - Convert a path record from MAD format to struct ib_sa_path_rec.
Definition at line 647 of file sa_query.c.
void ib_sa_unregister_client | ( | struct ib_sa_client * | client | ) |
ib_sa_unregister_client - Deregister an SA client. : Client object to deregister.
Definition at line 474 of file sa_query.c.