This source file includes following definitions.
- rxe_mtu_int_to_enum
- eth_mtu_int_to_enum
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 #ifndef RXE_PARAM_H
35 #define RXE_PARAM_H
36
37 static inline enum ib_mtu rxe_mtu_int_to_enum(int mtu)
38 {
39 if (mtu < 256)
40 return 0;
41 else if (mtu < 512)
42 return IB_MTU_256;
43 else if (mtu < 1024)
44 return IB_MTU_512;
45 else if (mtu < 2048)
46 return IB_MTU_1024;
47 else if (mtu < 4096)
48 return IB_MTU_2048;
49 else
50 return IB_MTU_4096;
51 }
52
53
54 static inline enum ib_mtu eth_mtu_int_to_enum(int mtu)
55 {
56 mtu -= RXE_MAX_HDR_LENGTH;
57
58 return rxe_mtu_int_to_enum(mtu);
59 }
60
61
62 enum rxe_device_param {
63 RXE_FW_VER = 0,
64 RXE_MAX_MR_SIZE = -1ull,
65 RXE_PAGE_SIZE_CAP = 0xfffff000,
66 RXE_VENDOR_ID = 0,
67 RXE_VENDOR_PART_ID = 0,
68 RXE_HW_VER = 0,
69 RXE_MAX_QP = 0x10000,
70 RXE_MAX_QP_WR = 0x4000,
71 RXE_MAX_INLINE_DATA = 400,
72 RXE_DEVICE_CAP_FLAGS = IB_DEVICE_BAD_PKEY_CNTR
73 | IB_DEVICE_BAD_QKEY_CNTR
74 | IB_DEVICE_AUTO_PATH_MIG
75 | IB_DEVICE_CHANGE_PHY_PORT
76 | IB_DEVICE_UD_AV_PORT_ENFORCE
77 | IB_DEVICE_PORT_ACTIVE_EVENT
78 | IB_DEVICE_SYS_IMAGE_GUID
79 | IB_DEVICE_RC_RNR_NAK_GEN
80 | IB_DEVICE_SRQ_RESIZE
81 | IB_DEVICE_MEM_MGT_EXTENSIONS
82 | IB_DEVICE_ALLOW_USER_UNREG,
83 RXE_MAX_SGE = 32,
84 RXE_MAX_SGE_RD = 32,
85 RXE_MAX_CQ = 16384,
86 RXE_MAX_LOG_CQE = 15,
87 RXE_MAX_MR = 256 * 1024,
88 RXE_MAX_PD = 0x7ffc,
89 RXE_MAX_QP_RD_ATOM = 128,
90 RXE_MAX_EE_RD_ATOM = 0,
91 RXE_MAX_RES_RD_ATOM = 0x3f000,
92 RXE_MAX_QP_INIT_RD_ATOM = 128,
93 RXE_MAX_EE_INIT_RD_ATOM = 0,
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,
99 RXE_MAX_MCAST_GRP = 8192,
100 RXE_MAX_MCAST_QP_ATTACH = 56,
101 RXE_MAX_TOT_MCAST_QP_ATTACH = 0x70000,
102 RXE_MAX_AH = 100,
103 RXE_MAX_FMR = 0,
104 RXE_MAX_MAP_PER_FMR = 0,
105 RXE_MAX_SRQ = 960,
106 RXE_MAX_SRQ_WR = 0x4000,
107 RXE_MIN_SRQ_WR = 1,
108 RXE_MAX_SRQ_SGE = 27,
109 RXE_MIN_SRQ_SGE = 1,
110 RXE_MAX_FMR_PAGE_LIST_LEN = 512,
111 RXE_MAX_PKEYS = 64,
112 RXE_LOCAL_CA_ACK_DELAY = 15,
113
114 RXE_MAX_UCONTEXT = 512,
115
116 RXE_NUM_PORT = 1,
117
118 RXE_MIN_QP_INDEX = 16,
119 RXE_MAX_QP_INDEX = 0x00020000,
120
121 RXE_MIN_SRQ_INDEX = 0x00020001,
122 RXE_MAX_SRQ_INDEX = 0x00040000,
123
124 RXE_MIN_MR_INDEX = 0x00000001,
125 RXE_MAX_MR_INDEX = 0x00040000,
126 RXE_MIN_MW_INDEX = 0x00040001,
127 RXE_MAX_MW_INDEX = 0x00060000,
128 RXE_MAX_PKT_PER_ACK = 64,
129
130 RXE_MAX_UNACKED_PSNS = 128,
131
132
133 RXE_INFLIGHT_SKBS_PER_QP_HIGH = 64,
134 RXE_INFLIGHT_SKBS_PER_QP_LOW = 16,
135
136
137 RXE_NSEC_ARB_TIMER_DELAY = 200,
138 };
139
140
141 enum rxe_port_param {
142 RXE_PORT_GID_TBL_LEN = 1024,
143 RXE_PORT_PORT_CAP_FLAGS = RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP,
144 RXE_PORT_MAX_MSG_SZ = 0x800000,
145 RXE_PORT_BAD_PKEY_CNTR = 0,
146 RXE_PORT_QKEY_VIOL_CNTR = 0,
147 RXE_PORT_LID = 0,
148 RXE_PORT_SM_LID = 0,
149 RXE_PORT_SM_SL = 0,
150 RXE_PORT_LMC = 0,
151 RXE_PORT_MAX_VL_NUM = 1,
152 RXE_PORT_SUBNET_TIMEOUT = 0,
153 RXE_PORT_INIT_TYPE_REPLY = 0,
154 RXE_PORT_ACTIVE_WIDTH = IB_WIDTH_1X,
155 RXE_PORT_ACTIVE_SPEED = 1,
156 RXE_PORT_PKEY_TBL_LEN = 64,
157 RXE_PORT_PHYS_STATE = IB_PORT_PHYS_STATE_POLLING,
158 RXE_PORT_SUBNET_PREFIX = 0xfe80000000000000ULL,
159 };
160
161
162 enum rxe_port_info_param {
163 RXE_PORT_INFO_VL_CAP = 4,
164 RXE_PORT_INFO_MTU_CAP = 5,
165 RXE_PORT_INFO_OPER_VL = 1,
166 };
167
168 #endif