hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/infiniband/sw/rxe/rxe_param.h
....@@ -1,38 +1,13 @@
1
+/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
12 /*
23 * Copyright (c) 2016 Mellanox Technologies Ltd. All rights reserved.
34 * Copyright (c) 2015 System Fabric Works, Inc. All rights reserved.
4
- *
5
- * This software is available to you under a choice of one of two
6
- * licenses. You may choose to be licensed under the terms of the GNU
7
- * General Public License (GPL) Version 2, available from the file
8
- * COPYING in the main directory of this source tree, or the
9
- * OpenIB.org BSD license below:
10
- *
11
- * Redistribution and use in source and binary forms, with or
12
- * without modification, are permitted provided that the following
13
- * conditions are met:
14
- *
15
- * - Redistributions of source code must retain the above
16
- * copyright notice, this list of conditions and the following
17
- * disclaimer.
18
- *
19
- * - Redistributions in binary form must reproduce the above
20
- * copyright notice, this list of conditions and the following
21
- * disclaimer in the documentation and/or other materials
22
- * provided with the distribution.
23
- *
24
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
28
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
- * SOFTWARE.
325 */
336
347 #ifndef RXE_PARAM_H
358 #define RXE_PARAM_H
9
+
10
+#include <uapi/rdma/rdma_user_rxe.h>
3611
3712 static inline enum ib_mtu rxe_mtu_int_to_enum(int mtu)
3813 {
....@@ -60,15 +35,10 @@
6035
6136 /* default/initial rxe device parameter settings */
6237 enum rxe_device_param {
63
- RXE_FW_VER = 0,
6438 RXE_MAX_MR_SIZE = -1ull,
6539 RXE_PAGE_SIZE_CAP = 0xfffff000,
66
- RXE_VENDOR_ID = 0,
67
- RXE_VENDOR_PART_ID = 0,
68
- RXE_HW_VER = 0,
6940 RXE_MAX_QP = 0x10000,
7041 RXE_MAX_QP_WR = 0x4000,
71
- RXE_MAX_INLINE_DATA = 400,
7242 RXE_DEVICE_CAP_FLAGS = IB_DEVICE_BAD_PKEY_CNTR
7343 | IB_DEVICE_BAD_QKEY_CNTR
7444 | IB_DEVICE_AUTO_PATH_MIG
....@@ -78,37 +48,32 @@
7848 | IB_DEVICE_SYS_IMAGE_GUID
7949 | IB_DEVICE_RC_RNR_NAK_GEN
8050 | IB_DEVICE_SRQ_RESIZE
81
- | IB_DEVICE_MEM_MGT_EXTENSIONS,
51
+ | IB_DEVICE_MEM_MGT_EXTENSIONS
52
+ | IB_DEVICE_ALLOW_USER_UNREG,
8253 RXE_MAX_SGE = 32,
54
+ RXE_MAX_WQE_SIZE = sizeof(struct rxe_send_wqe) +
55
+ sizeof(struct ib_sge) * RXE_MAX_SGE,
56
+ RXE_MAX_INLINE_DATA = RXE_MAX_WQE_SIZE -
57
+ sizeof(struct rxe_send_wqe),
8358 RXE_MAX_SGE_RD = 32,
8459 RXE_MAX_CQ = 16384,
8560 RXE_MAX_LOG_CQE = 15,
8661 RXE_MAX_MR = 256 * 1024,
8762 RXE_MAX_PD = 0x7ffc,
8863 RXE_MAX_QP_RD_ATOM = 128,
89
- RXE_MAX_EE_RD_ATOM = 0,
9064 RXE_MAX_RES_RD_ATOM = 0x3f000,
9165 RXE_MAX_QP_INIT_RD_ATOM = 128,
92
- RXE_MAX_EE_INIT_RD_ATOM = 0,
93
- RXE_ATOMIC_CAP = 1,
94
- RXE_MAX_EE = 0,
95
- RXE_MAX_RDD = 0,
96
- RXE_MAX_MW = 0,
97
- RXE_MAX_RAW_IPV6_QP = 0,
98
- RXE_MAX_RAW_ETHY_QP = 0,
9966 RXE_MAX_MCAST_GRP = 8192,
10067 RXE_MAX_MCAST_QP_ATTACH = 56,
10168 RXE_MAX_TOT_MCAST_QP_ATTACH = 0x70000,
10269 RXE_MAX_AH = 100,
103
- RXE_MAX_FMR = 0,
104
- RXE_MAX_MAP_PER_FMR = 0,
10570 RXE_MAX_SRQ = 960,
10671 RXE_MAX_SRQ_WR = 0x4000,
10772 RXE_MIN_SRQ_WR = 1,
10873 RXE_MAX_SRQ_SGE = 27,
10974 RXE_MIN_SRQ_SGE = 1,
11075 RXE_MAX_FMR_PAGE_LIST_LEN = 512,
111
- RXE_MAX_PKEYS = 64,
76
+ RXE_MAX_PKEYS = 1,
11277 RXE_LOCAL_CA_ACK_DELAY = 15,
11378
11479 RXE_MAX_UCONTEXT = 512,
....@@ -133,15 +98,21 @@
13398 RXE_INFLIGHT_SKBS_PER_QP_HIGH = 64,
13499 RXE_INFLIGHT_SKBS_PER_QP_LOW = 16,
135100
101
+ /* Max number of interations of each tasklet
102
+ * before yielding the cpu to let other
103
+ * work make progress
104
+ */
105
+ RXE_MAX_ITERATIONS = 1024,
106
+
136107 /* Delay before calling arbiter timer */
137108 RXE_NSEC_ARB_TIMER_DELAY = 200,
109
+
110
+ /* IBTA v1.4 A3.3.1 VENDOR INFORMATION section */
111
+ RXE_VENDOR_ID = 0XFFFFFF,
138112 };
139113
140114 /* default/initial rxe port parameters */
141115 enum rxe_port_param {
142
- RXE_PORT_STATE = IB_PORT_DOWN,
143
- RXE_PORT_MAX_MTU = IB_MTU_4096,
144
- RXE_PORT_ACTIVE_MTU = IB_MTU_256,
145116 RXE_PORT_GID_TBL_LEN = 1024,
146117 RXE_PORT_PORT_CAP_FLAGS = IB_PORT_CM_SUP,
147118 RXE_PORT_MAX_MSG_SZ = 0x800000,
....@@ -156,8 +127,8 @@
156127 RXE_PORT_INIT_TYPE_REPLY = 0,
157128 RXE_PORT_ACTIVE_WIDTH = IB_WIDTH_1X,
158129 RXE_PORT_ACTIVE_SPEED = 1,
159
- RXE_PORT_PKEY_TBL_LEN = 64,
160
- RXE_PORT_PHYS_STATE = 2,
130
+ RXE_PORT_PKEY_TBL_LEN = 1,
131
+ RXE_PORT_PHYS_STATE = IB_PORT_PHYS_STATE_POLLING,
161132 RXE_PORT_SUBNET_PREFIX = 0xfe80000000000000ULL,
162133 };
163134