Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/random.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/dma-mapping.h>
#include <linux/kref.h>
#include <linux/idr.h>
#include <linux/workqueue.h>
#include <rdma/ib_pack.h>
#include <rdma/ib_cache.h>
#include "sa.h"
Go to the source code of this file.
Data Structures | |
struct | ib_sa_sm_ah |
struct | ib_sa_port |
struct | ib_sa_device |
struct | ib_sa_query |
struct | ib_sa_service_query |
struct | ib_sa_path_query |
struct | ib_sa_guidinfo_query |
struct | ib_sa_mcmember_query |
Macros | |
#define | PATH_REC_FIELD(field) |
#define | MCMEMBER_REC_FIELD(field) |
#define | SERVICE_REC_FIELD(field) |
#define | GUIDINFO_REC_FIELD(field) |
#define GUIDINFO_REC_FIELD | ( | field | ) |
Definition at line 356 of file sa_query.c.
#define MCMEMBER_REC_FIELD | ( | field | ) |
Definition at line 224 of file sa_query.c.
#define PATH_REC_FIELD | ( | field | ) |
Definition at line 124 of file sa_query.c.
#define SERVICE_REC_FIELD | ( | field | ) |
Definition at line 308 of file sa_query.c.
EXPORT_SYMBOL | ( | ib_sa_register_client | ) |
EXPORT_SYMBOL | ( | ib_sa_unregister_client | ) |
EXPORT_SYMBOL | ( | ib_sa_cancel_query | ) |
EXPORT_SYMBOL | ( | ib_init_ah_from_path | ) |
EXPORT_SYMBOL | ( | ib_sa_unpack_path | ) |
EXPORT_SYMBOL | ( | ib_sa_path_rec_get | ) |
EXPORT_SYMBOL | ( | ib_sa_service_rec_query | ) |
EXPORT_SYMBOL | ( | ib_sa_guid_info_rec_query | ) |
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.
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.
int ib_sa_mcmember_rec_query | ( | struct ib_sa_client * | client, |
struct ib_device * | device, | ||
u8 | port_num, | ||
u8 | method, | ||
struct ib_sa_mcmember_rec * | rec, | ||
ib_sa_comp_mask | comp_mask, | ||
int | timeout_ms, | ||
gfp_t | gfp_mask, | ||
void(*)(int status, struct ib_sa_mcmember_rec *resp, void *context) | callback, | ||
void * | context, | ||
struct ib_sa_query ** | sa_query | ||
) |
Definition at line 913 of file sa_query.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.
MODULE_AUTHOR | ( | "Roland Dreier" | ) |
MODULE_DESCRIPTION | ( | "InfiniBand subnet administration query support" | ) |
module_exit | ( | ib_sa_cleanup | ) |
module_init | ( | ib_sa_init | ) |
MODULE_LICENSE | ( | "Dual BSD/GPL" | ) |