xref: /freebsd/sys/dev/irdma/irdma_uda_d.h (revision bc7512cc58af2e8bbe5bbf5ca0059b1daa1da897)
1 /*-
2  * SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB
3  *
4  * Copyright (c) 2019 Intel Corporation
5  *
6  * This software is available to you under a choice of one of two
7  * licenses.  You may choose to be licensed under the terms of the GNU
8  * General Public License (GPL) Version 2, available from the file
9  * COPYING in the main directory of this source tree, or the
10  * OpenFabrics.org BSD license below:
11  *
12  *   Redistribution and use in source and binary forms, with or
13  *   without modification, are permitted provided that the following
14  *   conditions are met:
15  *
16  *    - Redistributions of source code must retain the above
17  *	copyright notice, this list of conditions and the following
18  *	disclaimer.
19  *
20  *    - Redistributions in binary form must reproduce the above
21  *	copyright notice, this list of conditions and the following
22  *	disclaimer in the documentation and/or other materials
23  *	provided with the distribution.
24  *
25  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
29  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
30  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32  * SOFTWARE.
33  */
34 /*$FreeBSD$*/
35 
36 #ifndef IRDMA_UDA_D_H
37 #define IRDMA_UDA_D_H
38 
39 /* L4 packet type */
40 #define IRDMA_E_UDA_SQ_L4T_UNKNOWN	0
41 #define IRDMA_E_UDA_SQ_L4T_TCP		1
42 #define IRDMA_E_UDA_SQ_L4T_SCTP		2
43 #define IRDMA_E_UDA_SQ_L4T_UDP		3
44 
45 /* Inner IP header type */
46 #define IRDMA_E_UDA_SQ_IIPT_UNKNOWN		0
47 #define IRDMA_E_UDA_SQ_IIPT_IPV6		1
48 #define IRDMA_E_UDA_SQ_IIPT_IPV4_NO_CSUM	2
49 #define IRDMA_E_UDA_SQ_IIPT_IPV4_CSUM		3
50 
51 /* UDA defined fields for transmit descriptors */
52 #define IRDMA_UDA_QPSQ_PUSHWQE_S 56
53 #define IRDMA_UDA_QPSQ_PUSHWQE_M BIT_ULL(IRDMA_UDA_QPSQ_PUSHWQE_S)
54 
55 #define IRDMA_UDA_QPSQ_INLINEDATAFLAG_S 57
56 #define IRDMA_UDA_QPSQ_INLINEDATAFLAG_M \
57 	BIT_ULL(IRDMA_UDA_QPSQ_INLINEDATAFLAG_S)
58 
59 #define IRDMA_UDA_QPSQ_INLINEDATALEN_S 48
60 #define IRDMA_UDA_QPSQ_INLINEDATALEN_M \
61 	((u64)0xff << IRDMA_UDA_QPSQ_INLINEDATALEN_S)
62 
63 #define IRDMA_UDA_QPSQ_ADDFRAGCNT_S 38
64 #define IRDMA_UDA_QPSQ_ADDFRAGCNT_M \
65 	((u64)0x0F << IRDMA_UDA_QPSQ_ADDFRAGCNT_S)
66 
67 #define IRDMA_UDA_QPSQ_IPFRAGFLAGS_S 42
68 #define IRDMA_UDA_QPSQ_IPFRAGFLAGS_M \
69 	((u64)0x3 << IRDMA_UDA_QPSQ_IPFRAGFLAGS_S)
70 
71 #define IRDMA_UDA_QPSQ_NOCHECKSUM_S 45
72 #define IRDMA_UDA_QPSQ_NOCHECKSUM_M \
73 	BIT_ULL(IRDMA_UDA_QPSQ_NOCHECKSUM_S)
74 
75 #define IRDMA_UDA_QPSQ_AHIDXVALID_S 46
76 #define IRDMA_UDA_QPSQ_AHIDXVALID_M \
77 	BIT_ULL(IRDMA_UDA_QPSQ_AHIDXVALID_S)
78 
79 #define IRDMA_UDA_QPSQ_LOCAL_FENCE_S 61
80 #define IRDMA_UDA_QPSQ_LOCAL_FENCE_M \
81 	BIT_ULL(IRDMA_UDA_QPSQ_LOCAL_FENCE_S)
82 
83 #define IRDMA_UDA_QPSQ_AHIDX_S 0
84 #define IRDMA_UDA_QPSQ_AHIDX_M ((u64)0x1ffff << IRDMA_UDA_QPSQ_AHIDX_S)
85 
86 #define IRDMA_UDA_QPSQ_PROTOCOL_S 16
87 #define IRDMA_UDA_QPSQ_PROTOCOL_M \
88 	((u64)0xff << IRDMA_UDA_QPSQ_PROTOCOL_S)
89 
90 #define IRDMA_UDA_QPSQ_EXTHDRLEN_S 32
91 #define IRDMA_UDA_QPSQ_EXTHDRLEN_M \
92 	((u64)0x1ff << IRDMA_UDA_QPSQ_EXTHDRLEN_S)
93 
94 #define IRDMA_UDA_QPSQ_MULTICAST_S 63
95 #define IRDMA_UDA_QPSQ_MULTICAST_M \
96 	BIT_ULL(IRDMA_UDA_QPSQ_MULTICAST_S)
97 
98 #define IRDMA_UDA_QPSQ_MACLEN_S 56
99 #define IRDMA_UDA_QPSQ_MACLEN_M \
100 	((u64)0x7f << IRDMA_UDA_QPSQ_MACLEN_S)
101 #define IRDMA_UDA_QPSQ_MACLEN_LINE 2
102 
103 #define IRDMA_UDA_QPSQ_IPLEN_S 48
104 #define IRDMA_UDA_QPSQ_IPLEN_M \
105 	((u64)0x7f << IRDMA_UDA_QPSQ_IPLEN_S)
106 #define IRDMA_UDA_QPSQ_IPLEN_LINE 2
107 
108 #define IRDMA_UDA_QPSQ_L4T_S 30
109 #define IRDMA_UDA_QPSQ_L4T_M ((u64)0x3 << IRDMA_UDA_QPSQ_L4T_S)
110 #define IRDMA_UDA_QPSQ_L4T_LINE 2
111 
112 #define IRDMA_UDA_QPSQ_IIPT_S 28
113 #define IRDMA_UDA_QPSQ_IIPT_M ((u64)0x3 << IRDMA_UDA_QPSQ_IIPT_S)
114 #define IRDMA_UDA_QPSQ_IIPT_LINE 2
115 
116 #define IRDMA_UDA_QPSQ_DO_LPB_LINE 3
117 
118 #define IRDMA_UDA_QPSQ_FWD_PROG_CONFIRM_S 45
119 #define IRDMA_UDA_QPSQ_FWD_PROG_CONFIRM_M \
120 	BIT_ULL(IRDMA_UDA_QPSQ_FWD_PROG_CONFIRM_S)
121 #define IRDMA_UDA_QPSQ_FWD_PROG_CONFIRM_LINE 3
122 
123 #define IRDMA_UDA_QPSQ_IMMDATA_S 0
124 #define IRDMA_UDA_QPSQ_IMMDATA_M \
125 	((u64)0xffffffffffffffff << IRDMA_UDA_QPSQ_IMMDATA_S)
126 
127 /* Byte Offset 0 */
128 #define IRDMA_UDAQPC_IPV4_S 3
129 #define IRDMA_UDAQPC_IPV4_M BIT_ULL(IRDMAQPC_IPV4_S)
130 
131 #define IRDMA_UDAQPC_INSERTVLANTAG_S 5
132 #define IRDMA_UDAQPC_INSERTVLANTAG_M BIT_ULL(IRDMA_UDAQPC_INSERTVLANTAG_S)
133 
134 #define IRDMA_UDAQPC_ISQP1_S 6
135 #define IRDMA_UDAQPC_ISQP1_M BIT_ULL(IRDMA_UDAQPC_ISQP1_S)
136 
137 #define IRDMA_UDAQPC_RQWQESIZE_S IRDMAQPC_RQWQESIZE_S
138 #define IRDMA_UDAQPC_RQWQESIZE_M IRDMAQPC_RQWQESIZE_M
139 
140 #define IRDMA_UDAQPC_ECNENABLE_S 14
141 #define IRDMA_UDAQPC_ECNENABLE_M BIT_ULL(IRDMA_UDAQPC_ECNENABLE_S)
142 
143 #define IRDMA_UDAQPC_PDINDEXHI_S 20
144 #define IRDMA_UDAQPC_PDINDEXHI_M ((u64)3 << IRDMA_UDAQPC_PDINDEXHI_S)
145 
146 #define IRDMA_UDAQPC_DCTCPENABLE_S 25
147 #define IRDMA_UDAQPC_DCTCPENABLE_M BIT_ULL(IRDMA_UDAQPC_DCTCPENABLE_S)
148 
149 #define IRDMA_UDAQPC_RCVTPHEN_S IRDMAQPC_RCVTPHEN_S
150 #define IRDMA_UDAQPC_RCVTPHEN_M IRDMAQPC_RCVTPHEN_M
151 
152 #define IRDMA_UDAQPC_XMITTPHEN_S IRDMAQPC_XMITTPHEN_S
153 #define IRDMA_UDAQPC_XMITTPHEN_M IRDMAQPC_XMITTPHEN_M
154 
155 #define IRDMA_UDAQPC_RQTPHEN_S IRDMAQPC_RQTPHEN_S
156 #define IRDMA_UDAQPC_RQTPHEN_M IRDMAQPC_RQTPHEN_M
157 
158 #define IRDMA_UDAQPC_SQTPHEN_S IRDMAQPC_SQTPHEN_S
159 #define IRDMA_UDAQPC_SQTPHEN_M IRDMAQPC_SQTPHEN_M
160 
161 #define IRDMA_UDAQPC_PPIDX_S IRDMAQPC_PPIDX_S
162 #define IRDMA_UDAQPC_PPIDX_M IRDMAQPC_PPIDX_M
163 
164 #define IRDMA_UDAQPC_PMENA_S IRDMAQPC_PMENA_S
165 #define IRDMA_UDAQPC_PMENA_M IRDMAQPC_PMENA_M
166 
167 #define IRDMA_UDAQPC_INSERTTAG2_S 11
168 #define IRDMA_UDAQPC_INSERTTAG2_M BIT_ULL(IRDMA_UDAQPC_INSERTTAG2_S)
169 
170 #define IRDMA_UDAQPC_INSERTTAG3_S 14
171 #define IRDMA_UDAQPC_INSERTTAG3_M BIT_ULL(IRDMA_UDAQPC_INSERTTAG3_S)
172 
173 #define IRDMA_UDAQPC_RQSIZE_S IRDMAQPC_RQSIZE_S
174 #define IRDMA_UDAQPC_RQSIZE_M IRDMAQPC_RQSIZE_M
175 
176 #define IRDMA_UDAQPC_SQSIZE_S IRDMAQPC_SQSIZE_S
177 #define IRDMA_UDAQPC_SQSIZE_M IRDMAQPC_SQSIZE_M
178 
179 #define IRDMA_UDAQPC_TXCQNUM_S IRDMAQPC_TXCQNUM_S
180 #define IRDMA_UDAQPC_TXCQNUM_M IRDMAQPC_TXCQNUM_M
181 
182 #define IRDMA_UDAQPC_RXCQNUM_S IRDMAQPC_RXCQNUM_S
183 #define IRDMA_UDAQPC_RXCQNUM_M IRDMAQPC_RXCQNUM_M
184 
185 #define IRDMA_UDAQPC_QPCOMPCTX_S IRDMAQPC_QPCOMPCTX_S
186 #define IRDMA_UDAQPC_QPCOMPCTX_M IRDMAQPC_QPCOMPCTX_M
187 
188 #define IRDMA_UDAQPC_SQTPHVAL_S IRDMAQPC_SQTPHVAL_S
189 #define IRDMA_UDAQPC_SQTPHVAL_M IRDMAQPC_SQTPHVAL_M
190 
191 #define IRDMA_UDAQPC_RQTPHVAL_S IRDMAQPC_RQTPHVAL_S
192 #define IRDMA_UDAQPC_RQTPHVAL_M IRDMAQPC_RQTPHVAL_M
193 
194 #define IRDMA_UDAQPC_QSHANDLE_S IRDMAQPC_QSHANDLE_S
195 #define IRDMA_UDAQPC_QSHANDLE_M IRDMAQPC_QSHANDLE_M
196 
197 #define IRDMA_UDAQPC_RQHDRRINGBUFSIZE_S 48
198 #define IRDMA_UDAQPC_RQHDRRINGBUFSIZE_M \
199 	((u64)0x3 << IRDMA_UDAQPC_RQHDRRINGBUFSIZE_S)
200 
201 #define IRDMA_UDAQPC_SQHDRRINGBUFSIZE_S 32
202 #define IRDMA_UDAQPC_SQHDRRINGBUFSIZE_M \
203 	((u64)0x3 << IRDMA_UDAQPC_SQHDRRINGBUFSIZE_S)
204 
205 #define IRDMA_UDAQPC_PRIVILEGEENABLE_S 25
206 #define IRDMA_UDAQPC_PRIVILEGEENABLE_M \
207 	BIT_ULL(IRDMA_UDAQPC_PRIVILEGEENABLE_S)
208 
209 #define IRDMA_UDAQPC_USE_STATISTICS_INSTANCE_S 26
210 #define IRDMA_UDAQPC_USE_STATISTICS_INSTANCE_M \
211 	BIT_ULL(IRDMA_UDAQPC_USE_STATISTICS_INSTANCE_S)
212 
213 #define IRDMA_UDAQPC_STATISTICS_INSTANCE_INDEX_S 0
214 #define IRDMA_UDAQPC_STATISTICS_INSTANCE_INDEX_M \
215 	((u64)0x7F << IRDMA_UDAQPC_STATISTICS_INSTANCE_INDEX_S)
216 
217 #define IRDMA_UDAQPC_PRIVHDRGENENABLE_S 0
218 #define IRDMA_UDAQPC_PRIVHDRGENENABLE_M \
219 	BIT_ULL(IRDMA_UDAQPC_PRIVHDRGENENABLE_S)
220 
221 #define IRDMA_UDAQPC_RQHDRSPLITENABLE_S 3
222 #define IRDMA_UDAQPC_RQHDRSPLITENABLE_M \
223 	BIT_ULL(IRDMA_UDAQPC_RQHDRSPLITENABLE_S)
224 
225 #define IRDMA_UDAQPC_RQHDRRINGBUFENABLE_S 2
226 #define IRDMA_UDAQPC_RQHDRRINGBUFENABLE_M \
227 	BIT_ULL(IRDMA_UDAQPC_RQHDRRINGBUFENABLE_S)
228 
229 #define IRDMA_UDAQPC_SQHDRRINGBUFENABLE_S 1
230 #define IRDMA_UDAQPC_SQHDRRINGBUFENABLE_M \
231 	BIT_ULL(IRDMA_UDAQPC_SQHDRRINGBUFENABLE_S)
232 
233 #define IRDMA_UDAQPC_IPID_S 32
234 #define IRDMA_UDAQPC_IPID_M ((u64)0xffff << IRDMA_UDAQPC_IPID_S)
235 
236 #define IRDMA_UDAQPC_SNDMSS_S 16
237 #define IRDMA_UDAQPC_SNDMSS_M ((u64)0x3fff << IRDMA_UDAQPC_SNDMSS_S)
238 
239 #define IRDMA_UDAQPC_VLANTAG_S 0
240 #define IRDMA_UDAQPC_VLANTAG_M  ((u64)0xffff << IRDMA_UDAQPC_VLANTAG_S)
241 
242 /* Address Handle */
243 #define IRDMA_UDA_CQPSQ_MAV_PDINDEXHI_S 20
244 #define IRDMA_UDA_CQPSQ_MAV_PDINDEXHI_M \
245 	((u64)0x3 << IRDMA_UDA_CQPSQ_MAV_PDINDEXHI_S)
246 
247 #define IRDMA_UDA_CQPSQ_MAV_PDINDEXLO_S 48
248 #define IRDMA_UDA_CQPSQ_MAV_PDINDEXLO_M \
249 	((u64)0xffff << IRDMA_UDA_CQPSQ_MAV_PDINDEXLO_S)
250 
251 #define IRDMA_UDA_CQPSQ_MAV_SRCMACADDRINDEX_S 24
252 #define IRDMA_UDA_CQPSQ_MAV_SRCMACADDRINDEX_M \
253 	((u64)0x3f << IRDMA_UDA_CQPSQ_MAV_SRCMACADDRINDEX_S)
254 
255 #define IRDMA_UDA_CQPSQ_MAV_ARPINDEX_S 48
256 #define IRDMA_UDA_CQPSQ_MAV_ARPINDEX_M \
257 	((u64)0xffff << IRDMA_UDA_CQPSQ_MAV_ARPINDEX_S)
258 
259 #define IRDMA_UDA_CQPSQ_MAV_TC_S 32
260 #define IRDMA_UDA_CQPSQ_MAV_TC_M ((u64)0xff << IRDMA_UDA_CQPSQ_MAV_TC_S)
261 
262 #define IRDMA_UDA_CQPSQ_MAV_HOPLIMIT_S 32
263 #define IRDMA_UDA_CQPSQ_MAV_HOPLIMIT_M \
264 	((u64)0xff << IRDMA_UDA_CQPSQ_MAV_HOPLIMIT_S)
265 
266 #define IRDMA_UDA_CQPSQ_MAV_FLOWLABEL_S 0
267 #define IRDMA_UDA_CQPSQ_MAV_FLOWLABEL_M \
268 	((u64)0xfffff << IRDMA_UDA_CQPSQ_MAV_FLOWLABEL_S)
269 
270 #define IRDMA_UDA_CQPSQ_MAV_ADDR0_S 32
271 #define IRDMA_UDA_CQPSQ_MAV_ADDR0_M \
272 	((u64)0xffffffff << IRDMA_UDA_CQPSQ_MAV_ADDR0_S)
273 
274 #define IRDMA_UDA_CQPSQ_MAV_ADDR1_S 0
275 #define IRDMA_UDA_CQPSQ_MAV_ADDR1_M \
276 	((u64)0xffffffff << IRDMA_UDA_CQPSQ_MAV_ADDR1_S)
277 
278 #define IRDMA_UDA_CQPSQ_MAV_ADDR2_S 32
279 #define IRDMA_UDA_CQPSQ_MAV_ADDR2_M \
280 	((u64)0xffffffff << IRDMA_UDA_CQPSQ_MAV_ADDR2_S)
281 
282 #define IRDMA_UDA_CQPSQ_MAV_ADDR3_S 0
283 #define IRDMA_UDA_CQPSQ_MAV_ADDR3_M \
284 	((u64)0xffffffff << IRDMA_UDA_CQPSQ_MAV_ADDR3_S)
285 
286 #define IRDMA_UDA_CQPSQ_MAV_WQEVALID_S 63
287 #define IRDMA_UDA_CQPSQ_MAV_WQEVALID_M \
288 	BIT_ULL(IRDMA_UDA_CQPSQ_MAV_WQEVALID_S)
289 
290 #define IRDMA_UDA_CQPSQ_MAV_OPCODE_S 32
291 #define IRDMA_UDA_CQPSQ_MAV_OPCODE_M \
292 	((u64)0x3f << IRDMA_UDA_CQPSQ_MAV_OPCODE_S)
293 
294 #define IRDMA_UDA_CQPSQ_MAV_DOLOOPBACKK_S 62
295 #define IRDMA_UDA_CQPSQ_MAV_DOLOOPBACKK_M \
296 	BIT_ULL(IRDMA_UDA_CQPSQ_MAV_DOLOOPBACKK_S)
297 
298 #define IRDMA_UDA_CQPSQ_MAV_IPV4VALID_S 59
299 #define IRDMA_UDA_CQPSQ_MAV_IPV4VALID_M \
300 	BIT_ULL(IRDMA_UDA_CQPSQ_MAV_IPV4VALID_S)
301 
302 #define IRDMA_UDA_CQPSQ_MAV_AVIDX_S 0
303 #define IRDMA_UDA_CQPSQ_MAV_AVIDX_M \
304 	((u64)0x1ffff << IRDMA_UDA_CQPSQ_MAV_AVIDX_S)
305 
306 #define IRDMA_UDA_CQPSQ_MAV_INSERTVLANTAG_S 60
307 #define IRDMA_UDA_CQPSQ_MAV_INSERTVLANTAG_M BIT_ULL(IRDMA_UDA_CQPSQ_MAV_INSERTVLANTAG_S)
308 
309 /* UDA multicast group */
310 
311 #define IRDMA_UDA_MGCTX_VFFLAG_S 29
312 #define IRDMA_UDA_MGCTX_VFFLAG_M BIT_ULL(IRDMA_UDA_MGCTX_VFFLAG_S)
313 
314 #define IRDMA_UDA_MGCTX_DESTPORT_S 32
315 #define IRDMA_UDA_MGCTX_DESTPORT_M ((u64)0xffff << IRDMA_UDA_MGCTX_DESTPORT_S)
316 
317 #define IRDMA_UDA_MGCTX_VFID_S 22
318 #define IRDMA_UDA_MGCTX_VFID_M ((u64)0x7f << IRDMA_UDA_MGCTX_VFID_S)
319 
320 #define IRDMA_UDA_MGCTX_VALIDENT_S 31
321 #define IRDMA_UDA_MGCTX_VALIDENT_M BIT_ULL(IRDMA_UDA_MGCTX_VALIDENT_S)
322 
323 #define IRDMA_UDA_MGCTX_PFID_S 18
324 #define IRDMA_UDA_MGCTX_PFID_M ((u64)0xf << IRDMA_UDA_MGCTX_PFID_S)
325 
326 #define IRDMA_UDA_MGCTX_FLAGIGNOREDPORT_S 30
327 #define IRDMA_UDA_MGCTX_FLAGIGNOREDPORT_M \
328 	BIT_ULL(IRDMA_UDA_MGCTX_FLAGIGNOREDPORT_S)
329 
330 #define IRDMA_UDA_MGCTX_QPID_S 0
331 #define IRDMA_UDA_MGCTX_QPID_M ((u64)0x3ffff << IRDMA_UDA_MGCTX_QPID_S)
332 
333 /* multicast group create CQP command */
334 
335 #define IRDMA_UDA_CQPSQ_MG_WQEVALID_S 63
336 #define IRDMA_UDA_CQPSQ_MG_WQEVALID_M \
337 	BIT_ULL(IRDMA_UDA_CQPSQ_MG_WQEVALID_S)
338 
339 #define IRDMA_UDA_CQPSQ_MG_OPCODE_S 32
340 #define IRDMA_UDA_CQPSQ_MG_OPCODE_M ((u64)0x3f << IRDMA_UDA_CQPSQ_MG_OPCODE_S)
341 
342 #define IRDMA_UDA_CQPSQ_MG_MGIDX_S 0
343 #define IRDMA_UDA_CQPSQ_MG_MGIDX_M ((u64)0x1fff << IRDMA_UDA_CQPSQ_MG_MGIDX_S)
344 
345 #define IRDMA_UDA_CQPSQ_MG_IPV4VALID_S 60
346 #define IRDMA_UDA_CQPSQ_MG_IPV4VALID_M BIT_ULL(IRDMA_UDA_CQPSQ_MG_IPV4VALID_S)
347 
348 #define IRDMA_UDA_CQPSQ_MG_VLANVALID_S 59
349 #define IRDMA_UDA_CQPSQ_MG_VLANVALID_M BIT_ULL(IRDMA_UDA_CQPSQ_MG_VLANVALID_S)
350 
351 #define IRDMA_UDA_CQPSQ_MG_HMC_FCN_ID_S 0
352 #define IRDMA_UDA_CQPSQ_MG_HMC_FCN_ID_M ((u64)0x3F << IRDMA_UDA_CQPSQ_MG_HMC_FCN_ID_S)
353 
354 #define IRDMA_UDA_CQPSQ_MG_VLANID_S 32
355 #define IRDMA_UDA_CQPSQ_MG_VLANID_M ((u64)0xFFF << IRDMA_UDA_CQPSQ_MG_VLANID_S)
356 
357 #define IRDMA_UDA_CQPSQ_QS_HANDLE_S 0
358 #define IRDMA_UDA_CQPSQ_QS_HANDLE_M ((u64)0x3FF << IRDMA_UDA_CQPSQ_QS_HANDLE_S)
359 
360 /* Quad hash table */
361 #define IRDMA_UDA_CQPSQ_QHASH_QPN_S 32
362 #define IRDMA_UDA_CQPSQ_QHASH_QPN_M \
363 	((u64)0x3ffff << IRDMA_UDA_CQPSQ_QHASH_QPN_S)
364 
365 #define IRDMA_UDA_CQPSQ_QHASH__S 0
366 #define IRDMA_UDA_CQPSQ_QHASH__M BIT_ULL(IRDMA_UDA_CQPSQ_QHASH__S)
367 
368 #define IRDMA_UDA_CQPSQ_QHASH_SRC_PORT_S 16
369 #define IRDMA_UDA_CQPSQ_QHASH_SRC_PORT_M \
370 	((u64)0xffff << IRDMA_UDA_CQPSQ_QHASH_SRC_PORT_S)
371 
372 #define IRDMA_UDA_CQPSQ_QHASH_DEST_PORT_S 0
373 #define IRDMA_UDA_CQPSQ_QHASH_DEST_PORT_M \
374 	((u64)0xffff << IRDMA_UDA_CQPSQ_QHASH_DEST_PORT_S)
375 
376 #define IRDMA_UDA_CQPSQ_QHASH_ADDR0_S 32
377 #define IRDMA_UDA_CQPSQ_QHASH_ADDR0_M \
378 	((u64)0xffffffff << IRDMA_UDA_CQPSQ_QHASH_ADDR0_S)
379 
380 #define IRDMA_UDA_CQPSQ_QHASH_ADDR1_S 0
381 #define IRDMA_UDA_CQPSQ_QHASH_ADDR1_M \
382 	((u64)0xffffffff << IRDMA_UDA_CQPSQ_QHASH_ADDR1_S)
383 
384 #define IRDMA_UDA_CQPSQ_QHASH_ADDR2_S 32
385 #define IRDMA_UDA_CQPSQ_QHASH_ADDR2_M \
386 	((u64)0xffffffff << IRDMA_UDA_CQPSQ_QHASH_ADDR2_S)
387 
388 #define IRDMA_UDA_CQPSQ_QHASH_ADDR3_S 0
389 #define IRDMA_UDA_CQPSQ_QHASH_ADDR3_M \
390 	((u64)0xffffffff << IRDMA_UDA_CQPSQ_QHASH_ADDR3_S)
391 
392 #define IRDMA_UDA_CQPSQ_QHASH_WQEVALID_S 63
393 #define IRDMA_UDA_CQPSQ_QHASH_WQEVALID_M \
394 	BIT_ULL(IRDMA_UDA_CQPSQ_QHASH_WQEVALID_S)
395 
396 #define IRDMA_UDA_CQPSQ_QHASH_OPCODE_S 32
397 #define IRDMA_UDA_CQPSQ_QHASH_OPCODE_M \
398 	((u64)0x3f << IRDMA_UDA_CQPSQ_QHASH_OPCODE_S)
399 
400 #define IRDMA_UDA_CQPSQ_QHASH_MANAGE_S 61
401 #define IRDMA_UDA_CQPSQ_QHASH_MANAGE_M \
402 	((u64)0x3 << IRDMA_UDA_CQPSQ_QHASH_MANAGE_S)
403 
404 #define IRDMA_UDA_CQPSQ_QHASH_IPV4VALID_S 60
405 #define IRDMA_UDA_CQPSQ_QHASH_IPV4VALID_M \
406 	((u64)0x1 << IRDMA_UDA_CQPSQ_QHASH_IPV4VALID_S)
407 
408 #define IRDMA_UDA_CQPSQ_QHASH_LANFWD_S 59
409 #define IRDMA_UDA_CQPSQ_QHASH_LANFWD_M \
410 	((u64)0x1 << IRDMA_UDA_CQPSQ_QHASH_LANFWD_S)
411 
412 #define IRDMA_UDA_CQPSQ_QHASH_ENTRYTYPE_S 42
413 #define IRDMA_UDA_CQPSQ_QHASH_ENTRYTYPE_M \
414 	((u64)0x7 << IRDMA_UDA_CQPSQ_QHASH_ENTRYTYPE_S)
415 #endif /* IRDMA_UDA_D_H */
416