ib_cm.h 17 KB

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