ib_cm.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
  2. /*
  3. * Copyright (c) 2004, 2005 Intel Corporation. All rights reserved.
  4. * Copyright (c) 2004 Topspin Corporation. All rights reserved.
  5. * Copyright (c) 2004 Voltaire Corporation. All rights reserved.
  6. * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
  7. * Copyright (c) 2019, Mellanox Technologies inc. All rights reserved.
  8. */
  9. #ifndef IB_CM_H
  10. #define IB_CM_H
  11. #include <rdma/ib_mad.h>
  12. #include <rdma/ib_sa.h>
  13. #include <rdma/rdma_cm.h>
  14. enum ib_cm_state {
  15. IB_CM_IDLE,
  16. IB_CM_LISTEN,
  17. IB_CM_REQ_SENT,
  18. IB_CM_REQ_RCVD,
  19. IB_CM_MRA_REQ_SENT,
  20. IB_CM_MRA_REQ_RCVD,
  21. IB_CM_REP_SENT,
  22. IB_CM_REP_RCVD,
  23. IB_CM_MRA_REP_SENT,
  24. IB_CM_MRA_REP_RCVD,
  25. IB_CM_ESTABLISHED,
  26. IB_CM_DREQ_SENT,
  27. IB_CM_DREQ_RCVD,
  28. IB_CM_TIMEWAIT,
  29. IB_CM_SIDR_REQ_SENT,
  30. IB_CM_SIDR_REQ_RCVD
  31. };
  32. enum ib_cm_lap_state {
  33. IB_CM_LAP_UNINIT,
  34. IB_CM_LAP_IDLE,
  35. IB_CM_LAP_SENT,
  36. IB_CM_LAP_RCVD,
  37. IB_CM_MRA_LAP_SENT,
  38. IB_CM_MRA_LAP_RCVD,
  39. };
  40. enum ib_cm_event_type {
  41. IB_CM_REQ_ERROR,
  42. IB_CM_REQ_RECEIVED,
  43. IB_CM_REP_ERROR,
  44. IB_CM_REP_RECEIVED,
  45. IB_CM_RTU_RECEIVED,
  46. IB_CM_USER_ESTABLISHED,
  47. IB_CM_DREQ_ERROR,
  48. IB_CM_DREQ_RECEIVED,
  49. IB_CM_DREP_RECEIVED,
  50. IB_CM_TIMEWAIT_EXIT,
  51. IB_CM_MRA_RECEIVED,
  52. IB_CM_REJ_RECEIVED,
  53. IB_CM_LAP_ERROR,
  54. IB_CM_LAP_RECEIVED,
  55. IB_CM_APR_RECEIVED,
  56. IB_CM_SIDR_REQ_ERROR,
  57. IB_CM_SIDR_REQ_RECEIVED,
  58. IB_CM_SIDR_REP_RECEIVED
  59. };
  60. enum ib_cm_data_size {
  61. IB_CM_REQ_PRIVATE_DATA_SIZE = 92,
  62. IB_CM_MRA_PRIVATE_DATA_SIZE = 222,
  63. IB_CM_REJ_PRIVATE_DATA_SIZE = 148,
  64. IB_CM_REP_PRIVATE_DATA_SIZE = 196,
  65. IB_CM_RTU_PRIVATE_DATA_SIZE = 224,
  66. IB_CM_DREQ_PRIVATE_DATA_SIZE = 220,
  67. IB_CM_DREP_PRIVATE_DATA_SIZE = 224,
  68. IB_CM_REJ_ARI_LENGTH = 72,
  69. IB_CM_LAP_PRIVATE_DATA_SIZE = 168,
  70. IB_CM_APR_PRIVATE_DATA_SIZE = 148,
  71. IB_CM_APR_INFO_LENGTH = 72,
  72. IB_CM_SIDR_REQ_PRIVATE_DATA_SIZE = 216,
  73. IB_CM_SIDR_REP_PRIVATE_DATA_SIZE = 136,
  74. IB_CM_SIDR_REP_INFO_LENGTH = 72,
  75. };
  76. struct ib_cm_id;
  77. struct ib_cm_req_event_param {
  78. struct ib_cm_id *listen_id;
  79. /* P_Key that was used by the GMP's BTH header */
  80. u16 bth_pkey;
  81. u8 port;
  82. struct sa_path_rec *primary_path;
  83. struct sa_path_rec *alternate_path;
  84. /*
  85. * SGID attribute of the primary path. Currently only
  86. * useful for RoCE. Alternate path GID attributes
  87. * are not yet supported.
  88. */
  89. const struct ib_gid_attr *ppath_sgid_attr;
  90. __be64 remote_ca_guid;
  91. u32 remote_qkey;
  92. u32 remote_qpn;
  93. enum ib_qp_type qp_type;
  94. u32 starting_psn;
  95. u8 responder_resources;
  96. u8 initiator_depth;
  97. unsigned int local_cm_response_timeout:5;
  98. unsigned int flow_control:1;
  99. unsigned int remote_cm_response_timeout:5;
  100. unsigned int retry_count:3;
  101. unsigned int rnr_retry_count:3;
  102. unsigned int srq:1;
  103. struct rdma_ucm_ece ece;
  104. };
  105. struct ib_cm_rep_event_param {
  106. __be64 remote_ca_guid;
  107. u32 remote_qkey;
  108. u32 remote_qpn;
  109. u32 starting_psn;
  110. u8 responder_resources;
  111. u8 initiator_depth;
  112. unsigned int target_ack_delay:5;
  113. unsigned int failover_accepted:2;
  114. unsigned int flow_control:1;
  115. unsigned int rnr_retry_count:3;
  116. unsigned int srq:1;
  117. struct rdma_ucm_ece ece;
  118. };
  119. enum ib_cm_rej_reason {
  120. IB_CM_REJ_NO_QP = 1,
  121. IB_CM_REJ_NO_EEC = 2,
  122. IB_CM_REJ_NO_RESOURCES = 3,
  123. IB_CM_REJ_TIMEOUT = 4,
  124. IB_CM_REJ_UNSUPPORTED = 5,
  125. IB_CM_REJ_INVALID_COMM_ID = 6,
  126. IB_CM_REJ_INVALID_COMM_INSTANCE = 7,
  127. IB_CM_REJ_INVALID_SERVICE_ID = 8,
  128. IB_CM_REJ_INVALID_TRANSPORT_TYPE = 9,
  129. IB_CM_REJ_STALE_CONN = 10,
  130. IB_CM_REJ_RDC_NOT_EXIST = 11,
  131. IB_CM_REJ_INVALID_GID = 12,
  132. IB_CM_REJ_INVALID_LID = 13,
  133. IB_CM_REJ_INVALID_SL = 14,
  134. IB_CM_REJ_INVALID_TRAFFIC_CLASS = 15,
  135. IB_CM_REJ_INVALID_HOP_LIMIT = 16,
  136. IB_CM_REJ_INVALID_PACKET_RATE = 17,
  137. IB_CM_REJ_INVALID_ALT_GID = 18,
  138. IB_CM_REJ_INVALID_ALT_LID = 19,
  139. IB_CM_REJ_INVALID_ALT_SL = 20,
  140. IB_CM_REJ_INVALID_ALT_TRAFFIC_CLASS = 21,
  141. IB_CM_REJ_INVALID_ALT_HOP_LIMIT = 22,
  142. IB_CM_REJ_INVALID_ALT_PACKET_RATE = 23,
  143. IB_CM_REJ_PORT_CM_REDIRECT = 24,
  144. IB_CM_REJ_PORT_REDIRECT = 25,
  145. IB_CM_REJ_INVALID_MTU = 26,
  146. IB_CM_REJ_INSUFFICIENT_RESP_RESOURCES = 27,
  147. IB_CM_REJ_CONSUMER_DEFINED = 28,
  148. IB_CM_REJ_INVALID_RNR_RETRY = 29,
  149. IB_CM_REJ_DUPLICATE_LOCAL_COMM_ID = 30,
  150. IB_CM_REJ_INVALID_CLASS_VERSION = 31,
  151. IB_CM_REJ_INVALID_FLOW_LABEL = 32,
  152. IB_CM_REJ_INVALID_ALT_FLOW_LABEL = 33,
  153. IB_CM_REJ_VENDOR_OPTION_NOT_SUPPORTED = 35,
  154. };
  155. struct ib_cm_rej_event_param {
  156. enum ib_cm_rej_reason reason;
  157. void *ari;
  158. u8 ari_length;
  159. };
  160. struct ib_cm_mra_event_param {
  161. u8 service_timeout;
  162. };
  163. struct ib_cm_lap_event_param {
  164. struct sa_path_rec *alternate_path;
  165. };
  166. enum ib_cm_apr_status {
  167. IB_CM_APR_SUCCESS,
  168. IB_CM_APR_INVALID_COMM_ID,
  169. IB_CM_APR_UNSUPPORTED,
  170. IB_CM_APR_REJECT,
  171. IB_CM_APR_REDIRECT,
  172. IB_CM_APR_IS_CURRENT,
  173. IB_CM_APR_INVALID_QPN_EECN,
  174. IB_CM_APR_INVALID_LID,
  175. IB_CM_APR_INVALID_GID,
  176. IB_CM_APR_INVALID_FLOW_LABEL,
  177. IB_CM_APR_INVALID_TCLASS,
  178. IB_CM_APR_INVALID_HOP_LIMIT,
  179. IB_CM_APR_INVALID_PACKET_RATE,
  180. IB_CM_APR_INVALID_SL
  181. };
  182. struct ib_cm_apr_event_param {
  183. enum ib_cm_apr_status ap_status;
  184. void *apr_info;
  185. u8 info_len;
  186. };
  187. struct ib_cm_sidr_req_event_param {
  188. struct ib_cm_id *listen_id;
  189. __be64 service_id;
  190. /*
  191. * SGID attribute of the request. Currently only
  192. * useful for RoCE.
  193. */
  194. const struct ib_gid_attr *sgid_attr;
  195. /* P_Key that was used by the GMP's BTH header */
  196. u16 bth_pkey;
  197. u8 port;
  198. u16 pkey;
  199. };
  200. enum ib_cm_sidr_status {
  201. IB_SIDR_SUCCESS,
  202. IB_SIDR_UNSUPPORTED,
  203. IB_SIDR_REJECT,
  204. IB_SIDR_NO_QP,
  205. IB_SIDR_REDIRECT,
  206. IB_SIDR_UNSUPPORTED_VERSION
  207. };
  208. struct ib_cm_sidr_rep_event_param {
  209. enum ib_cm_sidr_status status;
  210. u32 qkey;
  211. u32 qpn;
  212. void *info;
  213. const struct ib_gid_attr *sgid_attr;
  214. u8 info_len;
  215. };
  216. struct ib_cm_event {
  217. enum ib_cm_event_type event;
  218. union {
  219. struct ib_cm_req_event_param req_rcvd;
  220. struct ib_cm_rep_event_param rep_rcvd;
  221. /* No data for RTU received events. */
  222. struct ib_cm_rej_event_param rej_rcvd;
  223. struct ib_cm_mra_event_param mra_rcvd;
  224. struct ib_cm_lap_event_param lap_rcvd;
  225. struct ib_cm_apr_event_param apr_rcvd;
  226. /* No data for DREQ/DREP received events. */
  227. struct ib_cm_sidr_req_event_param sidr_req_rcvd;
  228. struct ib_cm_sidr_rep_event_param sidr_rep_rcvd;
  229. enum ib_wc_status send_status;
  230. } param;
  231. void *private_data;
  232. };
  233. #define CM_REQ_ATTR_ID cpu_to_be16(0x0010)
  234. #define CM_MRA_ATTR_ID cpu_to_be16(0x0011)
  235. #define CM_REJ_ATTR_ID cpu_to_be16(0x0012)
  236. #define CM_REP_ATTR_ID cpu_to_be16(0x0013)
  237. #define CM_RTU_ATTR_ID cpu_to_be16(0x0014)
  238. #define CM_DREQ_ATTR_ID cpu_to_be16(0x0015)
  239. #define CM_DREP_ATTR_ID cpu_to_be16(0x0016)
  240. #define CM_SIDR_REQ_ATTR_ID cpu_to_be16(0x0017)
  241. #define CM_SIDR_REP_ATTR_ID cpu_to_be16(0x0018)
  242. #define CM_LAP_ATTR_ID cpu_to_be16(0x0019)
  243. #define CM_APR_ATTR_ID cpu_to_be16(0x001A)
  244. /**
  245. * ib_cm_handler - User-defined callback to process communication events.
  246. * @cm_id: Communication identifier associated with the reported event.
  247. * @event: Information about the communication event.
  248. *
  249. * IB_CM_REQ_RECEIVED and IB_CM_SIDR_REQ_RECEIVED communication events
  250. * generated as a result of listen requests result in the allocation of a
  251. * new @cm_id. The new @cm_id is returned to the user through this callback.
  252. * Clients are responsible for destroying the new @cm_id. For peer-to-peer
  253. * IB_CM_REQ_RECEIVED and all other events, the returned @cm_id corresponds
  254. * to a user's existing communication identifier.
  255. *
  256. * Users may not call ib_destroy_cm_id while in the context of this callback;
  257. * however, returning a non-zero value instructs the communication manager to
  258. * destroy the @cm_id after the callback completes.
  259. */
  260. typedef int (*ib_cm_handler)(struct ib_cm_id *cm_id,
  261. const struct ib_cm_event *event);
  262. struct ib_cm_id {
  263. ib_cm_handler cm_handler;
  264. void *context;
  265. struct ib_device *device;
  266. __be64 service_id;
  267. __be64 service_mask;
  268. enum ib_cm_state state; /* internal CM/debug use */
  269. enum ib_cm_lap_state lap_state; /* internal CM/debug use */
  270. __be32 local_id;
  271. __be32 remote_id;
  272. u32 remote_cm_qpn; /* 1 unless redirected */
  273. };
  274. /**
  275. * ib_create_cm_id - Allocate a communication identifier.
  276. * @device: Device associated with the cm_id. All related communication will
  277. * be associated with the specified device.
  278. * @cm_handler: Callback invoked to notify the user of CM events.
  279. * @context: User specified context associated with the communication
  280. * identifier.
  281. *
  282. * Communication identifiers are used to track connection states, service
  283. * ID resolution requests, and listen requests.
  284. */
  285. struct ib_cm_id *ib_create_cm_id(struct ib_device *device,
  286. ib_cm_handler cm_handler,
  287. void *context);
  288. /**
  289. * ib_destroy_cm_id - Destroy a connection identifier.
  290. * @cm_id: Connection identifier to destroy.
  291. *
  292. * This call blocks until the connection identifier is destroyed.
  293. */
  294. void ib_destroy_cm_id(struct ib_cm_id *cm_id);
  295. #define IB_SERVICE_ID_AGN_MASK cpu_to_be64(0xFF00000000000000ULL)
  296. #define IB_CM_ASSIGN_SERVICE_ID cpu_to_be64(0x0200000000000000ULL)
  297. #define IB_CMA_SERVICE_ID cpu_to_be64(0x0000000001000000ULL)
  298. #define IB_CMA_SERVICE_ID_MASK cpu_to_be64(0xFFFFFFFFFF000000ULL)
  299. #define IB_SDP_SERVICE_ID cpu_to_be64(0x0000000000010000ULL)
  300. #define IB_SDP_SERVICE_ID_MASK cpu_to_be64(0xFFFFFFFFFFFF0000ULL)
  301. /**
  302. * ib_cm_listen - Initiates listening on the specified service ID for
  303. * connection and service ID resolution requests.
  304. * @cm_id: Connection identifier associated with the listen request.
  305. * @service_id: Service identifier matched against incoming connection
  306. * and service ID resolution requests. The service ID should be specified
  307. * network-byte order. If set to IB_CM_ASSIGN_SERVICE_ID, the CM will
  308. * assign a service ID to the caller.
  309. * @service_mask: Mask applied to service ID used to listen across a
  310. * range of service IDs. If set to 0, the service ID is matched
  311. * exactly. This parameter is ignored if %service_id is set to
  312. * IB_CM_ASSIGN_SERVICE_ID.
  313. */
  314. int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id,
  315. __be64 service_mask);
  316. struct ib_cm_id *ib_cm_insert_listen(struct ib_device *device,
  317. ib_cm_handler cm_handler,
  318. __be64 service_id);
  319. struct ib_cm_req_param {
  320. struct sa_path_rec *primary_path;
  321. struct sa_path_rec *alternate_path;
  322. const struct ib_gid_attr *ppath_sgid_attr;
  323. __be64 service_id;
  324. u32 qp_num;
  325. enum ib_qp_type qp_type;
  326. u32 starting_psn;
  327. const void *private_data;
  328. u8 private_data_len;
  329. u8 responder_resources;
  330. u8 initiator_depth;
  331. u8 remote_cm_response_timeout;
  332. u8 flow_control;
  333. u8 local_cm_response_timeout;
  334. u8 retry_count;
  335. u8 rnr_retry_count;
  336. u8 max_cm_retries;
  337. u8 srq;
  338. struct rdma_ucm_ece ece;
  339. };
  340. /**
  341. * ib_send_cm_req - Sends a connection request to the remote node.
  342. * @cm_id: Connection identifier that will be associated with the
  343. * connection request.
  344. * @param: Connection request information needed to establish the
  345. * connection.
  346. */
  347. int ib_send_cm_req(struct ib_cm_id *cm_id,
  348. struct ib_cm_req_param *param);
  349. struct ib_cm_rep_param {
  350. u32 qp_num;
  351. u32 starting_psn;
  352. const void *private_data;
  353. u8 private_data_len;
  354. u8 responder_resources;
  355. u8 initiator_depth;
  356. u8 failover_accepted;
  357. u8 flow_control;
  358. u8 rnr_retry_count;
  359. u8 srq;
  360. struct rdma_ucm_ece ece;
  361. };
  362. /**
  363. * ib_send_cm_rep - Sends a connection reply in response to a connection
  364. * request.
  365. * @cm_id: Connection identifier that will be associated with the
  366. * connection request.
  367. * @param: Connection reply information needed to establish the
  368. * connection.
  369. */
  370. int ib_send_cm_rep(struct ib_cm_id *cm_id,
  371. struct ib_cm_rep_param *param);
  372. /**
  373. * ib_send_cm_rtu - Sends a connection ready to use message in response
  374. * to a connection reply message.
  375. * @cm_id: Connection identifier associated with the connection request.
  376. * @private_data: Optional user-defined private data sent with the
  377. * ready to use message.
  378. * @private_data_len: Size of the private data buffer, in bytes.
  379. */
  380. int ib_send_cm_rtu(struct ib_cm_id *cm_id,
  381. const void *private_data,
  382. u8 private_data_len);
  383. /**
  384. * ib_send_cm_dreq - Sends a disconnection request for an existing
  385. * connection.
  386. * @cm_id: Connection identifier associated with the connection being
  387. * released.
  388. * @private_data: Optional user-defined private data sent with the
  389. * disconnection request message.
  390. * @private_data_len: Size of the private data buffer, in bytes.
  391. */
  392. int ib_send_cm_dreq(struct ib_cm_id *cm_id,
  393. const void *private_data,
  394. u8 private_data_len);
  395. /**
  396. * ib_send_cm_drep - Sends a disconnection reply to a disconnection request.
  397. * @cm_id: Connection identifier associated with the connection being
  398. * released.
  399. * @private_data: Optional user-defined private data sent with the
  400. * disconnection reply message.
  401. * @private_data_len: Size of the private data buffer, in bytes.
  402. *
  403. * If the cm_id is in the correct state, the CM will transition the connection
  404. * to the timewait state, even if an error occurs sending the DREP message.
  405. */
  406. int ib_send_cm_drep(struct ib_cm_id *cm_id,
  407. const void *private_data,
  408. u8 private_data_len);
  409. /**
  410. * ib_cm_notify - Notifies the CM of an event reported to the consumer.
  411. * @cm_id: Connection identifier to transition to established.
  412. * @event: Type of event.
  413. *
  414. * This routine should be invoked by users to notify the CM of relevant
  415. * communication events. Events that should be reported to the CM and
  416. * when to report them are:
  417. *
  418. * IB_EVENT_COMM_EST - Used when a message is received on a connected
  419. * QP before an RTU has been received.
  420. * IB_EVENT_PATH_MIG - Notifies the CM that the connection has failed over
  421. * to the alternate path.
  422. */
  423. int ib_cm_notify(struct ib_cm_id *cm_id, enum ib_event_type event);
  424. /**
  425. * ib_send_cm_rej - Sends a connection rejection message to the
  426. * remote node.
  427. * @cm_id: Connection identifier associated with the connection being
  428. * rejected.
  429. * @reason: Reason for the connection request rejection.
  430. * @ari: Optional additional rejection information.
  431. * @ari_length: Size of the additional rejection information, in bytes.
  432. * @private_data: Optional user-defined private data sent with the
  433. * rejection message.
  434. * @private_data_len: Size of the private data buffer, in bytes.
  435. */
  436. int ib_send_cm_rej(struct ib_cm_id *cm_id,
  437. enum ib_cm_rej_reason reason,
  438. void *ari,
  439. u8 ari_length,
  440. const void *private_data,
  441. u8 private_data_len);
  442. #define IB_CM_MRA_FLAG_DELAY 0x80 /* Send MRA only after a duplicate msg */
  443. /**
  444. * ib_send_cm_mra - Sends a message receipt acknowledgement to a connection
  445. * message.
  446. * @cm_id: Connection identifier associated with the connection message.
  447. * @service_timeout: The lower 5-bits specify the maximum time required for
  448. * the sender to reply to the connection message. The upper 3-bits
  449. * specify additional control flags.
  450. * @private_data: Optional user-defined private data sent with the
  451. * message receipt acknowledgement.
  452. * @private_data_len: Size of the private data buffer, in bytes.
  453. */
  454. int ib_send_cm_mra(struct ib_cm_id *cm_id,
  455. u8 service_timeout,
  456. const void *private_data,
  457. u8 private_data_len);
  458. /**
  459. * ib_cm_init_qp_attr - Initializes the QP attributes for use in transitioning
  460. * to a specified QP state.
  461. * @cm_id: Communication identifier associated with the QP attributes to
  462. * initialize.
  463. * @qp_attr: On input, specifies the desired QP state. On output, the
  464. * mandatory and desired optional attributes will be set in order to
  465. * modify the QP to the specified state.
  466. * @qp_attr_mask: The QP attribute mask that may be used to transition the
  467. * QP to the specified state.
  468. *
  469. * Users must set the @qp_attr->qp_state to the desired QP state. This call
  470. * will set all required attributes for the given transition, along with
  471. * known optional attributes. Users may override the attributes returned from
  472. * this call before calling ib_modify_qp.
  473. */
  474. int ib_cm_init_qp_attr(struct ib_cm_id *cm_id,
  475. struct ib_qp_attr *qp_attr,
  476. int *qp_attr_mask);
  477. struct ib_cm_sidr_req_param {
  478. struct sa_path_rec *path;
  479. const struct ib_gid_attr *sgid_attr;
  480. __be64 service_id;
  481. unsigned long timeout_ms;
  482. const void *private_data;
  483. u8 private_data_len;
  484. u8 max_cm_retries;
  485. };
  486. /**
  487. * ib_send_cm_sidr_req - Sends a service ID resolution request to the
  488. * remote node.
  489. * @cm_id: Communication identifier that will be associated with the
  490. * service ID resolution request.
  491. * @param: Service ID resolution request information.
  492. */
  493. int ib_send_cm_sidr_req(struct ib_cm_id *cm_id,
  494. struct ib_cm_sidr_req_param *param);
  495. struct ib_cm_sidr_rep_param {
  496. u32 qp_num;
  497. u32 qkey;
  498. enum ib_cm_sidr_status status;
  499. const void *info;
  500. u8 info_length;
  501. const void *private_data;
  502. u8 private_data_len;
  503. struct rdma_ucm_ece ece;
  504. };
  505. /**
  506. * ib_send_cm_sidr_rep - Sends a service ID resolution reply to the
  507. * remote node.
  508. * @cm_id: Communication identifier associated with the received service ID
  509. * resolution request.
  510. * @param: Service ID resolution reply information.
  511. */
  512. int ib_send_cm_sidr_rep(struct ib_cm_id *cm_id,
  513. struct ib_cm_sidr_rep_param *param);
  514. /**
  515. * ibcm_reject_msg - return a pointer to a reject message string.
  516. * @reason: Value returned in the REJECT event status field.
  517. */
  518. const char *__attribute_const__ ibcm_reject_msg(int reason);
  519. #endif /* IB_CM_H */