hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/include/rdma/ib_cm.h
....@@ -1,45 +1,18 @@
1
+/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
12 /*
23 * Copyright (c) 2004, 2005 Intel Corporation. All rights reserved.
34 * Copyright (c) 2004 Topspin Corporation. All rights reserved.
45 * Copyright (c) 2004 Voltaire Corporation. All rights reserved.
56 * 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.
7
+ * Copyright (c) 2019, Mellanox Technologies inc. All rights reserved.
348 */
35
-#if !defined(IB_CM_H)
9
+
10
+#ifndef IB_CM_H
3611 #define IB_CM_H
3712
3813 #include <rdma/ib_mad.h>
3914 #include <rdma/ib_sa.h>
40
-
41
-/* ib_cm and ib_user_cm modules share /sys/class/infiniband_cm */
42
-extern struct class cm_class;
15
+#include <rdma/rdma_cm.h>
4316
4417 enum ib_cm_state {
4518 IB_CM_IDLE,
....@@ -141,6 +114,7 @@
141114 unsigned int retry_count:3;
142115 unsigned int rnr_retry_count:3;
143116 unsigned int srq:1;
117
+ struct rdma_ucm_ece ece;
144118 };
145119
146120 struct ib_cm_rep_event_param {
....@@ -155,6 +129,7 @@
155129 unsigned int flow_control:1;
156130 unsigned int rnr_retry_count:3;
157131 unsigned int srq:1;
132
+ struct rdma_ucm_ece ece;
158133 };
159134
160135 enum ib_cm_rej_reason {
....@@ -190,7 +165,8 @@
190165 IB_CM_REJ_DUPLICATE_LOCAL_COMM_ID = 30,
191166 IB_CM_REJ_INVALID_CLASS_VERSION = 31,
192167 IB_CM_REJ_INVALID_FLOW_LABEL = 32,
193
- IB_CM_REJ_INVALID_ALT_FLOW_LABEL = 33
168
+ IB_CM_REJ_INVALID_ALT_FLOW_LABEL = 33,
169
+ IB_CM_REJ_VENDOR_OPTION_NOT_SUPPORTED = 35,
194170 };
195171
196172 struct ib_cm_rej_event_param {
....@@ -386,7 +362,6 @@
386362 u32 starting_psn;
387363 const void *private_data;
388364 u8 private_data_len;
389
- u8 peer_to_peer;
390365 u8 responder_resources;
391366 u8 initiator_depth;
392367 u8 remote_cm_response_timeout;
....@@ -396,6 +371,7 @@
396371 u8 rnr_retry_count;
397372 u8 max_cm_retries;
398373 u8 srq;
374
+ struct rdma_ucm_ece ece;
399375 };
400376
401377 /**
....@@ -419,6 +395,7 @@
419395 u8 flow_control;
420396 u8 rnr_retry_count;
421397 u8 srq;
398
+ struct rdma_ucm_ece ece;
422399 };
423400
424401 /**
....@@ -526,21 +503,6 @@
526503 u8 private_data_len);
527504
528505 /**
529
- * ib_send_cm_lap - Sends a load alternate path request.
530
- * @cm_id: Connection identifier associated with the load alternate path
531
- * message.
532
- * @alternate_path: A path record that identifies the alternate path to
533
- * load.
534
- * @private_data: Optional user-defined private data sent with the
535
- * load alternate path message.
536
- * @private_data_len: Size of the private data buffer, in bytes.
537
- */
538
-int ib_send_cm_lap(struct ib_cm_id *cm_id,
539
- struct sa_path_rec *alternate_path,
540
- const void *private_data,
541
- u8 private_data_len);
542
-
543
-/**
544506 * ib_cm_init_qp_attr - Initializes the QP attributes for use in transitioning
545507 * to a specified QP state.
546508 * @cm_id: Communication identifier associated with the QP attributes to
....@@ -560,30 +522,11 @@
560522 struct ib_qp_attr *qp_attr,
561523 int *qp_attr_mask);
562524
563
-/**
564
- * ib_send_cm_apr - Sends an alternate path response message in response to
565
- * a load alternate path request.
566
- * @cm_id: Connection identifier associated with the alternate path response.
567
- * @status: Reply status sent with the alternate path response.
568
- * @info: Optional additional information sent with the alternate path
569
- * response.
570
- * @info_length: Size of the additional information, in bytes.
571
- * @private_data: Optional user-defined private data sent with the
572
- * alternate path response message.
573
- * @private_data_len: Size of the private data buffer, in bytes.
574
- */
575
-int ib_send_cm_apr(struct ib_cm_id *cm_id,
576
- enum ib_cm_apr_status status,
577
- void *info,
578
- u8 info_length,
579
- const void *private_data,
580
- u8 private_data_len);
581
-
582525 struct ib_cm_sidr_req_param {
583526 struct sa_path_rec *path;
584527 const struct ib_gid_attr *sgid_attr;
585528 __be64 service_id;
586
- int timeout_ms;
529
+ unsigned long timeout_ms;
587530 const void *private_data;
588531 u8 private_data_len;
589532 u8 max_cm_retries;
....@@ -607,6 +550,7 @@
607550 u8 info_length;
608551 const void *private_data;
609552 u8 private_data_len;
553
+ struct rdma_ucm_ece ece;
610554 };
611555
612556 /**