aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_cm.h12
-rw-r--r--include/rdma/ib_sa.h33
-rw-r--r--include/rdma/rdma_cm.h10
-rw-r--r--include/rdma/rdma_user_cm.h1
4 files changed, 56 insertions, 0 deletions
diff --git a/include/rdma/ib_cm.h b/include/rdma/ib_cm.h
index 83f77ac33957..0e3ff30647d5 100644
--- a/include/rdma/ib_cm.h
+++ b/include/rdma/ib_cm.h
@@ -262,6 +262,18 @@ struct ib_cm_event {
262 void *private_data; 262 void *private_data;
263}; 263};
264 264
265#define CM_REQ_ATTR_ID cpu_to_be16(0x0010)
266#define CM_MRA_ATTR_ID cpu_to_be16(0x0011)
267#define CM_REJ_ATTR_ID cpu_to_be16(0x0012)
268#define CM_REP_ATTR_ID cpu_to_be16(0x0013)
269#define CM_RTU_ATTR_ID cpu_to_be16(0x0014)
270#define CM_DREQ_ATTR_ID cpu_to_be16(0x0015)
271#define CM_DREP_ATTR_ID cpu_to_be16(0x0016)
272#define CM_SIDR_REQ_ATTR_ID cpu_to_be16(0x0017)
273#define CM_SIDR_REP_ATTR_ID cpu_to_be16(0x0018)
274#define CM_LAP_ATTR_ID cpu_to_be16(0x0019)
275#define CM_APR_ATTR_ID cpu_to_be16(0x001A)
276
265/** 277/**
266 * ib_cm_handler - User-defined callback to process communication events. 278 * ib_cm_handler - User-defined callback to process communication events.
267 * @cm_id: Communication identifier associated with the reported event. 279 * @cm_id: Communication identifier associated with the reported event.
diff --git a/include/rdma/ib_sa.h b/include/rdma/ib_sa.h
index d44a56388a3e..8275e539bace 100644
--- a/include/rdma/ib_sa.h
+++ b/include/rdma/ib_sa.h
@@ -251,6 +251,28 @@ struct ib_sa_service_rec {
251 u64 data64[2]; 251 u64 data64[2];
252}; 252};
253 253
254#define IB_SA_GUIDINFO_REC_LID IB_SA_COMP_MASK(0)
255#define IB_SA_GUIDINFO_REC_BLOCK_NUM IB_SA_COMP_MASK(1)
256#define IB_SA_GUIDINFO_REC_RES1 IB_SA_COMP_MASK(2)
257#define IB_SA_GUIDINFO_REC_RES2 IB_SA_COMP_MASK(3)
258#define IB_SA_GUIDINFO_REC_GID0 IB_SA_COMP_MASK(4)
259#define IB_SA_GUIDINFO_REC_GID1 IB_SA_COMP_MASK(5)
260#define IB_SA_GUIDINFO_REC_GID2 IB_SA_COMP_MASK(6)
261#define IB_SA_GUIDINFO_REC_GID3 IB_SA_COMP_MASK(7)
262#define IB_SA_GUIDINFO_REC_GID4 IB_SA_COMP_MASK(8)
263#define IB_SA_GUIDINFO_REC_GID5 IB_SA_COMP_MASK(9)
264#define IB_SA_GUIDINFO_REC_GID6 IB_SA_COMP_MASK(10)
265#define IB_SA_GUIDINFO_REC_GID7 IB_SA_COMP_MASK(11)
266
267struct ib_sa_guidinfo_rec {
268 __be16 lid;
269 u8 block_num;
270 /* reserved */
271 u8 res1;
272 __be32 res2;
273 u8 guid_info_list[64];
274};
275
254struct ib_sa_client { 276struct ib_sa_client {
255 atomic_t users; 277 atomic_t users;
256 struct completion comp; 278 struct completion comp;
@@ -385,4 +407,15 @@ int ib_init_ah_from_path(struct ib_device *device, u8 port_num,
385 */ 407 */
386void ib_sa_unpack_path(void *attribute, struct ib_sa_path_rec *rec); 408void ib_sa_unpack_path(void *attribute, struct ib_sa_path_rec *rec);
387 409
410/* Support GuidInfoRecord */
411int ib_sa_guid_info_rec_query(struct ib_sa_client *client,
412 struct ib_device *device, u8 port_num,
413 struct ib_sa_guidinfo_rec *rec,
414 ib_sa_comp_mask comp_mask, u8 method,
415 int timeout_ms, gfp_t gfp_mask,
416 void (*callback)(int status,
417 struct ib_sa_guidinfo_rec *resp,
418 void *context),
419 void *context,
420 struct ib_sa_query **sa_query);
388#endif /* IB_SA_H */ 421#endif /* IB_SA_H */
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h
index 51988f808181..ad3a3142383a 100644
--- a/include/rdma/rdma_cm.h
+++ b/include/rdma/rdma_cm.h
@@ -357,4 +357,14 @@ void rdma_set_service_type(struct rdma_cm_id *id, int tos);
357 */ 357 */
358int rdma_set_reuseaddr(struct rdma_cm_id *id, int reuse); 358int rdma_set_reuseaddr(struct rdma_cm_id *id, int reuse);
359 359
360/**
361 * rdma_set_afonly - Specify that listens are restricted to the
362 * bound address family only.
363 * @id: Communication identifer to configure.
364 * @afonly: Value indicating if listens are restricted.
365 *
366 * Must be set before identifier is in the listening state.
367 */
368int rdma_set_afonly(struct rdma_cm_id *id, int afonly);
369
360#endif /* RDMA_CM_H */ 370#endif /* RDMA_CM_H */
diff --git a/include/rdma/rdma_user_cm.h b/include/rdma/rdma_user_cm.h
index 5348a000c8f3..1ee9239ff8c2 100644
--- a/include/rdma/rdma_user_cm.h
+++ b/include/rdma/rdma_user_cm.h
@@ -224,6 +224,7 @@ enum {
224enum { 224enum {
225 RDMA_OPTION_ID_TOS = 0, 225 RDMA_OPTION_ID_TOS = 0,
226 RDMA_OPTION_ID_REUSEADDR = 1, 226 RDMA_OPTION_ID_REUSEADDR = 1,
227 RDMA_OPTION_ID_AFONLY = 2,
227 RDMA_OPTION_IB_PATH = 1 228 RDMA_OPTION_IB_PATH = 1
228}; 229};
229 230