Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
t4fw_ri_api.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009-2010 Chelsio, Inc. All rights reserved.
3  *
4  * This software is available to you under a choice of one of two
5  * licenses. You may choose to be licensed under the terms of the GNU
6  * General Public License (GPL) Version 2, available from the file
7  * COPYING in the main directory of this source tree, or the
8  * OpenIB.org BSD license below:
9  *
10  * Redistribution and use in source and binary forms, with or
11  * without modification, are permitted provided that the following
12  * conditions are met:
13  *
14  * - Redistributions of source code must retain the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer.
17  * - Redistributions in binary form must reproduce the above
18  * copyright notice, this list of conditions and the following
19  * disclaimer in the documentation and/or other materials
20  * provided with the distribution.
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
26  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29  * SOFTWARE.
30  */
31 #ifndef _T4FW_RI_API_H_
32 #define _T4FW_RI_API_H_
33 
34 #include "t4fw_api.h"
35 
37  FW_RI_RDMA_WRITE = 0x0, /* IETF RDMAP v1.0 ... */
40  FW_RI_SEND = 0x3,
45  FW_RI_RDMA_INIT = 0x8, /* CHELSIO RI specific ... */
50  FW_RI_BYPASS = 0xd,
52 
54 };
55 
63 };
64 
70 };
71 
78 };
79 
83 };
84 
92 };
93 
97  FW_RI_STAG_MW = 0x02,
99 };
100 
105 };
106 
110 };
111 
115 };
116 
117 struct fw_ri_dsgl {
123 #ifndef C99_NOT_SUPPORTED
124  struct fw_ri_dsge_pair sge[0];
125 #endif
126 };
127 
128 struct fw_ri_sge {
132 };
133 
134 struct fw_ri_isgl {
139 #ifndef C99_NOT_SUPPORTED
140  struct fw_ri_sge sge[0];
141 #endif
142 };
143 
144 struct fw_ri_immd {
149 #ifndef C99_NOT_SUPPORTED
150  __u8 data[0];
151 #endif
152 };
153 
154 struct fw_ri_tpte {
163 };
164 
165 #define S_FW_RI_TPTE_VALID 31
166 #define M_FW_RI_TPTE_VALID 0x1
167 #define V_FW_RI_TPTE_VALID(x) ((x) << S_FW_RI_TPTE_VALID)
168 #define G_FW_RI_TPTE_VALID(x) \
169  (((x) >> S_FW_RI_TPTE_VALID) & M_FW_RI_TPTE_VALID)
170 #define F_FW_RI_TPTE_VALID V_FW_RI_TPTE_VALID(1U)
171 
172 #define S_FW_RI_TPTE_STAGKEY 23
173 #define M_FW_RI_TPTE_STAGKEY 0xff
174 #define V_FW_RI_TPTE_STAGKEY(x) ((x) << S_FW_RI_TPTE_STAGKEY)
175 #define G_FW_RI_TPTE_STAGKEY(x) \
176  (((x) >> S_FW_RI_TPTE_STAGKEY) & M_FW_RI_TPTE_STAGKEY)
177 
178 #define S_FW_RI_TPTE_STAGSTATE 22
179 #define M_FW_RI_TPTE_STAGSTATE 0x1
180 #define V_FW_RI_TPTE_STAGSTATE(x) ((x) << S_FW_RI_TPTE_STAGSTATE)
181 #define G_FW_RI_TPTE_STAGSTATE(x) \
182  (((x) >> S_FW_RI_TPTE_STAGSTATE) & M_FW_RI_TPTE_STAGSTATE)
183 #define F_FW_RI_TPTE_STAGSTATE V_FW_RI_TPTE_STAGSTATE(1U)
184 
185 #define S_FW_RI_TPTE_STAGTYPE 20
186 #define M_FW_RI_TPTE_STAGTYPE 0x3
187 #define V_FW_RI_TPTE_STAGTYPE(x) ((x) << S_FW_RI_TPTE_STAGTYPE)
188 #define G_FW_RI_TPTE_STAGTYPE(x) \
189  (((x) >> S_FW_RI_TPTE_STAGTYPE) & M_FW_RI_TPTE_STAGTYPE)
190 
191 #define S_FW_RI_TPTE_PDID 0
192 #define M_FW_RI_TPTE_PDID 0xfffff
193 #define V_FW_RI_TPTE_PDID(x) ((x) << S_FW_RI_TPTE_PDID)
194 #define G_FW_RI_TPTE_PDID(x) \
195  (((x) >> S_FW_RI_TPTE_PDID) & M_FW_RI_TPTE_PDID)
196 
197 #define S_FW_RI_TPTE_PERM 28
198 #define M_FW_RI_TPTE_PERM 0xf
199 #define V_FW_RI_TPTE_PERM(x) ((x) << S_FW_RI_TPTE_PERM)
200 #define G_FW_RI_TPTE_PERM(x) \
201  (((x) >> S_FW_RI_TPTE_PERM) & M_FW_RI_TPTE_PERM)
202 
203 #define S_FW_RI_TPTE_REMINVDIS 27
204 #define M_FW_RI_TPTE_REMINVDIS 0x1
205 #define V_FW_RI_TPTE_REMINVDIS(x) ((x) << S_FW_RI_TPTE_REMINVDIS)
206 #define G_FW_RI_TPTE_REMINVDIS(x) \
207  (((x) >> S_FW_RI_TPTE_REMINVDIS) & M_FW_RI_TPTE_REMINVDIS)
208 #define F_FW_RI_TPTE_REMINVDIS V_FW_RI_TPTE_REMINVDIS(1U)
209 
210 #define S_FW_RI_TPTE_ADDRTYPE 26
211 #define M_FW_RI_TPTE_ADDRTYPE 1
212 #define V_FW_RI_TPTE_ADDRTYPE(x) ((x) << S_FW_RI_TPTE_ADDRTYPE)
213 #define G_FW_RI_TPTE_ADDRTYPE(x) \
214  (((x) >> S_FW_RI_TPTE_ADDRTYPE) & M_FW_RI_TPTE_ADDRTYPE)
215 #define F_FW_RI_TPTE_ADDRTYPE V_FW_RI_TPTE_ADDRTYPE(1U)
216 
217 #define S_FW_RI_TPTE_MWBINDEN 25
218 #define M_FW_RI_TPTE_MWBINDEN 0x1
219 #define V_FW_RI_TPTE_MWBINDEN(x) ((x) << S_FW_RI_TPTE_MWBINDEN)
220 #define G_FW_RI_TPTE_MWBINDEN(x) \
221  (((x) >> S_FW_RI_TPTE_MWBINDEN) & M_FW_RI_TPTE_MWBINDEN)
222 #define F_FW_RI_TPTE_MWBINDEN V_FW_RI_TPTE_MWBINDEN(1U)
223 
224 #define S_FW_RI_TPTE_PS 20
225 #define M_FW_RI_TPTE_PS 0x1f
226 #define V_FW_RI_TPTE_PS(x) ((x) << S_FW_RI_TPTE_PS)
227 #define G_FW_RI_TPTE_PS(x) \
228  (((x) >> S_FW_RI_TPTE_PS) & M_FW_RI_TPTE_PS)
229 
230 #define S_FW_RI_TPTE_QPID 0
231 #define M_FW_RI_TPTE_QPID 0xfffff
232 #define V_FW_RI_TPTE_QPID(x) ((x) << S_FW_RI_TPTE_QPID)
233 #define G_FW_RI_TPTE_QPID(x) \
234  (((x) >> S_FW_RI_TPTE_QPID) & M_FW_RI_TPTE_QPID)
235 
236 #define S_FW_RI_TPTE_NOSNOOP 30
237 #define M_FW_RI_TPTE_NOSNOOP 0x1
238 #define V_FW_RI_TPTE_NOSNOOP(x) ((x) << S_FW_RI_TPTE_NOSNOOP)
239 #define G_FW_RI_TPTE_NOSNOOP(x) \
240  (((x) >> S_FW_RI_TPTE_NOSNOOP) & M_FW_RI_TPTE_NOSNOOP)
241 #define F_FW_RI_TPTE_NOSNOOP V_FW_RI_TPTE_NOSNOOP(1U)
242 
243 #define S_FW_RI_TPTE_PBLADDR 0
244 #define M_FW_RI_TPTE_PBLADDR 0x1fffffff
245 #define V_FW_RI_TPTE_PBLADDR(x) ((x) << S_FW_RI_TPTE_PBLADDR)
246 #define G_FW_RI_TPTE_PBLADDR(x) \
247  (((x) >> S_FW_RI_TPTE_PBLADDR) & M_FW_RI_TPTE_PBLADDR)
248 
249 #define S_FW_RI_TPTE_DCA 24
250 #define M_FW_RI_TPTE_DCA 0x1f
251 #define V_FW_RI_TPTE_DCA(x) ((x) << S_FW_RI_TPTE_DCA)
252 #define G_FW_RI_TPTE_DCA(x) \
253  (((x) >> S_FW_RI_TPTE_DCA) & M_FW_RI_TPTE_DCA)
254 
255 #define S_FW_RI_TPTE_MWBCNT_PSTAG 0
256 #define M_FW_RI_TPTE_MWBCNT_PSTAG 0xffffff
257 #define V_FW_RI_TPTE_MWBCNT_PSTAT(x) \
258  ((x) << S_FW_RI_TPTE_MWBCNT_PSTAG)
259 #define G_FW_RI_TPTE_MWBCNT_PSTAG(x) \
260  (((x) >> S_FW_RI_TPTE_MWBCNT_PSTAG) & M_FW_RI_TPTE_MWBCNT_PSTAG)
261 
266 };
267 
271 };
272 
273 struct fw_ri_res {
275  struct fw_ri_res_sqrq {
280  __be32 r4[2];
284  } sqrq;
285  struct fw_ri_res_cq {
290  __be32 r4[2];
298  } cq;
299  } u;
300 };
301 
302 struct fw_ri_res_wr {
306 #ifndef C99_NOT_SUPPORTED
307  struct fw_ri_res res[0];
308 #endif
309 };
310 
311 #define S_FW_RI_RES_WR_NRES 0
312 #define M_FW_RI_RES_WR_NRES 0xff
313 #define V_FW_RI_RES_WR_NRES(x) ((x) << S_FW_RI_RES_WR_NRES)
314 #define G_FW_RI_RES_WR_NRES(x) \
315  (((x) >> S_FW_RI_RES_WR_NRES) & M_FW_RI_RES_WR_NRES)
316 
317 #define S_FW_RI_RES_WR_FETCHSZM 26
318 #define M_FW_RI_RES_WR_FETCHSZM 0x1
319 #define V_FW_RI_RES_WR_FETCHSZM(x) ((x) << S_FW_RI_RES_WR_FETCHSZM)
320 #define G_FW_RI_RES_WR_FETCHSZM(x) \
321  (((x) >> S_FW_RI_RES_WR_FETCHSZM) & M_FW_RI_RES_WR_FETCHSZM)
322 #define F_FW_RI_RES_WR_FETCHSZM V_FW_RI_RES_WR_FETCHSZM(1U)
323 
324 #define S_FW_RI_RES_WR_STATUSPGNS 25
325 #define M_FW_RI_RES_WR_STATUSPGNS 0x1
326 #define V_FW_RI_RES_WR_STATUSPGNS(x) ((x) << S_FW_RI_RES_WR_STATUSPGNS)
327 #define G_FW_RI_RES_WR_STATUSPGNS(x) \
328  (((x) >> S_FW_RI_RES_WR_STATUSPGNS) & M_FW_RI_RES_WR_STATUSPGNS)
329 #define F_FW_RI_RES_WR_STATUSPGNS V_FW_RI_RES_WR_STATUSPGNS(1U)
330 
331 #define S_FW_RI_RES_WR_STATUSPGRO 24
332 #define M_FW_RI_RES_WR_STATUSPGRO 0x1
333 #define V_FW_RI_RES_WR_STATUSPGRO(x) ((x) << S_FW_RI_RES_WR_STATUSPGRO)
334 #define G_FW_RI_RES_WR_STATUSPGRO(x) \
335  (((x) >> S_FW_RI_RES_WR_STATUSPGRO) & M_FW_RI_RES_WR_STATUSPGRO)
336 #define F_FW_RI_RES_WR_STATUSPGRO V_FW_RI_RES_WR_STATUSPGRO(1U)
337 
338 #define S_FW_RI_RES_WR_FETCHNS 23
339 #define M_FW_RI_RES_WR_FETCHNS 0x1
340 #define V_FW_RI_RES_WR_FETCHNS(x) ((x) << S_FW_RI_RES_WR_FETCHNS)
341 #define G_FW_RI_RES_WR_FETCHNS(x) \
342  (((x) >> S_FW_RI_RES_WR_FETCHNS) & M_FW_RI_RES_WR_FETCHNS)
343 #define F_FW_RI_RES_WR_FETCHNS V_FW_RI_RES_WR_FETCHNS(1U)
344 
345 #define S_FW_RI_RES_WR_FETCHRO 22
346 #define M_FW_RI_RES_WR_FETCHRO 0x1
347 #define V_FW_RI_RES_WR_FETCHRO(x) ((x) << S_FW_RI_RES_WR_FETCHRO)
348 #define G_FW_RI_RES_WR_FETCHRO(x) \
349  (((x) >> S_FW_RI_RES_WR_FETCHRO) & M_FW_RI_RES_WR_FETCHRO)
350 #define F_FW_RI_RES_WR_FETCHRO V_FW_RI_RES_WR_FETCHRO(1U)
351 
352 #define S_FW_RI_RES_WR_HOSTFCMODE 20
353 #define M_FW_RI_RES_WR_HOSTFCMODE 0x3
354 #define V_FW_RI_RES_WR_HOSTFCMODE(x) ((x) << S_FW_RI_RES_WR_HOSTFCMODE)
355 #define G_FW_RI_RES_WR_HOSTFCMODE(x) \
356  (((x) >> S_FW_RI_RES_WR_HOSTFCMODE) & M_FW_RI_RES_WR_HOSTFCMODE)
357 
358 #define S_FW_RI_RES_WR_CPRIO 19
359 #define M_FW_RI_RES_WR_CPRIO 0x1
360 #define V_FW_RI_RES_WR_CPRIO(x) ((x) << S_FW_RI_RES_WR_CPRIO)
361 #define G_FW_RI_RES_WR_CPRIO(x) \
362  (((x) >> S_FW_RI_RES_WR_CPRIO) & M_FW_RI_RES_WR_CPRIO)
363 #define F_FW_RI_RES_WR_CPRIO V_FW_RI_RES_WR_CPRIO(1U)
364 
365 #define S_FW_RI_RES_WR_ONCHIP 18
366 #define M_FW_RI_RES_WR_ONCHIP 0x1
367 #define V_FW_RI_RES_WR_ONCHIP(x) ((x) << S_FW_RI_RES_WR_ONCHIP)
368 #define G_FW_RI_RES_WR_ONCHIP(x) \
369  (((x) >> S_FW_RI_RES_WR_ONCHIP) & M_FW_RI_RES_WR_ONCHIP)
370 #define F_FW_RI_RES_WR_ONCHIP V_FW_RI_RES_WR_ONCHIP(1U)
371 
372 #define S_FW_RI_RES_WR_PCIECHN 16
373 #define M_FW_RI_RES_WR_PCIECHN 0x3
374 #define V_FW_RI_RES_WR_PCIECHN(x) ((x) << S_FW_RI_RES_WR_PCIECHN)
375 #define G_FW_RI_RES_WR_PCIECHN(x) \
376  (((x) >> S_FW_RI_RES_WR_PCIECHN) & M_FW_RI_RES_WR_PCIECHN)
377 
378 #define S_FW_RI_RES_WR_IQID 0
379 #define M_FW_RI_RES_WR_IQID 0xffff
380 #define V_FW_RI_RES_WR_IQID(x) ((x) << S_FW_RI_RES_WR_IQID)
381 #define G_FW_RI_RES_WR_IQID(x) \
382  (((x) >> S_FW_RI_RES_WR_IQID) & M_FW_RI_RES_WR_IQID)
383 
384 #define S_FW_RI_RES_WR_DCAEN 31
385 #define M_FW_RI_RES_WR_DCAEN 0x1
386 #define V_FW_RI_RES_WR_DCAEN(x) ((x) << S_FW_RI_RES_WR_DCAEN)
387 #define G_FW_RI_RES_WR_DCAEN(x) \
388  (((x) >> S_FW_RI_RES_WR_DCAEN) & M_FW_RI_RES_WR_DCAEN)
389 #define F_FW_RI_RES_WR_DCAEN V_FW_RI_RES_WR_DCAEN(1U)
390 
391 #define S_FW_RI_RES_WR_DCACPU 26
392 #define M_FW_RI_RES_WR_DCACPU 0x1f
393 #define V_FW_RI_RES_WR_DCACPU(x) ((x) << S_FW_RI_RES_WR_DCACPU)
394 #define G_FW_RI_RES_WR_DCACPU(x) \
395  (((x) >> S_FW_RI_RES_WR_DCACPU) & M_FW_RI_RES_WR_DCACPU)
396 
397 #define S_FW_RI_RES_WR_FBMIN 23
398 #define M_FW_RI_RES_WR_FBMIN 0x7
399 #define V_FW_RI_RES_WR_FBMIN(x) ((x) << S_FW_RI_RES_WR_FBMIN)
400 #define G_FW_RI_RES_WR_FBMIN(x) \
401  (((x) >> S_FW_RI_RES_WR_FBMIN) & M_FW_RI_RES_WR_FBMIN)
402 
403 #define S_FW_RI_RES_WR_FBMAX 20
404 #define M_FW_RI_RES_WR_FBMAX 0x7
405 #define V_FW_RI_RES_WR_FBMAX(x) ((x) << S_FW_RI_RES_WR_FBMAX)
406 #define G_FW_RI_RES_WR_FBMAX(x) \
407  (((x) >> S_FW_RI_RES_WR_FBMAX) & M_FW_RI_RES_WR_FBMAX)
408 
409 #define S_FW_RI_RES_WR_CIDXFTHRESHO 19
410 #define M_FW_RI_RES_WR_CIDXFTHRESHO 0x1
411 #define V_FW_RI_RES_WR_CIDXFTHRESHO(x) ((x) << S_FW_RI_RES_WR_CIDXFTHRESHO)
412 #define G_FW_RI_RES_WR_CIDXFTHRESHO(x) \
413  (((x) >> S_FW_RI_RES_WR_CIDXFTHRESHO) & M_FW_RI_RES_WR_CIDXFTHRESHO)
414 #define F_FW_RI_RES_WR_CIDXFTHRESHO V_FW_RI_RES_WR_CIDXFTHRESHO(1U)
415 
416 #define S_FW_RI_RES_WR_CIDXFTHRESH 16
417 #define M_FW_RI_RES_WR_CIDXFTHRESH 0x7
418 #define V_FW_RI_RES_WR_CIDXFTHRESH(x) ((x) << S_FW_RI_RES_WR_CIDXFTHRESH)
419 #define G_FW_RI_RES_WR_CIDXFTHRESH(x) \
420  (((x) >> S_FW_RI_RES_WR_CIDXFTHRESH) & M_FW_RI_RES_WR_CIDXFTHRESH)
421 
422 #define S_FW_RI_RES_WR_EQSIZE 0
423 #define M_FW_RI_RES_WR_EQSIZE 0xffff
424 #define V_FW_RI_RES_WR_EQSIZE(x) ((x) << S_FW_RI_RES_WR_EQSIZE)
425 #define G_FW_RI_RES_WR_EQSIZE(x) \
426  (((x) >> S_FW_RI_RES_WR_EQSIZE) & M_FW_RI_RES_WR_EQSIZE)
427 
428 #define S_FW_RI_RES_WR_IQANDST 15
429 #define M_FW_RI_RES_WR_IQANDST 0x1
430 #define V_FW_RI_RES_WR_IQANDST(x) ((x) << S_FW_RI_RES_WR_IQANDST)
431 #define G_FW_RI_RES_WR_IQANDST(x) \
432  (((x) >> S_FW_RI_RES_WR_IQANDST) & M_FW_RI_RES_WR_IQANDST)
433 #define F_FW_RI_RES_WR_IQANDST V_FW_RI_RES_WR_IQANDST(1U)
434 
435 #define S_FW_RI_RES_WR_IQANUS 14
436 #define M_FW_RI_RES_WR_IQANUS 0x1
437 #define V_FW_RI_RES_WR_IQANUS(x) ((x) << S_FW_RI_RES_WR_IQANUS)
438 #define G_FW_RI_RES_WR_IQANUS(x) \
439  (((x) >> S_FW_RI_RES_WR_IQANUS) & M_FW_RI_RES_WR_IQANUS)
440 #define F_FW_RI_RES_WR_IQANUS V_FW_RI_RES_WR_IQANUS(1U)
441 
442 #define S_FW_RI_RES_WR_IQANUD 12
443 #define M_FW_RI_RES_WR_IQANUD 0x3
444 #define V_FW_RI_RES_WR_IQANUD(x) ((x) << S_FW_RI_RES_WR_IQANUD)
445 #define G_FW_RI_RES_WR_IQANUD(x) \
446  (((x) >> S_FW_RI_RES_WR_IQANUD) & M_FW_RI_RES_WR_IQANUD)
447 
448 #define S_FW_RI_RES_WR_IQANDSTINDEX 0
449 #define M_FW_RI_RES_WR_IQANDSTINDEX 0xfff
450 #define V_FW_RI_RES_WR_IQANDSTINDEX(x) ((x) << S_FW_RI_RES_WR_IQANDSTINDEX)
451 #define G_FW_RI_RES_WR_IQANDSTINDEX(x) \
452  (((x) >> S_FW_RI_RES_WR_IQANDSTINDEX) & M_FW_RI_RES_WR_IQANDSTINDEX)
453 
454 #define S_FW_RI_RES_WR_IQDROPRSS 15
455 #define M_FW_RI_RES_WR_IQDROPRSS 0x1
456 #define V_FW_RI_RES_WR_IQDROPRSS(x) ((x) << S_FW_RI_RES_WR_IQDROPRSS)
457 #define G_FW_RI_RES_WR_IQDROPRSS(x) \
458  (((x) >> S_FW_RI_RES_WR_IQDROPRSS) & M_FW_RI_RES_WR_IQDROPRSS)
459 #define F_FW_RI_RES_WR_IQDROPRSS V_FW_RI_RES_WR_IQDROPRSS(1U)
460 
461 #define S_FW_RI_RES_WR_IQGTSMODE 14
462 #define M_FW_RI_RES_WR_IQGTSMODE 0x1
463 #define V_FW_RI_RES_WR_IQGTSMODE(x) ((x) << S_FW_RI_RES_WR_IQGTSMODE)
464 #define G_FW_RI_RES_WR_IQGTSMODE(x) \
465  (((x) >> S_FW_RI_RES_WR_IQGTSMODE) & M_FW_RI_RES_WR_IQGTSMODE)
466 #define F_FW_RI_RES_WR_IQGTSMODE V_FW_RI_RES_WR_IQGTSMODE(1U)
467 
468 #define S_FW_RI_RES_WR_IQPCIECH 12
469 #define M_FW_RI_RES_WR_IQPCIECH 0x3
470 #define V_FW_RI_RES_WR_IQPCIECH(x) ((x) << S_FW_RI_RES_WR_IQPCIECH)
471 #define G_FW_RI_RES_WR_IQPCIECH(x) \
472  (((x) >> S_FW_RI_RES_WR_IQPCIECH) & M_FW_RI_RES_WR_IQPCIECH)
473 
474 #define S_FW_RI_RES_WR_IQDCAEN 11
475 #define M_FW_RI_RES_WR_IQDCAEN 0x1
476 #define V_FW_RI_RES_WR_IQDCAEN(x) ((x) << S_FW_RI_RES_WR_IQDCAEN)
477 #define G_FW_RI_RES_WR_IQDCAEN(x) \
478  (((x) >> S_FW_RI_RES_WR_IQDCAEN) & M_FW_RI_RES_WR_IQDCAEN)
479 #define F_FW_RI_RES_WR_IQDCAEN V_FW_RI_RES_WR_IQDCAEN(1U)
480 
481 #define S_FW_RI_RES_WR_IQDCACPU 6
482 #define M_FW_RI_RES_WR_IQDCACPU 0x1f
483 #define V_FW_RI_RES_WR_IQDCACPU(x) ((x) << S_FW_RI_RES_WR_IQDCACPU)
484 #define G_FW_RI_RES_WR_IQDCACPU(x) \
485  (((x) >> S_FW_RI_RES_WR_IQDCACPU) & M_FW_RI_RES_WR_IQDCACPU)
486 
487 #define S_FW_RI_RES_WR_IQINTCNTTHRESH 4
488 #define M_FW_RI_RES_WR_IQINTCNTTHRESH 0x3
489 #define V_FW_RI_RES_WR_IQINTCNTTHRESH(x) \
490  ((x) << S_FW_RI_RES_WR_IQINTCNTTHRESH)
491 #define G_FW_RI_RES_WR_IQINTCNTTHRESH(x) \
492  (((x) >> S_FW_RI_RES_WR_IQINTCNTTHRESH) & M_FW_RI_RES_WR_IQINTCNTTHRESH)
493 
494 #define S_FW_RI_RES_WR_IQO 3
495 #define M_FW_RI_RES_WR_IQO 0x1
496 #define V_FW_RI_RES_WR_IQO(x) ((x) << S_FW_RI_RES_WR_IQO)
497 #define G_FW_RI_RES_WR_IQO(x) \
498  (((x) >> S_FW_RI_RES_WR_IQO) & M_FW_RI_RES_WR_IQO)
499 #define F_FW_RI_RES_WR_IQO V_FW_RI_RES_WR_IQO(1U)
500 
501 #define S_FW_RI_RES_WR_IQCPRIO 2
502 #define M_FW_RI_RES_WR_IQCPRIO 0x1
503 #define V_FW_RI_RES_WR_IQCPRIO(x) ((x) << S_FW_RI_RES_WR_IQCPRIO)
504 #define G_FW_RI_RES_WR_IQCPRIO(x) \
505  (((x) >> S_FW_RI_RES_WR_IQCPRIO) & M_FW_RI_RES_WR_IQCPRIO)
506 #define F_FW_RI_RES_WR_IQCPRIO V_FW_RI_RES_WR_IQCPRIO(1U)
507 
508 #define S_FW_RI_RES_WR_IQESIZE 0
509 #define M_FW_RI_RES_WR_IQESIZE 0x3
510 #define V_FW_RI_RES_WR_IQESIZE(x) ((x) << S_FW_RI_RES_WR_IQESIZE)
511 #define G_FW_RI_RES_WR_IQESIZE(x) \
512  (((x) >> S_FW_RI_RES_WR_IQESIZE) & M_FW_RI_RES_WR_IQESIZE)
513 
514 #define S_FW_RI_RES_WR_IQNS 31
515 #define M_FW_RI_RES_WR_IQNS 0x1
516 #define V_FW_RI_RES_WR_IQNS(x) ((x) << S_FW_RI_RES_WR_IQNS)
517 #define G_FW_RI_RES_WR_IQNS(x) \
518  (((x) >> S_FW_RI_RES_WR_IQNS) & M_FW_RI_RES_WR_IQNS)
519 #define F_FW_RI_RES_WR_IQNS V_FW_RI_RES_WR_IQNS(1U)
520 
521 #define S_FW_RI_RES_WR_IQRO 30
522 #define M_FW_RI_RES_WR_IQRO 0x1
523 #define V_FW_RI_RES_WR_IQRO(x) ((x) << S_FW_RI_RES_WR_IQRO)
524 #define G_FW_RI_RES_WR_IQRO(x) \
525  (((x) >> S_FW_RI_RES_WR_IQRO) & M_FW_RI_RES_WR_IQRO)
526 #define F_FW_RI_RES_WR_IQRO V_FW_RI_RES_WR_IQRO(1U)
527 
532  __u8 r1[3];
538 #ifndef C99_NOT_SUPPORTED
539  union {
540  struct fw_ri_immd immd_src[0];
541  struct fw_ri_isgl isgl_src[0];
542  } u;
543 #endif
544 };
545 
550  __u8 r1[3];
557 #ifndef C99_NOT_SUPPORTED
558  union {
559  struct fw_ri_immd immd_src[0];
560  struct fw_ri_isgl isgl_src[0];
561  } u;
562 #endif
563 };
564 
565 #define S_FW_RI_SEND_WR_SENDOP 0
566 #define M_FW_RI_SEND_WR_SENDOP 0xf
567 #define V_FW_RI_SEND_WR_SENDOP(x) ((x) << S_FW_RI_SEND_WR_SENDOP)
568 #define G_FW_RI_SEND_WR_SENDOP(x) \
569  (((x) >> S_FW_RI_SEND_WR_SENDOP) & M_FW_RI_SEND_WR_SENDOP)
570 
575  __u8 r1[3];
586 };
587 
592  __u8 r2[3];
594  struct fw_ri_isgl isgl;
595 };
596 
601  __u8 r1[3];
613 };
614 
615 #define S_FW_RI_BIND_MW_WR_QPBINDE 6
616 #define M_FW_RI_BIND_MW_WR_QPBINDE 0x1
617 #define V_FW_RI_BIND_MW_WR_QPBINDE(x) ((x) << S_FW_RI_BIND_MW_WR_QPBINDE)
618 #define G_FW_RI_BIND_MW_WR_QPBINDE(x) \
619  (((x) >> S_FW_RI_BIND_MW_WR_QPBINDE) & M_FW_RI_BIND_MW_WR_QPBINDE)
620 #define F_FW_RI_BIND_MW_WR_QPBINDE V_FW_RI_BIND_MW_WR_QPBINDE(1U)
621 
622 #define S_FW_RI_BIND_MW_WR_NS 5
623 #define M_FW_RI_BIND_MW_WR_NS 0x1
624 #define V_FW_RI_BIND_MW_WR_NS(x) ((x) << S_FW_RI_BIND_MW_WR_NS)
625 #define G_FW_RI_BIND_MW_WR_NS(x) \
626  (((x) >> S_FW_RI_BIND_MW_WR_NS) & M_FW_RI_BIND_MW_WR_NS)
627 #define F_FW_RI_BIND_MW_WR_NS V_FW_RI_BIND_MW_WR_NS(1U)
628 
629 #define S_FW_RI_BIND_MW_WR_DCACPU 0
630 #define M_FW_RI_BIND_MW_WR_DCACPU 0x1f
631 #define V_FW_RI_BIND_MW_WR_DCACPU(x) ((x) << S_FW_RI_BIND_MW_WR_DCACPU)
632 #define G_FW_RI_BIND_MW_WR_DCACPU(x) \
633  (((x) >> S_FW_RI_BIND_MW_WR_DCACPU) & M_FW_RI_BIND_MW_WR_DCACPU)
634 
639  __u8 r1[3];
650 };
651 
652 #define S_FW_RI_FR_NSMR_WR_QPBINDE 6
653 #define M_FW_RI_FR_NSMR_WR_QPBINDE 0x1
654 #define V_FW_RI_FR_NSMR_WR_QPBINDE(x) ((x) << S_FW_RI_FR_NSMR_WR_QPBINDE)
655 #define G_FW_RI_FR_NSMR_WR_QPBINDE(x) \
656  (((x) >> S_FW_RI_FR_NSMR_WR_QPBINDE) & M_FW_RI_FR_NSMR_WR_QPBINDE)
657 #define F_FW_RI_FR_NSMR_WR_QPBINDE V_FW_RI_FR_NSMR_WR_QPBINDE(1U)
658 
659 #define S_FW_RI_FR_NSMR_WR_NS 5
660 #define M_FW_RI_FR_NSMR_WR_NS 0x1
661 #define V_FW_RI_FR_NSMR_WR_NS(x) ((x) << S_FW_RI_FR_NSMR_WR_NS)
662 #define G_FW_RI_FR_NSMR_WR_NS(x) \
663  (((x) >> S_FW_RI_FR_NSMR_WR_NS) & M_FW_RI_FR_NSMR_WR_NS)
664 #define F_FW_RI_FR_NSMR_WR_NS V_FW_RI_FR_NSMR_WR_NS(1U)
665 
666 #define S_FW_RI_FR_NSMR_WR_DCACPU 0
667 #define M_FW_RI_FR_NSMR_WR_DCACPU 0x1f
668 #define V_FW_RI_FR_NSMR_WR_DCACPU(x) ((x) << S_FW_RI_FR_NSMR_WR_DCACPU)
669 #define G_FW_RI_FR_NSMR_WR_DCACPU(x) \
670  (((x) >> S_FW_RI_FR_NSMR_WR_DCACPU) & M_FW_RI_FR_NSMR_WR_DCACPU)
671 
676  __u8 r1[3];
680 };
681 
686 };
687 
696 };
697 
698 struct fw_ri_wr {
702  union fw_ri {
703  struct fw_ri_init {
706  __u8 r4[2];
727  } u;
728  } init;
729  struct fw_ri_fini {
731  __u8 r3[7];
733  } fini;
736  __u8 r3[3];
739  } terminate;
740  } u;
741 };
742 
743 #define S_FW_RI_WR_MPAREQBIT 7
744 #define M_FW_RI_WR_MPAREQBIT 0x1
745 #define V_FW_RI_WR_MPAREQBIT(x) ((x) << S_FW_RI_WR_MPAREQBIT)
746 #define G_FW_RI_WR_MPAREQBIT(x) \
747  (((x) >> S_FW_RI_WR_MPAREQBIT) & M_FW_RI_WR_MPAREQBIT)
748 #define F_FW_RI_WR_MPAREQBIT V_FW_RI_WR_MPAREQBIT(1U)
749 
750 #define S_FW_RI_WR_P2PTYPE 0
751 #define M_FW_RI_WR_P2PTYPE 0xf
752 #define V_FW_RI_WR_P2PTYPE(x) ((x) << S_FW_RI_WR_P2PTYPE)
753 #define G_FW_RI_WR_P2PTYPE(x) \
754  (((x) >> S_FW_RI_WR_P2PTYPE) & M_FW_RI_WR_P2PTYPE)
755 
756 struct tcp_options {
759 #if defined(__LITTLE_ENDIAN_BITFIELD)
760  __u8:4;
761  __u8 unknown:1;
762  __u8:1;
763  __u8 sack:1;
764  __u8 tstamp:1;
765 #else
768  __u8:1;
770  __u8:4;
771 #endif
772 };
773 
775  union opcode_tid ot;
783 };
784 
785 /* cpl_pass_accept_req.hdr_len fields */
786 #define S_SYN_RX_CHAN 0
787 #define M_SYN_RX_CHAN 0xF
788 #define V_SYN_RX_CHAN(x) ((x) << S_SYN_RX_CHAN)
789 #define G_SYN_RX_CHAN(x) (((x) >> S_SYN_RX_CHAN) & M_SYN_RX_CHAN)
790 
791 #define S_TCP_HDR_LEN 10
792 #define M_TCP_HDR_LEN 0x3F
793 #define V_TCP_HDR_LEN(x) ((x) << S_TCP_HDR_LEN)
794 #define G_TCP_HDR_LEN(x) (((x) >> S_TCP_HDR_LEN) & M_TCP_HDR_LEN)
795 
796 #define S_IP_HDR_LEN 16
797 #define M_IP_HDR_LEN 0x3FF
798 #define V_IP_HDR_LEN(x) ((x) << S_IP_HDR_LEN)
799 #define G_IP_HDR_LEN(x) (((x) >> S_IP_HDR_LEN) & M_IP_HDR_LEN)
800 
801 #define S_ETH_HDR_LEN 26
802 #define M_ETH_HDR_LEN 0x1F
803 #define V_ETH_HDR_LEN(x) ((x) << S_ETH_HDR_LEN)
804 #define G_ETH_HDR_LEN(x) (((x) >> S_ETH_HDR_LEN) & M_ETH_HDR_LEN)
805 
806 /* cpl_pass_accept_req.l2info fields */
807 #define S_SYN_MAC_IDX 0
808 #define M_SYN_MAC_IDX 0x1FF
809 #define V_SYN_MAC_IDX(x) ((x) << S_SYN_MAC_IDX)
810 #define G_SYN_MAC_IDX(x) (((x) >> S_SYN_MAC_IDX) & M_SYN_MAC_IDX)
811 
812 #define S_SYN_XACT_MATCH 9
813 #define V_SYN_XACT_MATCH(x) ((x) << S_SYN_XACT_MATCH)
814 #define F_SYN_XACT_MATCH V_SYN_XACT_MATCH(1U)
815 
816 #define S_SYN_INTF 12
817 #define M_SYN_INTF 0xF
818 #define V_SYN_INTF(x) ((x) << S_SYN_INTF)
819 #define G_SYN_INTF(x) (((x) >> S_SYN_INTF) & M_SYN_INTF)
820 
821 struct ulptx_idata {
824 };
825 
826 #define S_ULPTX_NSGE 0
827 #define M_ULPTX_NSGE 0xFFFF
828 #define V_ULPTX_NSGE(x) ((x) << S_ULPTX_NSGE)
829 
830 #define S_RX_DACK_MODE 29
831 #define M_RX_DACK_MODE 0x3
832 #define V_RX_DACK_MODE(x) ((x) << S_RX_DACK_MODE)
833 #define G_RX_DACK_MODE(x) (((x) >> S_RX_DACK_MODE) & M_RX_DACK_MODE)
834 
835 #define S_RX_DACK_CHANGE 31
836 #define V_RX_DACK_CHANGE(x) ((x) << S_RX_DACK_CHANGE)
837 #define F_RX_DACK_CHANGE V_RX_DACK_CHANGE(1U)
838 
839 #endif /* _T4FW_RI_API_H_ */