1
2
3
4
5
6
7
8
9
10
11#ifndef RVU_STRUCT_H
12#define RVU_STRUCT_H
13
14
15#define RVU_BLK_RVUM_REVID 0x01
16
17
18enum rvu_block_addr_e {
19 BLKADDR_RVUM = 0x0ULL,
20 BLKADDR_LMT = 0x1ULL,
21 BLKADDR_MSIX = 0x2ULL,
22 BLKADDR_NPA = 0x3ULL,
23 BLKADDR_NIX0 = 0x4ULL,
24 BLKADDR_NIX1 = 0x5ULL,
25 BLKADDR_NPC = 0x6ULL,
26 BLKADDR_SSO = 0x7ULL,
27 BLKADDR_SSOW = 0x8ULL,
28 BLKADDR_TIM = 0x9ULL,
29 BLKADDR_CPT0 = 0xaULL,
30 BLKADDR_CPT1 = 0xbULL,
31 BLKADDR_NDC_NIX0_RX = 0xcULL,
32 BLKADDR_NDC_NIX0_TX = 0xdULL,
33 BLKADDR_NDC_NPA0 = 0xeULL,
34 BLK_COUNT = 0xfULL,
35};
36
37
38enum rvu_block_type_e {
39 BLKTYPE_RVUM = 0x0,
40 BLKTYPE_MSIX = 0x1,
41 BLKTYPE_LMT = 0x2,
42 BLKTYPE_NIX = 0x3,
43 BLKTYPE_NPA = 0x4,
44 BLKTYPE_NPC = 0x5,
45 BLKTYPE_SSO = 0x6,
46 BLKTYPE_SSOW = 0x7,
47 BLKTYPE_TIM = 0x8,
48 BLKTYPE_CPT = 0x9,
49 BLKTYPE_NDC = 0xa,
50 BLKTYPE_MAX = 0xa,
51};
52
53
54enum rvu_af_int_vec_e {
55 RVU_AF_INT_VEC_POISON = 0x0,
56 RVU_AF_INT_VEC_PFFLR = 0x1,
57 RVU_AF_INT_VEC_PFME = 0x2,
58 RVU_AF_INT_VEC_GEN = 0x3,
59 RVU_AF_INT_VEC_MBOX = 0x4,
60 RVU_AF_INT_VEC_CNT = 0x5,
61};
62
63
64
65
66enum rvu_pf_int_vec_e {
67 RVU_PF_INT_VEC_VFFLR0 = 0x0,
68 RVU_PF_INT_VEC_VFFLR1 = 0x1,
69 RVU_PF_INT_VEC_VFME0 = 0x2,
70 RVU_PF_INT_VEC_VFME1 = 0x3,
71 RVU_PF_INT_VEC_VFPF_MBOX0 = 0x4,
72 RVU_PF_INT_VEC_VFPF_MBOX1 = 0x5,
73 RVU_PF_INT_VEC_AFPF_MBOX = 0x6,
74 RVU_PF_INT_VEC_CNT = 0x7,
75};
76
77
78enum npa_aq_comp {
79 NPA_AQ_COMP_NOTDONE = 0x0,
80 NPA_AQ_COMP_GOOD = 0x1,
81 NPA_AQ_COMP_SWERR = 0x2,
82 NPA_AQ_COMP_CTX_POISON = 0x3,
83 NPA_AQ_COMP_CTX_FAULT = 0x4,
84 NPA_AQ_COMP_LOCKERR = 0x5,
85};
86
87
88enum npa_aq_ctype {
89 NPA_AQ_CTYPE_AURA = 0x0,
90 NPA_AQ_CTYPE_POOL = 0x1,
91};
92
93
94enum npa_aq_instop {
95 NPA_AQ_INSTOP_NOP = 0x0,
96 NPA_AQ_INSTOP_INIT = 0x1,
97 NPA_AQ_INSTOP_WRITE = 0x2,
98 NPA_AQ_INSTOP_READ = 0x3,
99 NPA_AQ_INSTOP_LOCK = 0x4,
100 NPA_AQ_INSTOP_UNLOCK = 0x5,
101};
102
103
104struct npa_aq_inst_s {
105#if defined(__BIG_ENDIAN_BITFIELD)
106 u64 doneint : 1;
107 u64 reserved_44_62 : 19;
108 u64 cindex : 20;
109 u64 reserved_17_23 : 7;
110 u64 lf : 9;
111 u64 ctype : 4;
112 u64 op : 4;
113#else
114 u64 op : 4;
115 u64 ctype : 4;
116 u64 lf : 9;
117 u64 reserved_17_23 : 7;
118 u64 cindex : 20;
119 u64 reserved_44_62 : 19;
120 u64 doneint : 1;
121#endif
122 u64 res_addr;
123};
124
125
126struct npa_aq_res_s {
127#if defined(__BIG_ENDIAN_BITFIELD)
128 u64 reserved_17_63 : 47;
129 u64 doneint : 1;
130 u64 compcode : 8;
131 u64 ctype : 4;
132 u64 op : 4;
133#else
134 u64 op : 4;
135 u64 ctype : 4;
136 u64 compcode : 8;
137 u64 doneint : 1;
138 u64 reserved_17_63 : 47;
139#endif
140 u64 reserved_64_127;
141};
142
143struct npa_aura_s {
144 u64 pool_addr;
145#if defined(__BIG_ENDIAN_BITFIELD)
146 u64 avg_level : 8;
147 u64 reserved_118_119 : 2;
148 u64 shift : 6;
149 u64 aura_drop : 8;
150 u64 reserved_98_103 : 6;
151 u64 bp_ena : 2;
152 u64 aura_drop_ena : 1;
153 u64 pool_drop_ena : 1;
154 u64 reserved_93 : 1;
155 u64 avg_con : 9;
156 u64 pool_way_mask : 16;
157 u64 pool_caching : 1;
158 u64 reserved_65 : 2;
159 u64 ena : 1;
160#else
161 u64 ena : 1;
162 u64 reserved_65 : 2;
163 u64 pool_caching : 1;
164 u64 pool_way_mask : 16;
165 u64 avg_con : 9;
166 u64 reserved_93 : 1;
167 u64 pool_drop_ena : 1;
168 u64 aura_drop_ena : 1;
169 u64 bp_ena : 2;
170 u64 reserved_98_103 : 6;
171 u64 aura_drop : 8;
172 u64 shift : 6;
173 u64 reserved_118_119 : 2;
174 u64 avg_level : 8;
175#endif
176#if defined(__BIG_ENDIAN_BITFIELD)
177 u64 reserved_189_191 : 3;
178 u64 nix1_bpid : 9;
179 u64 reserved_177_179 : 3;
180 u64 nix0_bpid : 9;
181 u64 reserved_164_167 : 4;
182 u64 count : 36;
183#else
184 u64 count : 36;
185 u64 reserved_164_167 : 4;
186 u64 nix0_bpid : 9;
187 u64 reserved_177_179 : 3;
188 u64 nix1_bpid : 9;
189 u64 reserved_189_191 : 3;
190#endif
191#if defined(__BIG_ENDIAN_BITFIELD)
192 u64 reserved_252_255 : 4;
193 u64 fc_hyst_bits : 4;
194 u64 fc_stype : 2;
195 u64 fc_up_crossing : 1;
196 u64 fc_ena : 1;
197 u64 reserved_240_243 : 4;
198 u64 bp : 8;
199 u64 reserved_228_231 : 4;
200 u64 limit : 36;
201#else
202 u64 limit : 36;
203 u64 reserved_228_231 : 4;
204 u64 bp : 8;
205 u64 reserved_240_243 : 4;
206 u64 fc_ena : 1;
207 u64 fc_up_crossing : 1;
208 u64 fc_stype : 2;
209 u64 fc_hyst_bits : 4;
210 u64 reserved_252_255 : 4;
211#endif
212 u64 fc_addr;
213#if defined(__BIG_ENDIAN_BITFIELD)
214 u64 reserved_379_383 : 5;
215 u64 err_qint_idx : 7;
216 u64 reserved_371 : 1;
217 u64 thresh_qint_idx : 7;
218 u64 reserved_363 : 1;
219 u64 thresh_up : 1;
220 u64 thresh_int_ena : 1;
221 u64 thresh_int : 1;
222 u64 err_int_ena : 8;
223 u64 err_int : 8;
224 u64 update_time : 16;
225 u64 pool_drop : 8;
226#else
227 u64 pool_drop : 8;
228 u64 update_time : 16;
229 u64 err_int : 8;
230 u64 err_int_ena : 8;
231 u64 thresh_int : 1;
232 u64 thresh_int_ena : 1;
233 u64 thresh_up : 1;
234 u64 reserved_363 : 1;
235 u64 thresh_qint_idx : 7;
236 u64 reserved_371 : 1;
237 u64 err_qint_idx : 7;
238 u64 reserved_379_383 : 5;
239#endif
240#if defined(__BIG_ENDIAN_BITFIELD)
241 u64 reserved_420_447 : 28;
242 u64 thresh : 36;
243#else
244 u64 thresh : 36;
245 u64 reserved_420_447 : 28;
246#endif
247 u64 reserved_448_511;
248};
249
250struct npa_pool_s {
251 u64 stack_base;
252#if defined(__BIG_ENDIAN_BITFIELD)
253 u64 reserved_115_127 : 13;
254 u64 buf_size : 11;
255 u64 reserved_100_103 : 4;
256 u64 buf_offset : 12;
257 u64 stack_way_mask : 16;
258 u64 reserved_70_71 : 3;
259 u64 stack_caching : 1;
260 u64 reserved_66_67 : 2;
261 u64 nat_align : 1;
262 u64 ena : 1;
263#else
264 u64 ena : 1;
265 u64 nat_align : 1;
266 u64 reserved_66_67 : 2;
267 u64 stack_caching : 1;
268 u64 reserved_70_71 : 3;
269 u64 stack_way_mask : 16;
270 u64 buf_offset : 12;
271 u64 reserved_100_103 : 4;
272 u64 buf_size : 11;
273 u64 reserved_115_127 : 13;
274#endif
275#if defined(__BIG_ENDIAN_BITFIELD)
276 u64 stack_pages : 32;
277 u64 stack_max_pages : 32;
278#else
279 u64 stack_max_pages : 32;
280 u64 stack_pages : 32;
281#endif
282#if defined(__BIG_ENDIAN_BITFIELD)
283 u64 reserved_240_255 : 16;
284 u64 op_pc : 48;
285#else
286 u64 op_pc : 48;
287 u64 reserved_240_255 : 16;
288#endif
289#if defined(__BIG_ENDIAN_BITFIELD)
290 u64 reserved_316_319 : 4;
291 u64 update_time : 16;
292 u64 reserved_297_299 : 3;
293 u64 fc_up_crossing : 1;
294 u64 fc_hyst_bits : 4;
295 u64 fc_stype : 2;
296 u64 fc_ena : 1;
297 u64 avg_con : 9;
298 u64 avg_level : 8;
299 u64 reserved_270_271 : 2;
300 u64 shift : 6;
301 u64 reserved_260_263 : 4;
302 u64 stack_offset : 4;
303#else
304 u64 stack_offset : 4;
305 u64 reserved_260_263 : 4;
306 u64 shift : 6;
307 u64 reserved_270_271 : 2;
308 u64 avg_level : 8;
309 u64 avg_con : 9;
310 u64 fc_ena : 1;
311 u64 fc_stype : 2;
312 u64 fc_hyst_bits : 4;
313 u64 fc_up_crossing : 1;
314 u64 reserved_297_299 : 3;
315 u64 update_time : 16;
316 u64 reserved_316_319 : 4;
317#endif
318 u64 fc_addr;
319 u64 ptr_start;
320 u64 ptr_end;
321#if defined(__BIG_ENDIAN_BITFIELD)
322 u64 reserved_571_575 : 5;
323 u64 err_qint_idx : 7;
324 u64 reserved_563 : 1;
325 u64 thresh_qint_idx : 7;
326 u64 reserved_555 : 1;
327 u64 thresh_up : 1;
328 u64 thresh_int_ena : 1;
329 u64 thresh_int : 1;
330 u64 err_int_ena : 8;
331 u64 err_int : 8;
332 u64 reserved_512_535 : 24;
333#else
334 u64 reserved_512_535 : 24;
335 u64 err_int : 8;
336 u64 err_int_ena : 8;
337 u64 thresh_int : 1;
338 u64 thresh_int_ena : 1;
339 u64 thresh_up : 1;
340 u64 reserved_555 : 1;
341 u64 thresh_qint_idx : 7;
342 u64 reserved_563 : 1;
343 u64 err_qint_idx : 7;
344 u64 reserved_571_575 : 5;
345#endif
346#if defined(__BIG_ENDIAN_BITFIELD)
347 u64 reserved_612_639 : 28;
348 u64 thresh : 36;
349#else
350 u64 thresh : 36;
351 u64 reserved_612_639 : 28;
352#endif
353 u64 reserved_640_703;
354 u64 reserved_704_767;
355 u64 reserved_768_831;
356 u64 reserved_832_895;
357 u64 reserved_896_959;
358 u64 reserved_960_1023;
359};
360
361
362enum nix_aq_comp {
363 NIX_AQ_COMP_NOTDONE = 0x0,
364 NIX_AQ_COMP_GOOD = 0x1,
365 NIX_AQ_COMP_SWERR = 0x2,
366 NIX_AQ_COMP_CTX_POISON = 0x3,
367 NIX_AQ_COMP_CTX_FAULT = 0x4,
368 NIX_AQ_COMP_LOCKERR = 0x5,
369 NIX_AQ_COMP_SQB_ALLOC_FAIL = 0x6,
370};
371
372
373enum nix_aq_ctype {
374 NIX_AQ_CTYPE_RQ = 0x0,
375 NIX_AQ_CTYPE_SQ = 0x1,
376 NIX_AQ_CTYPE_CQ = 0x2,
377 NIX_AQ_CTYPE_MCE = 0x3,
378 NIX_AQ_CTYPE_RSS = 0x4,
379 NIX_AQ_CTYPE_DYNO = 0x5,
380};
381
382
383enum nix_aq_instop {
384 NIX_AQ_INSTOP_NOP = 0x0,
385 NIX_AQ_INSTOP_INIT = 0x1,
386 NIX_AQ_INSTOP_WRITE = 0x2,
387 NIX_AQ_INSTOP_READ = 0x3,
388 NIX_AQ_INSTOP_LOCK = 0x4,
389 NIX_AQ_INSTOP_UNLOCK = 0x5,
390};
391
392
393struct nix_aq_inst_s {
394#if defined(__BIG_ENDIAN_BITFIELD)
395 u64 doneint : 1;
396 u64 reserved_44_62 : 19;
397 u64 cindex : 20;
398 u64 reserved_15_23 : 9;
399 u64 lf : 7;
400 u64 ctype : 4;
401 u64 op : 4;
402#else
403 u64 op : 4;
404 u64 ctype : 4;
405 u64 lf : 7;
406 u64 reserved_15_23 : 9;
407 u64 cindex : 20;
408 u64 reserved_44_62 : 19;
409 u64 doneint : 1;
410#endif
411 u64 res_addr;
412};
413
414
415struct nix_aq_res_s {
416#if defined(__BIG_ENDIAN_BITFIELD)
417 u64 reserved_17_63 : 47;
418 u64 doneint : 1;
419 u64 compcode : 8;
420 u64 ctype : 4;
421 u64 op : 4;
422#else
423 u64 op : 4;
424 u64 ctype : 4;
425 u64 compcode : 8;
426 u64 doneint : 1;
427 u64 reserved_17_63 : 47;
428#endif
429 u64 reserved_64_127;
430};
431
432
433struct nix_cq_ctx_s {
434 u64 base;
435#if defined(__BIG_ENDIAN_BITFIELD)
436 u64 wrptr : 20;
437 u64 avg_con : 9;
438 u64 cint_idx : 7;
439 u64 cq_err : 1;
440 u64 qint_idx : 7;
441 u64 rsvd_81_83 : 3;
442 u64 bpid : 9;
443 u64 rsvd_69_71 : 3;
444 u64 bp_ena : 1;
445 u64 rsvd_64_67 : 4;
446#else
447 u64 rsvd_64_67 : 4;
448 u64 bp_ena : 1;
449 u64 rsvd_69_71 : 3;
450 u64 bpid : 9;
451 u64 rsvd_81_83 : 3;
452 u64 qint_idx : 7;
453 u64 cq_err : 1;
454 u64 cint_idx : 7;
455 u64 avg_con : 9;
456 u64 wrptr : 20;
457#endif
458#if defined(__BIG_ENDIAN_BITFIELD)
459 u64 update_time : 16;
460 u64 avg_level : 8;
461 u64 head : 20;
462 u64 tail : 20;
463#else
464 u64 tail : 20;
465 u64 head : 20;
466 u64 avg_level : 8;
467 u64 update_time : 16;
468#endif
469#if defined(__BIG_ENDIAN_BITFIELD)
470 u64 cq_err_int_ena : 8;
471 u64 cq_err_int : 8;
472 u64 qsize : 4;
473 u64 rsvd_233_235 : 3;
474 u64 caching : 1;
475 u64 substream : 20;
476 u64 rsvd_210_211 : 2;
477 u64 ena : 1;
478 u64 drop_ena : 1;
479 u64 drop : 8;
480 u64 bp : 8;
481#else
482 u64 bp : 8;
483 u64 drop : 8;
484 u64 drop_ena : 1;
485 u64 ena : 1;
486 u64 rsvd_210_211 : 2;
487 u64 substream : 20;
488 u64 caching : 1;
489 u64 rsvd_233_235 : 3;
490 u64 qsize : 4;
491 u64 cq_err_int : 8;
492 u64 cq_err_int_ena : 8;
493#endif
494};
495
496
497struct nix_rq_ctx_s {
498#if defined(__BIG_ENDIAN_BITFIELD)
499 u64 wqe_aura : 20;
500 u64 substream : 20;
501 u64 cq : 20;
502 u64 ena_wqwd : 1;
503 u64 ipsech_ena : 1;
504 u64 sso_ena : 1;
505 u64 ena : 1;
506#else
507 u64 ena : 1;
508 u64 sso_ena : 1;
509 u64 ipsech_ena : 1;
510 u64 ena_wqwd : 1;
511 u64 cq : 20;
512 u64 substream : 20;
513 u64 wqe_aura : 20;
514#endif
515#if defined(__BIG_ENDIAN_BITFIELD)
516 u64 rsvd_127_122 : 6;
517 u64 lpb_drop_ena : 1;
518 u64 spb_drop_ena : 1;
519 u64 xqe_drop_ena : 1;
520 u64 wqe_caching : 1;
521 u64 pb_caching : 2;
522 u64 sso_tt : 2;
523 u64 sso_grp : 10;
524 u64 lpb_aura : 20;
525 u64 spb_aura : 20;
526#else
527 u64 spb_aura : 20;
528 u64 lpb_aura : 20;
529 u64 sso_grp : 10;
530 u64 sso_tt : 2;
531 u64 pb_caching : 2;
532 u64 wqe_caching : 1;
533 u64 xqe_drop_ena : 1;
534 u64 spb_drop_ena : 1;
535 u64 lpb_drop_ena : 1;
536 u64 rsvd_127_122 : 6;
537#endif
538#if defined(__BIG_ENDIAN_BITFIELD)
539 u64 xqe_hdr_split : 1;
540 u64 xqe_imm_copy : 1;
541 u64 rsvd_189_184 : 6;
542 u64 xqe_imm_size : 6;
543 u64 later_skip : 6;
544 u64 rsvd_171 : 1;
545 u64 first_skip : 7;
546 u64 lpb_sizem1 : 12;
547 u64 spb_ena : 1;
548 u64 rsvd_150_148 : 3;
549 u64 wqe_skip : 2;
550 u64 spb_sizem1 : 6;
551 u64 rsvd_139_128 : 12;
552#else
553 u64 rsvd_139_128 : 12;
554 u64 spb_sizem1 : 6;
555 u64 wqe_skip : 2;
556 u64 rsvd_150_148 : 3;
557 u64 spb_ena : 1;
558 u64 lpb_sizem1 : 12;
559 u64 first_skip : 7;
560 u64 rsvd_171 : 1;
561 u64 later_skip : 6;
562 u64 xqe_imm_size : 6;
563 u64 rsvd_189_184 : 6;
564 u64 xqe_imm_copy : 1;
565 u64 xqe_hdr_split : 1;
566#endif
567#if defined(__BIG_ENDIAN_BITFIELD)
568 u64 spb_pool_pass : 8;
569 u64 spb_pool_drop : 8;
570 u64 spb_aura_pass : 8;
571 u64 spb_aura_drop : 8;
572 u64 wqe_pool_pass : 8;
573 u64 wqe_pool_drop : 8;
574 u64 xqe_pass : 8;
575 u64 xqe_drop : 8;
576#else
577 u64 xqe_drop : 8;
578 u64 xqe_pass : 8;
579 u64 wqe_pool_drop : 8;
580 u64 wqe_pool_pass : 8;
581 u64 spb_aura_drop : 8;
582 u64 spb_aura_pass : 8;
583 u64 spb_pool_drop : 8;
584 u64 spb_pool_pass : 8;
585#endif
586#if defined(__BIG_ENDIAN_BITFIELD)
587 u64 rsvd_319_315 : 5;
588 u64 qint_idx : 7;
589 u64 rq_int_ena : 8;
590 u64 rq_int : 8;
591 u64 rsvd_291_288 : 4;
592 u64 lpb_pool_pass : 8;
593 u64 lpb_pool_drop : 8;
594 u64 lpb_aura_pass : 8;
595 u64 lpb_aura_drop : 8;
596#else
597 u64 lpb_aura_drop : 8;
598 u64 lpb_aura_pass : 8;
599 u64 lpb_pool_drop : 8;
600 u64 lpb_pool_pass : 8;
601 u64 rsvd_291_288 : 4;
602 u64 rq_int : 8;
603 u64 rq_int_ena : 8;
604 u64 qint_idx : 7;
605 u64 rsvd_319_315 : 5;
606#endif
607#if defined(__BIG_ENDIAN_BITFIELD)
608 u64 rsvd_383_366 : 18;
609 u64 flow_tagw : 6;
610 u64 bad_utag : 8;
611 u64 good_utag : 8;
612 u64 ltag : 24;
613#else
614 u64 ltag : 24;
615 u64 good_utag : 8;
616 u64 bad_utag : 8;
617 u64 flow_tagw : 6;
618 u64 rsvd_383_366 : 18;
619#endif
620#if defined(__BIG_ENDIAN_BITFIELD)
621 u64 rsvd_447_432 : 16;
622 u64 octs : 48;
623#else
624 u64 octs : 48;
625 u64 rsvd_447_432 : 16;
626#endif
627#if defined(__BIG_ENDIAN_BITFIELD)
628 u64 rsvd_511_496 : 16;
629 u64 pkts : 48;
630#else
631 u64 pkts : 48;
632 u64 rsvd_511_496 : 16;
633#endif
634#if defined(__BIG_ENDIAN_BITFIELD)
635 u64 rsvd_575_560 : 16;
636 u64 drop_octs : 48;
637#else
638 u64 drop_octs : 48;
639 u64 rsvd_575_560 : 16;
640#endif
641#if defined(__BIG_ENDIAN_BITFIELD)
642 u64 rsvd_639_624 : 16;
643 u64 drop_pkts : 48;
644#else
645 u64 drop_pkts : 48;
646 u64 rsvd_639_624 : 16;
647#endif
648#if defined(__BIG_ENDIAN_BITFIELD)
649 u64 rsvd_703_688 : 16;
650 u64 re_pkts : 48;
651#else
652 u64 re_pkts : 48;
653 u64 rsvd_703_688 : 16;
654#endif
655 u64 rsvd_767_704;
656 u64 rsvd_831_768;
657 u64 rsvd_895_832;
658 u64 rsvd_959_896;
659 u64 rsvd_1023_960;
660};
661
662
663enum nix_maxsqesz {
664 NIX_MAXSQESZ_W16 = 0x0,
665 NIX_MAXSQESZ_W8 = 0x1,
666};
667
668
669enum nix_stype {
670 NIX_STYPE_STF = 0x0,
671 NIX_STYPE_STT = 0x1,
672 NIX_STYPE_STP = 0x2,
673};
674
675
676struct nix_sq_ctx_s {
677#if defined(__BIG_ENDIAN_BITFIELD)
678 u64 sqe_way_mask : 16;
679 u64 cq : 20;
680 u64 sdp_mcast : 1;
681 u64 substream : 20;
682 u64 qint_idx : 6;
683 u64 ena : 1;
684#else
685 u64 ena : 1;
686 u64 qint_idx : 6;
687 u64 substream : 20;
688 u64 sdp_mcast : 1;
689 u64 cq : 20;
690 u64 sqe_way_mask : 16;
691#endif
692#if defined(__BIG_ENDIAN_BITFIELD)
693 u64 sqb_count : 16;
694 u64 default_chan : 12;
695 u64 smq_rr_quantum : 24;
696 u64 sso_ena : 1;
697 u64 xoff : 1;
698 u64 cq_ena : 1;
699 u64 smq : 9;
700#else
701 u64 smq : 9;
702 u64 cq_ena : 1;
703 u64 xoff : 1;
704 u64 sso_ena : 1;
705 u64 smq_rr_quantum : 24;
706 u64 default_chan : 12;
707 u64 sqb_count : 16;
708#endif
709#if defined(__BIG_ENDIAN_BITFIELD)
710 u64 rsvd_191 : 1;
711 u64 sqe_stype : 2;
712 u64 sq_int_ena : 8;
713 u64 sq_int : 8;
714 u64 sqb_aura : 20;
715 u64 smq_rr_count : 25;
716#else
717 u64 smq_rr_count : 25;
718 u64 sqb_aura : 20;
719 u64 sq_int : 8;
720 u64 sq_int_ena : 8;
721 u64 sqe_stype : 2;
722 u64 rsvd_191 : 1;
723#endif
724#if defined(__BIG_ENDIAN_BITFIELD)
725 u64 rsvd_255_253 : 3;
726 u64 smq_next_sq_vld : 1;
727 u64 smq_pend : 1;
728 u64 smenq_next_sqb_vld : 1;
729 u64 head_offset : 6;
730 u64 smenq_offset : 6;
731 u64 tail_offset : 6;
732 u64 smq_lso_segnum : 8;
733 u64 smq_next_sq : 20;
734 u64 mnq_dis : 1;
735 u64 lmt_dis : 1;
736 u64 cq_limit : 8;
737 u64 max_sqe_size : 2;
738#else
739 u64 max_sqe_size : 2;
740 u64 cq_limit : 8;
741 u64 lmt_dis : 1;
742 u64 mnq_dis : 1;
743 u64 smq_next_sq : 20;
744 u64 smq_lso_segnum : 8;
745 u64 tail_offset : 6;
746 u64 smenq_offset : 6;
747 u64 head_offset : 6;
748 u64 smenq_next_sqb_vld : 1;
749 u64 smq_pend : 1;
750 u64 smq_next_sq_vld : 1;
751 u64 rsvd_255_253 : 3;
752#endif
753 u64 next_sqb : 64;
754 u64 tail_sqb : 64;
755 u64 smenq_sqb : 64;
756 u64 smenq_next_sqb : 64;
757 u64 head_sqb : 64;
758#if defined(__BIG_ENDIAN_BITFIELD)
759 u64 rsvd_639_630 : 10;
760 u64 vfi_lso_vld : 1;
761 u64 vfi_lso_vlan1_ins_ena : 1;
762 u64 vfi_lso_vlan0_ins_ena : 1;
763 u64 vfi_lso_mps : 14;
764 u64 vfi_lso_sb : 8;
765 u64 vfi_lso_sizem1 : 3;
766 u64 vfi_lso_total : 18;
767 u64 rsvd_583_576 : 8;
768#else
769 u64 rsvd_583_576 : 8;
770 u64 vfi_lso_total : 18;
771 u64 vfi_lso_sizem1 : 3;
772 u64 vfi_lso_sb : 8;
773 u64 vfi_lso_mps : 14;
774 u64 vfi_lso_vlan0_ins_ena : 1;
775 u64 vfi_lso_vlan1_ins_ena : 1;
776 u64 vfi_lso_vld : 1;
777 u64 rsvd_639_630 : 10;
778#endif
779#if defined(__BIG_ENDIAN_BITFIELD)
780 u64 rsvd_703_658 : 46;
781 u64 scm_lso_rem : 18;
782#else
783 u64 scm_lso_rem : 18;
784 u64 rsvd_703_658 : 46;
785#endif
786#if defined(__BIG_ENDIAN_BITFIELD)
787 u64 rsvd_767_752 : 16;
788 u64 octs : 48;
789#else
790 u64 octs : 48;
791 u64 rsvd_767_752 : 16;
792#endif
793#if defined(__BIG_ENDIAN_BITFIELD)
794 u64 rsvd_831_816 : 16;
795 u64 pkts : 48;
796#else
797 u64 pkts : 48;
798 u64 rsvd_831_816 : 16;
799#endif
800 u64 rsvd_895_832 : 64;
801#if defined(__BIG_ENDIAN_BITFIELD)
802 u64 rsvd_959_944 : 16;
803 u64 dropped_octs : 48;
804#else
805 u64 dropped_octs : 48;
806 u64 rsvd_959_944 : 16;
807#endif
808#if defined(__BIG_ENDIAN_BITFIELD)
809 u64 rsvd_1023_1008 : 16;
810 u64 dropped_pkts : 48;
811#else
812 u64 dropped_pkts : 48;
813 u64 rsvd_1023_1008 : 16;
814#endif
815};
816
817
818struct nix_rsse_s {
819#if defined(__BIG_ENDIAN_BITFIELD)
820 uint32_t reserved_20_31 : 12;
821 uint32_t rq : 20;
822#else
823 uint32_t rq : 20;
824 uint32_t reserved_20_31 : 12;
825
826#endif
827};
828
829
830struct nix_rx_mce_s {
831#if defined(__BIG_ENDIAN_BITFIELD)
832 uint64_t next : 16;
833 uint64_t pf_func : 16;
834 uint64_t rsvd_31_24 : 8;
835 uint64_t index : 20;
836 uint64_t eol : 1;
837 uint64_t rsvd_2 : 1;
838 uint64_t op : 2;
839#else
840 uint64_t op : 2;
841 uint64_t rsvd_2 : 1;
842 uint64_t eol : 1;
843 uint64_t index : 20;
844 uint64_t rsvd_31_24 : 8;
845 uint64_t pf_func : 16;
846 uint64_t next : 16;
847#endif
848};
849
850enum nix_lsoalg {
851 NIX_LSOALG_NOP,
852 NIX_LSOALG_ADD_SEGNUM,
853 NIX_LSOALG_ADD_PAYLEN,
854 NIX_LSOALG_ADD_OFFSET,
855 NIX_LSOALG_TCP_FLAGS,
856};
857
858enum nix_txlayer {
859 NIX_TXLAYER_OL3,
860 NIX_TXLAYER_OL4,
861 NIX_TXLAYER_IL3,
862 NIX_TXLAYER_IL4,
863};
864
865struct nix_lso_format {
866#if defined(__BIG_ENDIAN_BITFIELD)
867 u64 rsvd_19_63 : 45;
868 u64 alg : 3;
869 u64 rsvd_14_15 : 2;
870 u64 sizem1 : 2;
871 u64 rsvd_10_11 : 2;
872 u64 layer : 2;
873 u64 offset : 8;
874#else
875 u64 offset : 8;
876 u64 layer : 2;
877 u64 rsvd_10_11 : 2;
878 u64 sizem1 : 2;
879 u64 rsvd_14_15 : 2;
880 u64 alg : 3;
881 u64 rsvd_19_63 : 45;
882#endif
883};
884
885struct nix_rx_flowkey_alg {
886#if defined(__BIG_ENDIAN_BITFIELD)
887 u64 reserved_35_63 :29;
888 u64 ltype_match :4;
889 u64 ltype_mask :4;
890 u64 sel_chan :1;
891 u64 ena :1;
892 u64 reserved_24_24 :1;
893 u64 lid :3;
894 u64 bytesm1 :5;
895 u64 hdr_offset :8;
896 u64 fn_mask :1;
897 u64 ln_mask :1;
898 u64 key_offset :6;
899#else
900 u64 key_offset :6;
901 u64 ln_mask :1;
902 u64 fn_mask :1;
903 u64 hdr_offset :8;
904 u64 bytesm1 :5;
905 u64 lid :3;
906 u64 reserved_24_24 :1;
907 u64 ena :1;
908 u64 sel_chan :1;
909 u64 ltype_mask :4;
910 u64 ltype_match :4;
911 u64 reserved_35_63 :29;
912#endif
913};
914
915
916enum nix_vtag_size {
917 VTAGSIZE_T4 = 0x0,
918 VTAGSIZE_T8 = 0x1,
919};
920#endif
921