2 /* cnic.c: Broadcom CNIC core network driver.
4 * Copyright (c) 2006-2010 Broadcom Corporation
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation.
15 /* KWQ (kernel work queue) request op codes */
16 #define L2_KWQE_OPCODE_VALUE_FLUSH (4)
18 #define L4_KWQE_OPCODE_VALUE_CONNECT1 (50)
19 #define L4_KWQE_OPCODE_VALUE_CONNECT2 (51)
20 #define L4_KWQE_OPCODE_VALUE_CONNECT3 (52)
21 #define L4_KWQE_OPCODE_VALUE_RESET (53)
22 #define L4_KWQE_OPCODE_VALUE_CLOSE (54)
23 #define L4_KWQE_OPCODE_VALUE_UPDATE_SECRET (60)
24 #define L4_KWQE_OPCODE_VALUE_INIT_ULP (61)
26 #define L4_KWQE_OPCODE_VALUE_OFFLOAD_PG (1)
27 #define L4_KWQE_OPCODE_VALUE_UPDATE_PG (9)
28 #define L4_KWQE_OPCODE_VALUE_UPLOAD_PG (14)
30 #define L5CM_RAMROD_CMD_ID_BASE (0x80)
31 #define L5CM_RAMROD_CMD_ID_TCP_CONNECT (L5CM_RAMROD_CMD_ID_BASE + 3)
32 #define L5CM_RAMROD_CMD_ID_CLOSE (L5CM_RAMROD_CMD_ID_BASE + 12)
33 #define L5CM_RAMROD_CMD_ID_ABORT (L5CM_RAMROD_CMD_ID_BASE + 13)
34 #define L5CM_RAMROD_CMD_ID_SEARCHER_DELETE (L5CM_RAMROD_CMD_ID_BASE + 14)
35 #define L5CM_RAMROD_CMD_ID_TERMINATE_OFFLOAD (L5CM_RAMROD_CMD_ID_BASE + 15)
37 /* KCQ (kernel completion queue) response op codes */
38 #define L4_KCQE_OPCODE_VALUE_CLOSE_COMP (53)
39 #define L4_KCQE_OPCODE_VALUE_RESET_COMP (54)
40 #define L4_KCQE_OPCODE_VALUE_FW_TCP_UPDATE (55)
41 #define L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE (56)
42 #define L4_KCQE_OPCODE_VALUE_RESET_RECEIVED (57)
43 #define L4_KCQE_OPCODE_VALUE_CLOSE_RECEIVED (58)
44 #define L4_KCQE_OPCODE_VALUE_INIT_ULP (61)
46 #define L4_KCQE_OPCODE_VALUE_OFFLOAD_PG (1)
47 #define L4_KCQE_OPCODE_VALUE_UPDATE_PG (9)
48 #define L4_KCQE_OPCODE_VALUE_UPLOAD_PG (14)
50 /* KCQ (kernel completion queue) completion status */
51 #define L4_KCQE_COMPLETION_STATUS_SUCCESS (0)
52 #define L4_KCQE_COMPLETION_STATUS_TIMEOUT (0x93)
54 #define L4_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAIL (0x83)
55 #define L4_KCQE_COMPLETION_STATUS_OFFLOADED_PG (0x89)
57 #define L4_LAYER_CODE (4)
58 #define L2_LAYER_CODE (2)
68 #if defined(__BIG_ENDIAN)
71 #elif defined(__LITTLE_ENDIAN)
76 #if defined(__BIG_ENDIAN)
78 #define L4_KCQ_RESERVED3 (0x7<<0)
79 #define L4_KCQ_RESERVED3_SHIFT 0
80 #define L4_KCQ_RAMROD_COMPLETION (0x1<<3) /* Everest only */
81 #define L4_KCQ_RAMROD_COMPLETION_SHIFT 3
82 #define L4_KCQ_LAYER_CODE (0x7<<4)
83 #define L4_KCQ_LAYER_CODE_SHIFT 4
84 #define L4_KCQ_RESERVED4 (0x1<<7)
85 #define L4_KCQ_RESERVED4_SHIFT 7
88 #elif defined(__LITTLE_ENDIAN)
92 #define L4_KCQ_RESERVED3 (0xF<<0)
93 #define L4_KCQ_RESERVED3_SHIFT 0
94 #define L4_KCQ_RAMROD_COMPLETION (0x1<<3) /* Everest only */
95 #define L4_KCQ_RAMROD_COMPLETION_SHIFT 3
96 #define L4_KCQ_LAYER_CODE (0x7<<4)
97 #define L4_KCQ_LAYER_CODE_SHIFT 4
98 #define L4_KCQ_RESERVED4 (0x1<<7)
99 #define L4_KCQ_RESERVED4_SHIFT 7
105 * L4 KCQ CQE PG upload
107 struct l4_kcq_upload_pg
{
109 #if defined(__BIG_ENDIAN)
112 #elif defined(__LITTLE_ENDIAN)
117 #if defined(__BIG_ENDIAN)
119 #define L4_KCQ_UPLOAD_PG_RESERVED3 (0xF<<0)
120 #define L4_KCQ_UPLOAD_PG_RESERVED3_SHIFT 0
121 #define L4_KCQ_UPLOAD_PG_LAYER_CODE (0x7<<4)
122 #define L4_KCQ_UPLOAD_PG_LAYER_CODE_SHIFT 4
123 #define L4_KCQ_UPLOAD_PG_RESERVED4 (0x1<<7)
124 #define L4_KCQ_UPLOAD_PG_RESERVED4_SHIFT 7
127 #elif defined(__LITTLE_ENDIAN)
131 #define L4_KCQ_UPLOAD_PG_RESERVED3 (0xF<<0)
132 #define L4_KCQ_UPLOAD_PG_RESERVED3_SHIFT 0
133 #define L4_KCQ_UPLOAD_PG_LAYER_CODE (0x7<<4)
134 #define L4_KCQ_UPLOAD_PG_LAYER_CODE_SHIFT 4
135 #define L4_KCQ_UPLOAD_PG_RESERVED4 (0x1<<7)
136 #define L4_KCQ_UPLOAD_PG_RESERVED4_SHIFT 7
142 * Gracefully close the connection request
144 struct l4_kwq_close_req
{
145 #if defined(__BIG_ENDIAN)
147 #define L4_KWQ_CLOSE_REQ_RESERVED1 (0xF<<0)
148 #define L4_KWQ_CLOSE_REQ_RESERVED1_SHIFT 0
149 #define L4_KWQ_CLOSE_REQ_LAYER_CODE (0x7<<4)
150 #define L4_KWQ_CLOSE_REQ_LAYER_CODE_SHIFT 4
151 #define L4_KWQ_CLOSE_REQ_LINKED_WITH_NEXT (0x1<<7)
152 #define L4_KWQ_CLOSE_REQ_LINKED_WITH_NEXT_SHIFT 7
155 #elif defined(__LITTLE_ENDIAN)
159 #define L4_KWQ_CLOSE_REQ_RESERVED1 (0xF<<0)
160 #define L4_KWQ_CLOSE_REQ_RESERVED1_SHIFT 0
161 #define L4_KWQ_CLOSE_REQ_LAYER_CODE (0x7<<4)
162 #define L4_KWQ_CLOSE_REQ_LAYER_CODE_SHIFT 4
163 #define L4_KWQ_CLOSE_REQ_LINKED_WITH_NEXT (0x1<<7)
164 #define L4_KWQ_CLOSE_REQ_LINKED_WITH_NEXT_SHIFT 7
172 * The first request to be passed in order to establish connection in option2
174 struct l4_kwq_connect_req1
{
175 #if defined(__BIG_ENDIAN)
177 #define L4_KWQ_CONNECT_REQ1_RESERVED1 (0xF<<0)
178 #define L4_KWQ_CONNECT_REQ1_RESERVED1_SHIFT 0
179 #define L4_KWQ_CONNECT_REQ1_LAYER_CODE (0x7<<4)
180 #define L4_KWQ_CONNECT_REQ1_LAYER_CODE_SHIFT 4
181 #define L4_KWQ_CONNECT_REQ1_LINKED_WITH_NEXT (0x1<<7)
182 #define L4_KWQ_CONNECT_REQ1_LINKED_WITH_NEXT_SHIFT 7
186 #define L4_KWQ_CONNECT_REQ1_IS_PG_HOST_OPAQUE (0x1<<0)
187 #define L4_KWQ_CONNECT_REQ1_IS_PG_HOST_OPAQUE_SHIFT 0
188 #define L4_KWQ_CONNECT_REQ1_IP_V6 (0x1<<1)
189 #define L4_KWQ_CONNECT_REQ1_IP_V6_SHIFT 1
190 #define L4_KWQ_CONNECT_REQ1_PASSIVE_FLAG (0x1<<2)
191 #define L4_KWQ_CONNECT_REQ1_PASSIVE_FLAG_SHIFT 2
192 #define L4_KWQ_CONNECT_REQ1_RSRV (0x1F<<3)
193 #define L4_KWQ_CONNECT_REQ1_RSRV_SHIFT 3
194 #elif defined(__LITTLE_ENDIAN)
196 #define L4_KWQ_CONNECT_REQ1_IS_PG_HOST_OPAQUE (0x1<<0)
197 #define L4_KWQ_CONNECT_REQ1_IS_PG_HOST_OPAQUE_SHIFT 0
198 #define L4_KWQ_CONNECT_REQ1_IP_V6 (0x1<<1)
199 #define L4_KWQ_CONNECT_REQ1_IP_V6_SHIFT 1
200 #define L4_KWQ_CONNECT_REQ1_PASSIVE_FLAG (0x1<<2)
201 #define L4_KWQ_CONNECT_REQ1_PASSIVE_FLAG_SHIFT 2
202 #define L4_KWQ_CONNECT_REQ1_RSRV (0x1F<<3)
203 #define L4_KWQ_CONNECT_REQ1_RSRV_SHIFT 3
207 #define L4_KWQ_CONNECT_REQ1_RESERVED1 (0xF<<0)
208 #define L4_KWQ_CONNECT_REQ1_RESERVED1_SHIFT 0
209 #define L4_KWQ_CONNECT_REQ1_LAYER_CODE (0x7<<4)
210 #define L4_KWQ_CONNECT_REQ1_LAYER_CODE_SHIFT 4
211 #define L4_KWQ_CONNECT_REQ1_LINKED_WITH_NEXT (0x1<<7)
212 #define L4_KWQ_CONNECT_REQ1_LINKED_WITH_NEXT_SHIFT 7
218 #if defined(__BIG_ENDIAN)
221 #elif defined(__LITTLE_ENDIAN)
225 #if defined(__BIG_ENDIAN)
228 #define L4_KWQ_CONNECT_REQ1_NO_DELAY_ACK (0x1<<0)
229 #define L4_KWQ_CONNECT_REQ1_NO_DELAY_ACK_SHIFT 0
230 #define L4_KWQ_CONNECT_REQ1_KEEP_ALIVE (0x1<<1)
231 #define L4_KWQ_CONNECT_REQ1_KEEP_ALIVE_SHIFT 1
232 #define L4_KWQ_CONNECT_REQ1_NAGLE_ENABLE (0x1<<2)
233 #define L4_KWQ_CONNECT_REQ1_NAGLE_ENABLE_SHIFT 2
234 #define L4_KWQ_CONNECT_REQ1_TIME_STAMP (0x1<<3)
235 #define L4_KWQ_CONNECT_REQ1_TIME_STAMP_SHIFT 3
236 #define L4_KWQ_CONNECT_REQ1_SACK (0x1<<4)
237 #define L4_KWQ_CONNECT_REQ1_SACK_SHIFT 4
238 #define L4_KWQ_CONNECT_REQ1_SEG_SCALING (0x1<<5)
239 #define L4_KWQ_CONNECT_REQ1_SEG_SCALING_SHIFT 5
240 #define L4_KWQ_CONNECT_REQ1_RESERVED2 (0x3<<6)
241 #define L4_KWQ_CONNECT_REQ1_RESERVED2_SHIFT 6
242 #elif defined(__LITTLE_ENDIAN)
244 #define L4_KWQ_CONNECT_REQ1_NO_DELAY_ACK (0x1<<0)
245 #define L4_KWQ_CONNECT_REQ1_NO_DELAY_ACK_SHIFT 0
246 #define L4_KWQ_CONNECT_REQ1_KEEP_ALIVE (0x1<<1)
247 #define L4_KWQ_CONNECT_REQ1_KEEP_ALIVE_SHIFT 1
248 #define L4_KWQ_CONNECT_REQ1_NAGLE_ENABLE (0x1<<2)
249 #define L4_KWQ_CONNECT_REQ1_NAGLE_ENABLE_SHIFT 2
250 #define L4_KWQ_CONNECT_REQ1_TIME_STAMP (0x1<<3)
251 #define L4_KWQ_CONNECT_REQ1_TIME_STAMP_SHIFT 3
252 #define L4_KWQ_CONNECT_REQ1_SACK (0x1<<4)
253 #define L4_KWQ_CONNECT_REQ1_SACK_SHIFT 4
254 #define L4_KWQ_CONNECT_REQ1_SEG_SCALING (0x1<<5)
255 #define L4_KWQ_CONNECT_REQ1_SEG_SCALING_SHIFT 5
256 #define L4_KWQ_CONNECT_REQ1_RESERVED2 (0x3<<6)
257 #define L4_KWQ_CONNECT_REQ1_RESERVED2_SHIFT 6
265 * The second ( optional )request to be passed in order to establish
266 * connection in option2 - for IPv6 only
268 struct l4_kwq_connect_req2
{
269 #if defined(__BIG_ENDIAN)
271 #define L4_KWQ_CONNECT_REQ2_RESERVED1 (0xF<<0)
272 #define L4_KWQ_CONNECT_REQ2_RESERVED1_SHIFT 0
273 #define L4_KWQ_CONNECT_REQ2_LAYER_CODE (0x7<<4)
274 #define L4_KWQ_CONNECT_REQ2_LAYER_CODE_SHIFT 4
275 #define L4_KWQ_CONNECT_REQ2_LINKED_WITH_NEXT (0x1<<7)
276 #define L4_KWQ_CONNECT_REQ2_LINKED_WITH_NEXT_SHIFT 7
280 #elif defined(__LITTLE_ENDIAN)
285 #define L4_KWQ_CONNECT_REQ2_RESERVED1 (0xF<<0)
286 #define L4_KWQ_CONNECT_REQ2_RESERVED1_SHIFT 0
287 #define L4_KWQ_CONNECT_REQ2_LAYER_CODE (0x7<<4)
288 #define L4_KWQ_CONNECT_REQ2_LAYER_CODE_SHIFT 4
289 #define L4_KWQ_CONNECT_REQ2_LINKED_WITH_NEXT (0x1<<7)
290 #define L4_KWQ_CONNECT_REQ2_LINKED_WITH_NEXT_SHIFT 7
303 * The third ( and last )request to be passed in order to establish
304 * connection in option2
306 struct l4_kwq_connect_req3
{
307 #if defined(__BIG_ENDIAN)
309 #define L4_KWQ_CONNECT_REQ3_RESERVED1 (0xF<<0)
310 #define L4_KWQ_CONNECT_REQ3_RESERVED1_SHIFT 0
311 #define L4_KWQ_CONNECT_REQ3_LAYER_CODE (0x7<<4)
312 #define L4_KWQ_CONNECT_REQ3_LAYER_CODE_SHIFT 4
313 #define L4_KWQ_CONNECT_REQ3_LINKED_WITH_NEXT (0x1<<7)
314 #define L4_KWQ_CONNECT_REQ3_LINKED_WITH_NEXT_SHIFT 7
317 #elif defined(__LITTLE_ENDIAN)
321 #define L4_KWQ_CONNECT_REQ3_RESERVED1 (0xF<<0)
322 #define L4_KWQ_CONNECT_REQ3_RESERVED1_SHIFT 0
323 #define L4_KWQ_CONNECT_REQ3_LAYER_CODE (0x7<<4)
324 #define L4_KWQ_CONNECT_REQ3_LAYER_CODE_SHIFT 4
325 #define L4_KWQ_CONNECT_REQ3_LINKED_WITH_NEXT (0x1<<7)
326 #define L4_KWQ_CONNECT_REQ3_LINKED_WITH_NEXT_SHIFT 7
330 #if defined(__BIG_ENDIAN)
334 u8 ka_max_probe_count
;
335 #elif defined(__LITTLE_ENDIAN)
336 u8 ka_max_probe_count
;
341 #if defined(__BIG_ENDIAN)
344 #elif defined(__LITTLE_ENDIAN)
355 * a KWQE request to offload a PG connection
357 struct l4_kwq_offload_pg
{
358 #if defined(__BIG_ENDIAN)
360 #define L4_KWQ_OFFLOAD_PG_RESERVED1 (0xF<<0)
361 #define L4_KWQ_OFFLOAD_PG_RESERVED1_SHIFT 0
362 #define L4_KWQ_OFFLOAD_PG_LAYER_CODE (0x7<<4)
363 #define L4_KWQ_OFFLOAD_PG_LAYER_CODE_SHIFT 4
364 #define L4_KWQ_OFFLOAD_PG_LINKED_WITH_NEXT (0x1<<7)
365 #define L4_KWQ_OFFLOAD_PG_LINKED_WITH_NEXT_SHIFT 7
368 #elif defined(__LITTLE_ENDIAN)
372 #define L4_KWQ_OFFLOAD_PG_RESERVED1 (0xF<<0)
373 #define L4_KWQ_OFFLOAD_PG_RESERVED1_SHIFT 0
374 #define L4_KWQ_OFFLOAD_PG_LAYER_CODE (0x7<<4)
375 #define L4_KWQ_OFFLOAD_PG_LAYER_CODE_SHIFT 4
376 #define L4_KWQ_OFFLOAD_PG_LINKED_WITH_NEXT (0x1<<7)
377 #define L4_KWQ_OFFLOAD_PG_LINKED_WITH_NEXT_SHIFT 7
379 #if defined(__BIG_ENDIAN)
382 #define L4_KWQ_OFFLOAD_PG_SNAP_ENCAP (0x1<<0)
383 #define L4_KWQ_OFFLOAD_PG_SNAP_ENCAP_SHIFT 0
384 #define L4_KWQ_OFFLOAD_PG_VLAN_TAGGING (0x1<<1)
385 #define L4_KWQ_OFFLOAD_PG_VLAN_TAGGING_SHIFT 1
386 #define L4_KWQ_OFFLOAD_PG_RESERVED2 (0x3F<<2)
387 #define L4_KWQ_OFFLOAD_PG_RESERVED2_SHIFT 2
390 #elif defined(__LITTLE_ENDIAN)
394 #define L4_KWQ_OFFLOAD_PG_SNAP_ENCAP (0x1<<0)
395 #define L4_KWQ_OFFLOAD_PG_SNAP_ENCAP_SHIFT 0
396 #define L4_KWQ_OFFLOAD_PG_VLAN_TAGGING (0x1<<1)
397 #define L4_KWQ_OFFLOAD_PG_VLAN_TAGGING_SHIFT 1
398 #define L4_KWQ_OFFLOAD_PG_RESERVED2 (0x3F<<2)
399 #define L4_KWQ_OFFLOAD_PG_RESERVED2_SHIFT 2
402 #if defined(__BIG_ENDIAN)
407 #elif defined(__LITTLE_ENDIAN)
413 #if defined(__BIG_ENDIAN)
418 #elif defined(__LITTLE_ENDIAN)
424 #if defined(__BIG_ENDIAN)
428 #elif defined(__LITTLE_ENDIAN)
433 #if defined(__BIG_ENDIAN)
436 #elif defined(__LITTLE_ENDIAN)
440 #if defined(__BIG_ENDIAN)
443 #elif defined(__LITTLE_ENDIAN)
452 * Abortively close the connection request
454 struct l4_kwq_reset_req
{
455 #if defined(__BIG_ENDIAN)
457 #define L4_KWQ_RESET_REQ_RESERVED1 (0xF<<0)
458 #define L4_KWQ_RESET_REQ_RESERVED1_SHIFT 0
459 #define L4_KWQ_RESET_REQ_LAYER_CODE (0x7<<4)
460 #define L4_KWQ_RESET_REQ_LAYER_CODE_SHIFT 4
461 #define L4_KWQ_RESET_REQ_LINKED_WITH_NEXT (0x1<<7)
462 #define L4_KWQ_RESET_REQ_LINKED_WITH_NEXT_SHIFT 7
465 #elif defined(__LITTLE_ENDIAN)
469 #define L4_KWQ_RESET_REQ_RESERVED1 (0xF<<0)
470 #define L4_KWQ_RESET_REQ_RESERVED1_SHIFT 0
471 #define L4_KWQ_RESET_REQ_LAYER_CODE (0x7<<4)
472 #define L4_KWQ_RESET_REQ_LAYER_CODE_SHIFT 4
473 #define L4_KWQ_RESET_REQ_LINKED_WITH_NEXT (0x1<<7)
474 #define L4_KWQ_RESET_REQ_LINKED_WITH_NEXT_SHIFT 7
482 * a KWQE request to update a PG connection
484 struct l4_kwq_update_pg
{
485 #if defined(__BIG_ENDIAN)
487 #define L4_KWQ_UPDATE_PG_RESERVED1 (0xF<<0)
488 #define L4_KWQ_UPDATE_PG_RESERVED1_SHIFT 0
489 #define L4_KWQ_UPDATE_PG_LAYER_CODE (0x7<<4)
490 #define L4_KWQ_UPDATE_PG_LAYER_CODE_SHIFT 4
491 #define L4_KWQ_UPDATE_PG_LINKED_WITH_NEXT (0x1<<7)
492 #define L4_KWQ_UPDATE_PG_LINKED_WITH_NEXT_SHIFT 7
495 #elif defined(__LITTLE_ENDIAN)
499 #define L4_KWQ_UPDATE_PG_RESERVED1 (0xF<<0)
500 #define L4_KWQ_UPDATE_PG_RESERVED1_SHIFT 0
501 #define L4_KWQ_UPDATE_PG_LAYER_CODE (0x7<<4)
502 #define L4_KWQ_UPDATE_PG_LAYER_CODE_SHIFT 4
503 #define L4_KWQ_UPDATE_PG_LINKED_WITH_NEXT (0x1<<7)
504 #define L4_KWQ_UPDATE_PG_LINKED_WITH_NEXT_SHIFT 7
508 #if defined(__BIG_ENDIAN)
510 #define L4_KWQ_UPDATE_PG_VALIDS_IPID_COUNT (0x1<<0)
511 #define L4_KWQ_UPDATE_PG_VALIDS_IPID_COUNT_SHIFT 0
512 #define L4_KWQ_UPDATE_PG_VALIDS_DA (0x1<<1)
513 #define L4_KWQ_UPDATE_PG_VALIDS_DA_SHIFT 1
514 #define L4_KWQ_UPDATE_PG_RESERVERD2 (0x3F<<2)
515 #define L4_KWQ_UPDATE_PG_RESERVERD2_SHIFT 2
518 #elif defined(__LITTLE_ENDIAN)
522 #define L4_KWQ_UPDATE_PG_VALIDS_IPID_COUNT (0x1<<0)
523 #define L4_KWQ_UPDATE_PG_VALIDS_IPID_COUNT_SHIFT 0
524 #define L4_KWQ_UPDATE_PG_VALIDS_DA (0x1<<1)
525 #define L4_KWQ_UPDATE_PG_VALIDS_DA_SHIFT 1
526 #define L4_KWQ_UPDATE_PG_RESERVERD2 (0x3F<<2)
527 #define L4_KWQ_UPDATE_PG_RESERVERD2_SHIFT 2
529 #if defined(__BIG_ENDIAN)
533 #elif defined(__LITTLE_ENDIAN)
538 #if defined(__BIG_ENDIAN)
543 #elif defined(__LITTLE_ENDIAN)
555 * a KWQE request to upload a PG or L4 context
557 struct l4_kwq_upload
{
558 #if defined(__BIG_ENDIAN)
560 #define L4_KWQ_UPLOAD_RESERVED1 (0xF<<0)
561 #define L4_KWQ_UPLOAD_RESERVED1_SHIFT 0
562 #define L4_KWQ_UPLOAD_LAYER_CODE (0x7<<4)
563 #define L4_KWQ_UPLOAD_LAYER_CODE_SHIFT 4
564 #define L4_KWQ_UPLOAD_LINKED_WITH_NEXT (0x1<<7)
565 #define L4_KWQ_UPLOAD_LINKED_WITH_NEXT_SHIFT 7
568 #elif defined(__LITTLE_ENDIAN)
572 #define L4_KWQ_UPLOAD_RESERVED1 (0xF<<0)
573 #define L4_KWQ_UPLOAD_RESERVED1_SHIFT 0
574 #define L4_KWQ_UPLOAD_LAYER_CODE (0x7<<4)
575 #define L4_KWQ_UPLOAD_LAYER_CODE_SHIFT 4
576 #define L4_KWQ_UPLOAD_LINKED_WITH_NEXT (0x1<<7)
577 #define L4_KWQ_UPLOAD_LINKED_WITH_NEXT_SHIFT 7
588 * iSCSI context region, used only in iSCSI
590 struct ustorm_iscsi_rq_db
{
591 struct regpair pbl_base
;
592 struct regpair curr_pbe
;
596 * iSCSI context region, used only in iSCSI
598 struct ustorm_iscsi_r2tq_db
{
599 struct regpair pbl_base
;
600 struct regpair curr_pbe
;
604 * iSCSI context region, used only in iSCSI
606 struct ustorm_iscsi_cq_db
{
607 #if defined(__BIG_ENDIAN)
610 #elif defined(__LITTLE_ENDIAN)
614 struct regpair curr_pbe
;
618 * iSCSI context region, used only in iSCSI
621 struct ustorm_iscsi_rq_db rq
;
622 struct ustorm_iscsi_r2tq_db r2tq
;
623 struct ustorm_iscsi_cq_db cq
[8];
624 #if defined(__BIG_ENDIAN)
627 #elif defined(__LITTLE_ENDIAN)
631 struct regpair cq_pbl_base
;
635 * iSCSI context region, used only in iSCSI
637 struct ustorm_iscsi_placement_db
{
640 u32 local_sge_0_address_hi
;
641 u32 local_sge_0_address_lo
;
642 #if defined(__BIG_ENDIAN)
644 u16 local_sge_0_size
;
645 #elif defined(__LITTLE_ENDIAN)
646 u16 local_sge_0_size
;
649 u32 local_sge_1_address_hi
;
650 u32 local_sge_1_address_lo
;
651 #if defined(__BIG_ENDIAN)
653 u16 local_sge_1_size
;
654 #elif defined(__LITTLE_ENDIAN)
655 u16 local_sge_1_size
;
658 #if defined(__BIG_ENDIAN)
660 u8 local_sge_index_2b
;
662 #elif defined(__LITTLE_ENDIAN)
664 u8 local_sge_index_2b
;
668 u32 place_db_bitfield_1
;
669 #define USTORM_ISCSI_PLACEMENT_DB_REM_PDU_PAYLOAD (0xFFFFFF<<0)
670 #define USTORM_ISCSI_PLACEMENT_DB_REM_PDU_PAYLOAD_SHIFT 0
671 #define USTORM_ISCSI_PLACEMENT_DB_CQ_ID (0xFF<<24)
672 #define USTORM_ISCSI_PLACEMENT_DB_CQ_ID_SHIFT 24
673 u32 place_db_bitfield_2
;
674 #define USTORM_ISCSI_PLACEMENT_DB_BYTES_2_TRUNCATE (0xFFFFFF<<0)
675 #define USTORM_ISCSI_PLACEMENT_DB_BYTES_2_TRUNCATE_SHIFT 0
676 #define USTORM_ISCSI_PLACEMENT_DB_HOST_SGE_INDEX (0xFF<<24)
677 #define USTORM_ISCSI_PLACEMENT_DB_HOST_SGE_INDEX_SHIFT 24
679 #define USTORM_ISCSI_PLACEMENT_DB_REM_SGE_SIZE (0xFFFFFF<<0)
680 #define USTORM_ISCSI_PLACEMENT_DB_REM_SGE_SIZE_SHIFT 0
681 #define USTORM_ISCSI_PLACEMENT_DB_EXP_PADDING_2B (0x3<<24)
682 #define USTORM_ISCSI_PLACEMENT_DB_EXP_PADDING_2B_SHIFT 24
683 #define USTORM_ISCSI_PLACEMENT_DB_EXP_DIGEST_3B (0x7<<26)
684 #define USTORM_ISCSI_PLACEMENT_DB_EXP_DIGEST_3B_SHIFT 26
685 #define USTORM_ISCSI_PLACEMENT_DB_NAL_LEN_3B (0x7<<29)
686 #define USTORM_ISCSI_PLACEMENT_DB_NAL_LEN_3B_SHIFT 29
690 * Ustorm iSCSI Storm Context
692 struct ustorm_iscsi_st_context
{
695 struct rings_db ring
;
696 struct regpair task_pbl_base
;
697 struct regpair tce_phy_addr
;
698 struct ustorm_iscsi_placement_db place_db
;
701 #if defined(__BIG_ENDIAN)
704 #elif defined(__LITTLE_ENDIAN)
709 #if defined(__BIG_ENDIAN)
710 u8 hdr_second_byte_union
;
712 #define USTORM_ISCSI_ST_CONTEXT_BMIDDLEOFPDU (0x1<<0)
713 #define USTORM_ISCSI_ST_CONTEXT_BMIDDLEOFPDU_SHIFT 0
714 #define USTORM_ISCSI_ST_CONTEXT_BFENCECQE (0x1<<1)
715 #define USTORM_ISCSI_ST_CONTEXT_BFENCECQE_SHIFT 1
716 #define USTORM_ISCSI_ST_CONTEXT_RESERVED1 (0x3F<<2)
717 #define USTORM_ISCSI_ST_CONTEXT_RESERVED1_SHIFT 2
718 u8 task_pdu_cache_index
;
719 u8 task_pbe_cache_index
;
720 #elif defined(__LITTLE_ENDIAN)
721 u8 task_pbe_cache_index
;
722 u8 task_pdu_cache_index
;
724 #define USTORM_ISCSI_ST_CONTEXT_BMIDDLEOFPDU (0x1<<0)
725 #define USTORM_ISCSI_ST_CONTEXT_BMIDDLEOFPDU_SHIFT 0
726 #define USTORM_ISCSI_ST_CONTEXT_BFENCECQE (0x1<<1)
727 #define USTORM_ISCSI_ST_CONTEXT_BFENCECQE_SHIFT 1
728 #define USTORM_ISCSI_ST_CONTEXT_RESERVED1 (0x3F<<2)
729 #define USTORM_ISCSI_ST_CONTEXT_RESERVED1_SHIFT 2
730 u8 hdr_second_byte_union
;
732 #if defined(__BIG_ENDIAN)
736 #elif defined(__LITTLE_ENDIAN)
742 #if defined(__BIG_ENDIAN)
746 #elif defined(__LITTLE_ENDIAN)
752 #define USTORM_ISCSI_ST_CONTEXT_MAX_RECV_PDU_LENGTH (0xFFFFFF<<0)
753 #define USTORM_ISCSI_ST_CONTEXT_MAX_RECV_PDU_LENGTH_SHIFT 0
754 #define USTORM_ISCSI_ST_CONTEXT_MAX_OUTSTANDING_R2TS (0xFF<<24)
755 #define USTORM_ISCSI_ST_CONTEXT_MAX_OUTSTANDING_R2TS_SHIFT 24
756 u32 negotiated_rx_and_flags
;
757 #define USTORM_ISCSI_ST_CONTEXT_MAX_BURST_LENGTH (0xFFFFFF<<0)
758 #define USTORM_ISCSI_ST_CONTEXT_MAX_BURST_LENGTH_SHIFT 0
759 #define USTORM_ISCSI_ST_CONTEXT_B_CQE_POSTED_OR_HEADER_CACHED (0x1<<24)
760 #define USTORM_ISCSI_ST_CONTEXT_B_CQE_POSTED_OR_HEADER_CACHED_SHIFT 24
761 #define USTORM_ISCSI_ST_CONTEXT_B_HDR_DIGEST_EN (0x1<<25)
762 #define USTORM_ISCSI_ST_CONTEXT_B_HDR_DIGEST_EN_SHIFT 25
763 #define USTORM_ISCSI_ST_CONTEXT_B_DATA_DIGEST_EN (0x1<<26)
764 #define USTORM_ISCSI_ST_CONTEXT_B_DATA_DIGEST_EN_SHIFT 26
765 #define USTORM_ISCSI_ST_CONTEXT_B_PROTOCOL_ERROR (0x1<<27)
766 #define USTORM_ISCSI_ST_CONTEXT_B_PROTOCOL_ERROR_SHIFT 27
767 #define USTORM_ISCSI_ST_CONTEXT_B_TASK_VALID (0x1<<28)
768 #define USTORM_ISCSI_ST_CONTEXT_B_TASK_VALID_SHIFT 28
769 #define USTORM_ISCSI_ST_CONTEXT_TASK_TYPE (0x3<<29)
770 #define USTORM_ISCSI_ST_CONTEXT_TASK_TYPE_SHIFT 29
771 #define USTORM_ISCSI_ST_CONTEXT_B_ALL_DATA_ACKED (0x1<<31)
772 #define USTORM_ISCSI_ST_CONTEXT_B_ALL_DATA_ACKED_SHIFT 31
776 * TCP context region, shared in TOE, RDMA and ISCSI
778 struct tstorm_tcp_st_context_section
{
780 #define TSTORM_TCP_ST_CONTEXT_SECTION_RTT_SRTT_20B (0xFFFFFF<<0)
781 #define TSTORM_TCP_ST_CONTEXT_SECTION_RTT_SRTT_20B_SHIFT 0
782 #define TSTORM_TCP_ST_CONTEXT_SECTION_PAWS_INVALID (0x1<<24)
783 #define TSTORM_TCP_ST_CONTEXT_SECTION_PAWS_INVALID_SHIFT 24
784 #define TSTORM_TCP_ST_CONTEXT_SECTION_TIMESTAMP_EXISTS (0x1<<25)
785 #define TSTORM_TCP_ST_CONTEXT_SECTION_TIMESTAMP_EXISTS_SHIFT 25
786 #define TSTORM_TCP_ST_CONTEXT_SECTION_ISLE_EXISTS (0x1<<26)
787 #define TSTORM_TCP_ST_CONTEXT_SECTION_ISLE_EXISTS_SHIFT 26
788 #define TSTORM_TCP_ST_CONTEXT_SECTION_STOP_RX_PAYLOAD (0x1<<27)
789 #define TSTORM_TCP_ST_CONTEXT_SECTION_STOP_RX_PAYLOAD_SHIFT 27
790 #define TSTORM_TCP_ST_CONTEXT_SECTION_KA_ENABLED (0x1<<28)
791 #define TSTORM_TCP_ST_CONTEXT_SECTION_KA_ENABLED_SHIFT 28
792 #define TSTORM_TCP_ST_CONTEXT_SECTION_FIRST_RTO_ESTIMATE (0x1<<29)
793 #define TSTORM_TCP_ST_CONTEXT_SECTION_FIRST_RTO_ESTIMATE_SHIFT 29
794 #define TSTORM_TCP_ST_CONTEXT_SECTION_MAX_SEG_RETRANSMIT_EN (0x1<<30)
795 #define TSTORM_TCP_ST_CONTEXT_SECTION_MAX_SEG_RETRANSMIT_EN_SHIFT 30
796 #define TSTORM_TCP_ST_CONTEXT_SECTION_RESERVED3 (0x1<<31)
797 #define TSTORM_TCP_ST_CONTEXT_SECTION_RESERVED3_SHIFT 31
799 #define TSTORM_TCP_ST_CONTEXT_SECTION_RTT_VARIATION_20B (0xFFFFFF<<0)
800 #define TSTORM_TCP_ST_CONTEXT_SECTION_RTT_VARIATION_20B_SHIFT 0
801 #define TSTORM_TCP_ST_CONTEXT_SECTION_DA_EN (0x1<<24)
802 #define TSTORM_TCP_ST_CONTEXT_SECTION_DA_EN_SHIFT 24
803 #define TSTORM_TCP_ST_CONTEXT_SECTION_DA_COUNTER_EN (0x1<<25)
804 #define TSTORM_TCP_ST_CONTEXT_SECTION_DA_COUNTER_EN_SHIFT 25
805 #define __TSTORM_TCP_ST_CONTEXT_SECTION_KA_PROBE_SENT (0x1<<26)
806 #define __TSTORM_TCP_ST_CONTEXT_SECTION_KA_PROBE_SENT_SHIFT 26
807 #define __TSTORM_TCP_ST_CONTEXT_SECTION_PERSIST_PROBE_SENT (0x1<<27)
808 #define __TSTORM_TCP_ST_CONTEXT_SECTION_PERSIST_PROBE_SENT_SHIFT 27
809 #define TSTORM_TCP_ST_CONTEXT_SECTION_UPDATE_L2_STATSTICS (0x1<<28)
810 #define TSTORM_TCP_ST_CONTEXT_SECTION_UPDATE_L2_STATSTICS_SHIFT 28
811 #define TSTORM_TCP_ST_CONTEXT_SECTION_UPDATE_L4_STATSTICS (0x1<<29)
812 #define TSTORM_TCP_ST_CONTEXT_SECTION_UPDATE_L4_STATSTICS_SHIFT 29
813 #define __TSTORM_TCP_ST_CONTEXT_SECTION_SECOND_ISLE_DROPPED (0x1<<30)
814 #define __TSTORM_TCP_ST_CONTEXT_SECTION_SECOND_ISLE_DROPPED_SHIFT 30
815 #define __TSTORM_TCP_ST_CONTEXT_SECTION_DONT_SUPPORT_OOO (0x1<<31)
816 #define __TSTORM_TCP_ST_CONTEXT_SECTION_DONT_SUPPORT_OOO_SHIFT 31
817 #if defined(__BIG_ENDIAN)
818 u16 reserved_slowpath
;
821 #elif defined(__LITTLE_ENDIAN)
824 u16 reserved_slowpath
;
827 u32 timestamp_recent
;
828 u32 timestamp_recent_time
;
833 u32 expected_rel_seq
;
835 #if defined(__BIG_ENDIAN)
837 u8 ka_max_probe_count
;
838 u8 persist_probe_count
;
840 #elif defined(__LITTLE_ENDIAN)
842 u8 persist_probe_count
;
843 u8 ka_max_probe_count
;
846 #if defined(__BIG_ENDIAN)
847 u8 statistics_counter_id
;
851 #elif defined(__LITTLE_ENDIAN)
855 u8 statistics_counter_id
;
857 u32 retransmit_start_time
;
862 #if defined(__BIG_ENDIAN)
865 #elif defined(__LITTLE_ENDIAN)
871 #if defined(__BIG_ENDIAN)
874 #elif defined(__LITTLE_ENDIAN)
883 * Termination variables
885 struct iscsi_term_vars
{
887 #define ISCSI_TERM_VARS_TCP_STATE (0xF<<0)
888 #define ISCSI_TERM_VARS_TCP_STATE_SHIFT 0
889 #define ISCSI_TERM_VARS_FIN_RECEIVED_SBIT (0x1<<4)
890 #define ISCSI_TERM_VARS_FIN_RECEIVED_SBIT_SHIFT 4
891 #define ISCSI_TERM_VARS_ACK_ON_FIN_RECEIVED_SBIT (0x1<<5)
892 #define ISCSI_TERM_VARS_ACK_ON_FIN_RECEIVED_SBIT_SHIFT 5
893 #define ISCSI_TERM_VARS_TERM_ON_CHIP (0x1<<6)
894 #define ISCSI_TERM_VARS_TERM_ON_CHIP_SHIFT 6
895 #define ISCSI_TERM_VARS_RSRV (0x1<<7)
896 #define ISCSI_TERM_VARS_RSRV_SHIFT 7
900 * iSCSI context region, used only in iSCSI
902 struct tstorm_iscsi_st_context_section
{
903 #if defined(__BIG_ENDIAN)
904 u16 rem_tcp_data_len
;
906 #elif defined(__LITTLE_ENDIAN)
908 u16 rem_tcp_data_len
;
911 #if defined(__BIG_ENDIAN)
914 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_HDR_DIGEST_EN (0x1<<0)
915 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_HDR_DIGEST_EN_SHIFT 0
916 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DATA_DIGEST_EN (0x1<<1)
917 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DATA_DIGEST_EN_SHIFT 1
918 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_PARTIAL_HEADER (0x1<<2)
919 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_PARTIAL_HEADER_SHIFT 2
920 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_FULL_FEATURE (0x1<<3)
921 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_FULL_FEATURE_SHIFT 3
922 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DROP_ALL_PDUS (0x1<<4)
923 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DROP_ALL_PDUS_SHIFT 4
924 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_FLAGS_RSRV (0x7<<5)
925 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_FLAGS_RSRV_SHIFT 5
926 u8 hdr_bytes_2_fetch
;
927 #elif defined(__LITTLE_ENDIAN)
928 u8 hdr_bytes_2_fetch
;
930 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_HDR_DIGEST_EN (0x1<<0)
931 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_HDR_DIGEST_EN_SHIFT 0
932 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DATA_DIGEST_EN (0x1<<1)
933 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DATA_DIGEST_EN_SHIFT 1
934 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_PARTIAL_HEADER (0x1<<2)
935 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_PARTIAL_HEADER_SHIFT 2
936 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_FULL_FEATURE (0x1<<3)
937 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_FULL_FEATURE_SHIFT 3
938 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DROP_ALL_PDUS (0x1<<4)
939 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DROP_ALL_PDUS_SHIFT 4
940 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_FLAGS_RSRV (0x7<<5)
941 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_FLAGS_RSRV_SHIFT 5
944 struct regpair rq_db_phy_addr
;
945 #if defined(__BIG_ENDIAN)
946 struct iscsi_term_vars term_vars
;
949 #elif defined(__LITTLE_ENDIAN)
952 struct iscsi_term_vars term_vars
;
958 * The iSCSI non-aggregative context of Tstorm
960 struct tstorm_iscsi_st_context
{
961 struct tstorm_tcp_st_context_section tcp
;
962 struct tstorm_iscsi_st_context_section iscsi
;
966 * The tcp aggregative context section of Xstorm
968 struct xstorm_tcp_tcp_ag_context_section
{
969 #if defined(__BIG_ENDIAN)
973 #elif defined(__LITTLE_ENDIAN)
982 #if defined(__BIG_ENDIAN)
986 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG (0x1<<0)
987 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG_SHIFT 0
988 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_UNBLOCKED (0x1<<1)
989 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_UNBLOCKED_SHIFT 1
990 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_TIMER_ACTIVE (0x1<<2)
991 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_TIMER_ACTIVE_SHIFT 2
992 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX3_FLAG (0x1<<3)
993 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX3_FLAG_SHIFT 3
994 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX4_FLAG (0x1<<4)
995 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX4_FLAG_SHIFT 4
996 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_ENABLE (0x1<<5)
997 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_ENABLE_SHIFT 5
998 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED_EN (0x1<<6)
999 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED_EN_SHIFT 6
1000 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX3_CF_EN (0x1<<7)
1001 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX3_CF_EN_SHIFT 7
1002 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG_EN (0x1<<8)
1003 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG_EN_SHIFT 8
1004 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_FLAG (0x1<<9)
1005 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_FLAG_SHIFT 9
1006 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SET_RTO_CF (0x3<<10)
1007 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SET_RTO_CF_SHIFT 10
1008 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TS_TO_ECHO_UPDATED_CF (0x3<<12)
1009 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TS_TO_ECHO_UPDATED_CF_SHIFT 12
1010 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX8_CF (0x3<<14)
1011 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX8_CF_SHIFT 14
1012 #elif defined(__LITTLE_ENDIAN)
1014 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG (0x1<<0)
1015 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG_SHIFT 0
1016 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_UNBLOCKED (0x1<<1)
1017 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_UNBLOCKED_SHIFT 1
1018 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_TIMER_ACTIVE (0x1<<2)
1019 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_TIMER_ACTIVE_SHIFT 2
1020 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX3_FLAG (0x1<<3)
1021 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX3_FLAG_SHIFT 3
1022 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX4_FLAG (0x1<<4)
1023 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX4_FLAG_SHIFT 4
1024 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_ENABLE (0x1<<5)
1025 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_ENABLE_SHIFT 5
1026 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED_EN (0x1<<6)
1027 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED_EN_SHIFT 6
1028 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX3_CF_EN (0x1<<7)
1029 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX3_CF_EN_SHIFT 7
1030 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG_EN (0x1<<8)
1031 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG_EN_SHIFT 8
1032 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_FLAG (0x1<<9)
1033 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_FLAG_SHIFT 9
1034 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SET_RTO_CF (0x3<<10)
1035 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SET_RTO_CF_SHIFT 10
1036 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TS_TO_ECHO_UPDATED_CF (0x3<<12)
1037 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TS_TO_ECHO_UPDATED_CF_SHIFT 12
1038 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX8_CF (0x3<<14)
1039 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX8_CF_SHIFT 14
1047 #if defined(__BIG_ENDIAN)
1050 #elif defined(__LITTLE_ENDIAN)
1054 #if defined(__BIG_ENDIAN)
1058 u8 __force_pure_ack_cnt
;
1059 #elif defined(__LITTLE_ENDIAN)
1060 u8 __force_pure_ack_cnt
;
1066 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TS_TO_ECHO_CF_EN (0x1<<0)
1067 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TS_TO_ECHO_CF_EN_SHIFT 0
1068 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX8_CF_EN (0x1<<1)
1069 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX8_CF_EN_SHIFT 1
1070 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX9_CF_EN (0x1<<2)
1071 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX9_CF_EN_SHIFT 2
1072 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX10_CF_EN (0x1<<3)
1073 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX10_CF_EN_SHIFT 3
1074 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX6_FLAG (0x1<<4)
1075 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX6_FLAG_SHIFT 4
1076 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX7_FLAG (0x1<<5)
1077 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX7_FLAG_SHIFT 5
1078 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX5_CF (0x3<<6)
1079 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX5_CF_SHIFT 6
1080 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX9_CF (0x3<<8)
1081 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX9_CF_SHIFT 8
1082 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX10_CF (0x3<<10)
1083 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX10_CF_SHIFT 10
1084 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX11_CF (0x3<<12)
1085 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX11_CF_SHIFT 12
1086 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX12_CF (0x3<<14)
1087 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX12_CF_SHIFT 14
1088 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX13_CF (0x3<<16)
1089 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX13_CF_SHIFT 16
1090 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX14_CF (0x3<<18)
1091 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX14_CF_SHIFT 18
1092 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX15_CF (0x3<<20)
1093 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX15_CF_SHIFT 20
1094 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX16_CF (0x3<<22)
1095 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX16_CF_SHIFT 22
1096 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX17_CF (0x3<<24)
1097 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX17_CF_SHIFT 24
1098 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ECE_FLAG (0x1<<26)
1099 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ECE_FLAG_SHIFT 26
1100 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_RESERVED71 (0x1<<27)
1101 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_RESERVED71_SHIFT 27
1102 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_FORCE_PURE_ACK_CNT_DIRTY (0x1<<28)
1103 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_FORCE_PURE_ACK_CNT_DIRTY_SHIFT 28
1104 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TCP_AUTO_STOP_FLAG (0x1<<29)
1105 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TCP_AUTO_STOP_FLAG_SHIFT 29
1106 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DO_TS_UPDATE_FLAG (0x1<<30)
1107 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DO_TS_UPDATE_FLAG_SHIFT 30
1108 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_CANCEL_RETRANSMIT_FLAG (0x1<<31)
1109 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_CANCEL_RETRANSMIT_FLAG_SHIFT 31
1110 #if defined(__BIG_ENDIAN)
1112 u16 __tcp_agg_vars7
;
1113 #elif defined(__LITTLE_ENDIAN)
1114 u16 __tcp_agg_vars7
;
1119 #if defined(__BIG_ENDIAN)
1123 #elif defined(__LITTLE_ENDIAN)
1131 * The iscsi aggregative context of Xstorm
1133 struct xstorm_iscsi_ag_context
{
1134 #if defined(__BIG_ENDIAN)
1137 #define __XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1138 #define __XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1139 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1140 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1141 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
1142 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
1143 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
1144 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
1145 #define __XSTORM_ISCSI_AG_CONTEXT_MORE_TO_SEND_EN (0x1<<4)
1146 #define __XSTORM_ISCSI_AG_CONTEXT_MORE_TO_SEND_EN_SHIFT 4
1147 #define XSTORM_ISCSI_AG_CONTEXT_NAGLE_EN (0x1<<5)
1148 #define XSTORM_ISCSI_AG_CONTEXT_NAGLE_EN_SHIFT 5
1149 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG (0x1<<6)
1150 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG_SHIFT 6
1151 #define __XSTORM_ISCSI_AG_CONTEXT_UNA_GT_NXT_EN (0x1<<7)
1152 #define __XSTORM_ISCSI_AG_CONTEXT_UNA_GT_NXT_EN_SHIFT 7
1154 #elif defined(__LITTLE_ENDIAN)
1157 #define __XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1158 #define __XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1159 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1160 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1161 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
1162 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
1163 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
1164 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
1165 #define __XSTORM_ISCSI_AG_CONTEXT_MORE_TO_SEND_EN (0x1<<4)
1166 #define __XSTORM_ISCSI_AG_CONTEXT_MORE_TO_SEND_EN_SHIFT 4
1167 #define XSTORM_ISCSI_AG_CONTEXT_NAGLE_EN (0x1<<5)
1168 #define XSTORM_ISCSI_AG_CONTEXT_NAGLE_EN_SHIFT 5
1169 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG (0x1<<6)
1170 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG_SHIFT 6
1171 #define __XSTORM_ISCSI_AG_CONTEXT_UNA_GT_NXT_EN (0x1<<7)
1172 #define __XSTORM_ISCSI_AG_CONTEXT_UNA_GT_NXT_EN_SHIFT 7
1175 #if defined(__BIG_ENDIAN)
1178 #define XSTORM_ISCSI_AG_CONTEXT_R2TQ_PROD_CF (0x3<<0)
1179 #define XSTORM_ISCSI_AG_CONTEXT_R2TQ_PROD_CF_SHIFT 0
1180 #define __XSTORM_ISCSI_AG_CONTEXT_AUX21_CF (0x3<<2)
1181 #define __XSTORM_ISCSI_AG_CONTEXT_AUX21_CF_SHIFT 2
1182 #define __XSTORM_ISCSI_AG_CONTEXT_AUX18_CF_EN (0x1<<4)
1183 #define __XSTORM_ISCSI_AG_CONTEXT_AUX18_CF_EN_SHIFT 4
1184 #define __XSTORM_ISCSI_AG_CONTEXT_AUX19_CF_EN (0x1<<5)
1185 #define __XSTORM_ISCSI_AG_CONTEXT_AUX19_CF_EN_SHIFT 5
1186 #define __XSTORM_ISCSI_AG_CONTEXT_R2TQ_PROD_CF_EN (0x1<<6)
1187 #define __XSTORM_ISCSI_AG_CONTEXT_R2TQ_PROD_CF_EN_SHIFT 6
1188 #define __XSTORM_ISCSI_AG_CONTEXT_AUX21_CF_EN (0x1<<7)
1189 #define __XSTORM_ISCSI_AG_CONTEXT_AUX21_CF_EN_SHIFT 7
1191 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM2 (0x3F<<0)
1192 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM2_SHIFT 0
1193 #define __XSTORM_ISCSI_AG_CONTEXT_AUX19_CF (0x3<<6)
1194 #define __XSTORM_ISCSI_AG_CONTEXT_AUX19_CF_SHIFT 6
1196 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF (0x3<<0)
1197 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF_SHIFT 0
1198 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG_EN (0x1<<2)
1199 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG_EN_SHIFT 2
1200 #define __XSTORM_ISCSI_AG_CONTEXT_AUX8_FLAG (0x1<<3)
1201 #define __XSTORM_ISCSI_AG_CONTEXT_AUX8_FLAG_SHIFT 3
1202 #define __XSTORM_ISCSI_AG_CONTEXT_AUX9_FLAG (0x1<<4)
1203 #define __XSTORM_ISCSI_AG_CONTEXT_AUX9_FLAG_SHIFT 4
1204 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE1 (0x3<<5)
1205 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE1_SHIFT 5
1206 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF_EN (0x1<<7)
1207 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF_EN_SHIFT 7
1208 #elif defined(__LITTLE_ENDIAN)
1210 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF (0x3<<0)
1211 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF_SHIFT 0
1212 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG_EN (0x1<<2)
1213 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG_EN_SHIFT 2
1214 #define __XSTORM_ISCSI_AG_CONTEXT_AUX8_FLAG (0x1<<3)
1215 #define __XSTORM_ISCSI_AG_CONTEXT_AUX8_FLAG_SHIFT 3
1216 #define __XSTORM_ISCSI_AG_CONTEXT_AUX9_FLAG (0x1<<4)
1217 #define __XSTORM_ISCSI_AG_CONTEXT_AUX9_FLAG_SHIFT 4
1218 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE1 (0x3<<5)
1219 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE1_SHIFT 5
1220 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF_EN (0x1<<7)
1221 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF_EN_SHIFT 7
1223 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM2 (0x3F<<0)
1224 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM2_SHIFT 0
1225 #define __XSTORM_ISCSI_AG_CONTEXT_AUX19_CF (0x3<<6)
1226 #define __XSTORM_ISCSI_AG_CONTEXT_AUX19_CF_SHIFT 6
1228 #define XSTORM_ISCSI_AG_CONTEXT_R2TQ_PROD_CF (0x3<<0)
1229 #define XSTORM_ISCSI_AG_CONTEXT_R2TQ_PROD_CF_SHIFT 0
1230 #define __XSTORM_ISCSI_AG_CONTEXT_AUX21_CF (0x3<<2)
1231 #define __XSTORM_ISCSI_AG_CONTEXT_AUX21_CF_SHIFT 2
1232 #define __XSTORM_ISCSI_AG_CONTEXT_AUX18_CF_EN (0x1<<4)
1233 #define __XSTORM_ISCSI_AG_CONTEXT_AUX18_CF_EN_SHIFT 4
1234 #define __XSTORM_ISCSI_AG_CONTEXT_AUX19_CF_EN (0x1<<5)
1235 #define __XSTORM_ISCSI_AG_CONTEXT_AUX19_CF_EN_SHIFT 5
1236 #define __XSTORM_ISCSI_AG_CONTEXT_R2TQ_PROD_CF_EN (0x1<<6)
1237 #define __XSTORM_ISCSI_AG_CONTEXT_R2TQ_PROD_CF_EN_SHIFT 6
1238 #define __XSTORM_ISCSI_AG_CONTEXT_AUX21_CF_EN (0x1<<7)
1239 #define __XSTORM_ISCSI_AG_CONTEXT_AUX21_CF_EN_SHIFT 7
1243 #if defined(__BIG_ENDIAN)
1245 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE5 (0x3<<0)
1246 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE5_SHIFT 0
1247 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM0 (0x3F<<2)
1248 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM0_SHIFT 2
1249 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM1 (0x3F<<8)
1250 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM1_SHIFT 8
1251 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE2 (0x3<<14)
1252 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE2_SHIFT 14
1254 #elif defined(__LITTLE_ENDIAN)
1257 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE5 (0x3<<0)
1258 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE5_SHIFT 0
1259 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM0 (0x3F<<2)
1260 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM0_SHIFT 2
1261 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM1 (0x3F<<8)
1262 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM1_SHIFT 8
1263 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE2 (0x3<<14)
1264 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE2_SHIFT 14
1266 struct xstorm_tcp_tcp_ag_context_section tcp
;
1267 #if defined(__BIG_ENDIAN)
1269 #define __XSTORM_ISCSI_AG_CONTEXT_AGG_VAL11_DECISION_RULE (0x7<<0)
1270 #define __XSTORM_ISCSI_AG_CONTEXT_AGG_VAL11_DECISION_RULE_SHIFT 0
1271 #define __XSTORM_ISCSI_AG_CONTEXT_AUX13_FLAG (0x1<<3)
1272 #define __XSTORM_ISCSI_AG_CONTEXT_AUX13_FLAG_SHIFT 3
1273 #define XSTORM_ISCSI_AG_CONTEXT_AUX18_CF (0x3<<4)
1274 #define XSTORM_ISCSI_AG_CONTEXT_AUX18_CF_SHIFT 4
1275 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE3 (0x3<<6)
1276 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE3_SHIFT 6
1277 #define XSTORM_ISCSI_AG_CONTEXT_AUX1_CF (0x3<<8)
1278 #define XSTORM_ISCSI_AG_CONTEXT_AUX1_CF_SHIFT 8
1279 #define __XSTORM_ISCSI_AG_CONTEXT_COMPLETION_SEQ_DECISION_MASK (0x1<<10)
1280 #define __XSTORM_ISCSI_AG_CONTEXT_COMPLETION_SEQ_DECISION_MASK_SHIFT 10
1281 #define __XSTORM_ISCSI_AG_CONTEXT_AUX1_CF_EN (0x1<<11)
1282 #define __XSTORM_ISCSI_AG_CONTEXT_AUX1_CF_EN_SHIFT 11
1283 #define __XSTORM_ISCSI_AG_CONTEXT_AUX10_FLAG (0x1<<12)
1284 #define __XSTORM_ISCSI_AG_CONTEXT_AUX10_FLAG_SHIFT 12
1285 #define __XSTORM_ISCSI_AG_CONTEXT_AUX11_FLAG (0x1<<13)
1286 #define __XSTORM_ISCSI_AG_CONTEXT_AUX11_FLAG_SHIFT 13
1287 #define __XSTORM_ISCSI_AG_CONTEXT_AUX12_FLAG (0x1<<14)
1288 #define __XSTORM_ISCSI_AG_CONTEXT_AUX12_FLAG_SHIFT 14
1289 #define __XSTORM_ISCSI_AG_CONTEXT_AUX2_FLAG (0x1<<15)
1290 #define __XSTORM_ISCSI_AG_CONTEXT_AUX2_FLAG_SHIFT 15
1293 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE6 (0x7<<0)
1294 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE6_SHIFT 0
1295 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE7 (0x7<<3)
1296 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE7_SHIFT 3
1297 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE4 (0x3<<6)
1298 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE4_SHIFT 6
1299 #elif defined(__LITTLE_ENDIAN)
1301 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE6 (0x7<<0)
1302 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE6_SHIFT 0
1303 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE7 (0x7<<3)
1304 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE7_SHIFT 3
1305 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE4 (0x3<<6)
1306 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE4_SHIFT 6
1309 #define __XSTORM_ISCSI_AG_CONTEXT_AGG_VAL11_DECISION_RULE (0x7<<0)
1310 #define __XSTORM_ISCSI_AG_CONTEXT_AGG_VAL11_DECISION_RULE_SHIFT 0
1311 #define __XSTORM_ISCSI_AG_CONTEXT_AUX13_FLAG (0x1<<3)
1312 #define __XSTORM_ISCSI_AG_CONTEXT_AUX13_FLAG_SHIFT 3
1313 #define XSTORM_ISCSI_AG_CONTEXT_AUX18_CF (0x3<<4)
1314 #define XSTORM_ISCSI_AG_CONTEXT_AUX18_CF_SHIFT 4
1315 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE3 (0x3<<6)
1316 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE3_SHIFT 6
1317 #define XSTORM_ISCSI_AG_CONTEXT_AUX1_CF (0x3<<8)
1318 #define XSTORM_ISCSI_AG_CONTEXT_AUX1_CF_SHIFT 8
1319 #define __XSTORM_ISCSI_AG_CONTEXT_COMPLETION_SEQ_DECISION_MASK (0x1<<10)
1320 #define __XSTORM_ISCSI_AG_CONTEXT_COMPLETION_SEQ_DECISION_MASK_SHIFT 10
1321 #define __XSTORM_ISCSI_AG_CONTEXT_AUX1_CF_EN (0x1<<11)
1322 #define __XSTORM_ISCSI_AG_CONTEXT_AUX1_CF_EN_SHIFT 11
1323 #define __XSTORM_ISCSI_AG_CONTEXT_AUX10_FLAG (0x1<<12)
1324 #define __XSTORM_ISCSI_AG_CONTEXT_AUX10_FLAG_SHIFT 12
1325 #define __XSTORM_ISCSI_AG_CONTEXT_AUX11_FLAG (0x1<<13)
1326 #define __XSTORM_ISCSI_AG_CONTEXT_AUX11_FLAG_SHIFT 13
1327 #define __XSTORM_ISCSI_AG_CONTEXT_AUX12_FLAG (0x1<<14)
1328 #define __XSTORM_ISCSI_AG_CONTEXT_AUX12_FLAG_SHIFT 14
1329 #define __XSTORM_ISCSI_AG_CONTEXT_AUX2_FLAG (0x1<<15)
1330 #define __XSTORM_ISCSI_AG_CONTEXT_AUX2_FLAG_SHIFT 15
1332 #if defined(__BIG_ENDIAN)
1335 #elif defined(__LITTLE_ENDIAN)
1339 #if defined(__BIG_ENDIAN)
1343 #elif defined(__LITTLE_ENDIAN)
1348 #if defined(__BIG_ENDIAN)
1351 #elif defined(__LITTLE_ENDIAN)
1356 #define XSTORM_ISCSI_AG_CONTEXT_AGG_MISC2 (0xFFFFFF<<0)
1357 #define XSTORM_ISCSI_AG_CONTEXT_AGG_MISC2_SHIFT 0
1358 #define XSTORM_ISCSI_AG_CONTEXT_AGG_MISC3 (0xFF<<24)
1359 #define XSTORM_ISCSI_AG_CONTEXT_AGG_MISC3_SHIFT 24
1360 #if defined(__BIG_ENDIAN)
1363 #elif defined(__LITTLE_ENDIAN)
1367 #if defined(__BIG_ENDIAN)
1372 #elif defined(__LITTLE_ENDIAN)
1378 #if defined(__BIG_ENDIAN)
1381 #elif defined(__LITTLE_ENDIAN)
1385 u32 hq_cons_tcp_seq
;
1391 * The tcp aggregative context section of Tstorm
1393 struct tstorm_tcp_tcp_ag_context_section
{
1395 #if defined(__BIG_ENDIAN)
1399 #elif defined(__LITTLE_ENDIAN)
1404 #if defined(__BIG_ENDIAN)
1408 #elif defined(__LITTLE_ENDIAN)
1419 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_FIN_SENT_FLAG (0x1<<0)
1420 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_FIN_SENT_FLAG_SHIFT 0
1421 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_LAST_PACKET_FIN_FLAG (0x1<<1)
1422 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_LAST_PACKET_FIN_FLAG_SHIFT 1
1423 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_WND_UPD_CF (0x3<<2)
1424 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_WND_UPD_CF_SHIFT 2
1425 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_TIMEOUT_CF (0x3<<4)
1426 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_TIMEOUT_CF_SHIFT 4
1427 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_WND_UPD_CF_EN (0x1<<6)
1428 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_WND_UPD_CF_EN_SHIFT 6
1429 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_TIMEOUT_CF_EN (0x1<<7)
1430 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_TIMEOUT_CF_EN_SHIFT 7
1431 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RETRANSMIT_SEQ_EN (0x1<<8)
1432 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RETRANSMIT_SEQ_EN_SHIFT 8
1433 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_SND_NXT_EN (0x1<<9)
1434 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_SND_NXT_EN_SHIFT 9
1435 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_FLAG (0x1<<10)
1436 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_FLAG_SHIFT 10
1437 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX2_FLAG (0x1<<11)
1438 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX2_FLAG_SHIFT 11
1439 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_CF_EN (0x1<<12)
1440 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_CF_EN_SHIFT 12
1441 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX2_CF_EN (0x1<<13)
1442 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX2_CF_EN_SHIFT 13
1443 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_CF (0x3<<14)
1444 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_CF_SHIFT 14
1445 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX2_CF (0x3<<16)
1446 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX2_CF_SHIFT 16
1447 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_BLOCKED (0x1<<18)
1448 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_BLOCKED_SHIFT 18
1449 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX10_CF_EN (0x1<<19)
1450 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX10_CF_EN_SHIFT 19
1451 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX11_CF_EN (0x1<<20)
1452 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX11_CF_EN_SHIFT 20
1453 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX12_CF_EN (0x1<<21)
1454 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX12_CF_EN_SHIFT 21
1455 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RESERVED1 (0x3<<22)
1456 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RESERVED1_SHIFT 22
1457 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RETRANSMIT_PEND_SEQ (0xF<<24)
1458 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RETRANSMIT_PEND_SEQ_SHIFT 24
1459 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RETRANSMIT_DONE_SEQ (0xF<<28)
1460 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RETRANSMIT_DONE_SEQ_SHIFT 28
1467 * The iscsi aggregative context of Tstorm
1469 struct tstorm_iscsi_ag_context
{
1470 #if defined(__BIG_ENDIAN)
1473 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1474 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1475 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1476 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1477 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
1478 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
1479 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
1480 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
1481 #define __TSTORM_ISCSI_AG_CONTEXT_AUX3_CF (0x3<<4)
1482 #define __TSTORM_ISCSI_AG_CONTEXT_AUX3_CF_SHIFT 4
1483 #define __TSTORM_ISCSI_AG_CONTEXT_AUX3_FLAG (0x1<<6)
1484 #define __TSTORM_ISCSI_AG_CONTEXT_AUX3_FLAG_SHIFT 6
1485 #define __TSTORM_ISCSI_AG_CONTEXT_AUX4_FLAG (0x1<<7)
1486 #define __TSTORM_ISCSI_AG_CONTEXT_AUX4_FLAG_SHIFT 7
1488 #elif defined(__LITTLE_ENDIAN)
1491 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1492 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1493 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1494 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1495 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
1496 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
1497 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
1498 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
1499 #define __TSTORM_ISCSI_AG_CONTEXT_AUX3_CF (0x3<<4)
1500 #define __TSTORM_ISCSI_AG_CONTEXT_AUX3_CF_SHIFT 4
1501 #define __TSTORM_ISCSI_AG_CONTEXT_AUX3_FLAG (0x1<<6)
1502 #define __TSTORM_ISCSI_AG_CONTEXT_AUX3_FLAG_SHIFT 6
1503 #define __TSTORM_ISCSI_AG_CONTEXT_AUX4_FLAG (0x1<<7)
1504 #define __TSTORM_ISCSI_AG_CONTEXT_AUX4_FLAG_SHIFT 7
1507 #if defined(__BIG_ENDIAN)
1510 #define __TSTORM_ISCSI_AG_CONTEXT_AUX5_FLAG (0x1<<0)
1511 #define __TSTORM_ISCSI_AG_CONTEXT_AUX5_FLAG_SHIFT 0
1512 #define __TSTORM_ISCSI_AG_CONTEXT_AUX6_FLAG (0x1<<1)
1513 #define __TSTORM_ISCSI_AG_CONTEXT_AUX6_FLAG_SHIFT 1
1514 #define __TSTORM_ISCSI_AG_CONTEXT_AUX4_CF (0x3<<2)
1515 #define __TSTORM_ISCSI_AG_CONTEXT_AUX4_CF_SHIFT 2
1516 #define __TSTORM_ISCSI_AG_CONTEXT_AUX5_CF (0x3<<4)
1517 #define __TSTORM_ISCSI_AG_CONTEXT_AUX5_CF_SHIFT 4
1518 #define __TSTORM_ISCSI_AG_CONTEXT_AUX6_CF (0x3<<6)
1519 #define __TSTORM_ISCSI_AG_CONTEXT_AUX6_CF_SHIFT 6
1520 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_CF (0x3<<8)
1521 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_CF_SHIFT 8
1522 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_FLAG (0x1<<10)
1523 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_FLAG_SHIFT 10
1524 #define TSTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN (0x1<<11)
1525 #define TSTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN_SHIFT 11
1526 #define TSTORM_ISCSI_AG_CONTEXT_AUX4_CF_EN (0x1<<12)
1527 #define TSTORM_ISCSI_AG_CONTEXT_AUX4_CF_EN_SHIFT 12
1528 #define TSTORM_ISCSI_AG_CONTEXT_AUX5_CF_EN (0x1<<13)
1529 #define TSTORM_ISCSI_AG_CONTEXT_AUX5_CF_EN_SHIFT 13
1530 #define TSTORM_ISCSI_AG_CONTEXT_AUX6_CF_EN (0x1<<14)
1531 #define TSTORM_ISCSI_AG_CONTEXT_AUX6_CF_EN_SHIFT 14
1532 #define TSTORM_ISCSI_AG_CONTEXT_AUX7_CF_EN (0x1<<15)
1533 #define TSTORM_ISCSI_AG_CONTEXT_AUX7_CF_EN_SHIFT 15
1534 #elif defined(__LITTLE_ENDIAN)
1536 #define __TSTORM_ISCSI_AG_CONTEXT_AUX5_FLAG (0x1<<0)
1537 #define __TSTORM_ISCSI_AG_CONTEXT_AUX5_FLAG_SHIFT 0
1538 #define __TSTORM_ISCSI_AG_CONTEXT_AUX6_FLAG (0x1<<1)
1539 #define __TSTORM_ISCSI_AG_CONTEXT_AUX6_FLAG_SHIFT 1
1540 #define __TSTORM_ISCSI_AG_CONTEXT_AUX4_CF (0x3<<2)
1541 #define __TSTORM_ISCSI_AG_CONTEXT_AUX4_CF_SHIFT 2
1542 #define __TSTORM_ISCSI_AG_CONTEXT_AUX5_CF (0x3<<4)
1543 #define __TSTORM_ISCSI_AG_CONTEXT_AUX5_CF_SHIFT 4
1544 #define __TSTORM_ISCSI_AG_CONTEXT_AUX6_CF (0x3<<6)
1545 #define __TSTORM_ISCSI_AG_CONTEXT_AUX6_CF_SHIFT 6
1546 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_CF (0x3<<8)
1547 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_CF_SHIFT 8
1548 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_FLAG (0x1<<10)
1549 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_FLAG_SHIFT 10
1550 #define TSTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN (0x1<<11)
1551 #define TSTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN_SHIFT 11
1552 #define TSTORM_ISCSI_AG_CONTEXT_AUX4_CF_EN (0x1<<12)
1553 #define TSTORM_ISCSI_AG_CONTEXT_AUX4_CF_EN_SHIFT 12
1554 #define TSTORM_ISCSI_AG_CONTEXT_AUX5_CF_EN (0x1<<13)
1555 #define TSTORM_ISCSI_AG_CONTEXT_AUX5_CF_EN_SHIFT 13
1556 #define TSTORM_ISCSI_AG_CONTEXT_AUX6_CF_EN (0x1<<14)
1557 #define TSTORM_ISCSI_AG_CONTEXT_AUX6_CF_EN_SHIFT 14
1558 #define TSTORM_ISCSI_AG_CONTEXT_AUX7_CF_EN (0x1<<15)
1559 #define TSTORM_ISCSI_AG_CONTEXT_AUX7_CF_EN_SHIFT 15
1562 struct tstorm_tcp_tcp_ag_context_section tcp
;
1566 * The iscsi aggregative context of Cstorm
1568 struct cstorm_iscsi_ag_context
{
1570 #define CSTORM_ISCSI_AG_CONTEXT_STATE (0xFF<<0)
1571 #define CSTORM_ISCSI_AG_CONTEXT_STATE_SHIFT 0
1572 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<8)
1573 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 8
1574 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<9)
1575 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 9
1576 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<10)
1577 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 10
1578 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<11)
1579 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 11
1580 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED_ULP_RX_SE_CF_EN (0x1<<12)
1581 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED_ULP_RX_SE_CF_EN_SHIFT 12
1582 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED_ULP_RX_INV_CF_EN (0x1<<13)
1583 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED_ULP_RX_INV_CF_EN_SHIFT 13
1584 #define __CSTORM_ISCSI_AG_CONTEXT_PENDING_COMPLETION3_CF (0x3<<14)
1585 #define __CSTORM_ISCSI_AG_CONTEXT_PENDING_COMPLETION3_CF_SHIFT 14
1586 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED66 (0x3<<16)
1587 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED66_SHIFT 16
1588 #define __CSTORM_ISCSI_AG_CONTEXT_FIN_RECEIVED_CF_EN (0x1<<18)
1589 #define __CSTORM_ISCSI_AG_CONTEXT_FIN_RECEIVED_CF_EN_SHIFT 18
1590 #define __CSTORM_ISCSI_AG_CONTEXT_PENDING_COMPLETION0_CF_EN (0x1<<19)
1591 #define __CSTORM_ISCSI_AG_CONTEXT_PENDING_COMPLETION0_CF_EN_SHIFT 19
1592 #define __CSTORM_ISCSI_AG_CONTEXT_PENDING_COMPLETION1_CF_EN (0x1<<20)
1593 #define __CSTORM_ISCSI_AG_CONTEXT_PENDING_COMPLETION1_CF_EN_SHIFT 20
1594 #define __CSTORM_ISCSI_AG_CONTEXT_PENDING_COMPLETION2_CF_EN (0x1<<21)
1595 #define __CSTORM_ISCSI_AG_CONTEXT_PENDING_COMPLETION2_CF_EN_SHIFT 21
1596 #define __CSTORM_ISCSI_AG_CONTEXT_PENDING_COMPLETION3_CF_EN (0x1<<22)
1597 #define __CSTORM_ISCSI_AG_CONTEXT_PENDING_COMPLETION3_CF_EN_SHIFT 22
1598 #define __CSTORM_ISCSI_AG_CONTEXT_REL_SEQ_RULE (0x7<<23)
1599 #define __CSTORM_ISCSI_AG_CONTEXT_REL_SEQ_RULE_SHIFT 23
1600 #define CSTORM_ISCSI_AG_CONTEXT_HQ_PROD_RULE (0x3<<26)
1601 #define CSTORM_ISCSI_AG_CONTEXT_HQ_PROD_RULE_SHIFT 26
1602 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED52 (0x3<<28)
1603 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED52_SHIFT 28
1604 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED53 (0x3<<30)
1605 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED53_SHIFT 30
1606 #if defined(__BIG_ENDIAN)
1610 #elif defined(__LITTLE_ENDIAN)
1617 #if defined(__BIG_ENDIAN)
1620 #elif defined(__LITTLE_ENDIAN)
1624 #if defined(__BIG_ENDIAN)
1629 #elif defined(__LITTLE_ENDIAN)
1635 #if defined(__BIG_ENDIAN)
1638 #elif defined(__LITTLE_ENDIAN)
1643 #if defined(__BIG_ENDIAN)
1646 #elif defined(__LITTLE_ENDIAN)
1650 #if defined(__BIG_ENDIAN)
1653 #elif defined(__LITTLE_ENDIAN)
1660 * The iscsi aggregative context of Ustorm
1662 struct ustorm_iscsi_ag_context
{
1663 #if defined(__BIG_ENDIAN)
1664 u8 __aux_counter_flags
;
1666 #define USTORM_ISCSI_AG_CONTEXT_TX_CF (0x3<<0)
1667 #define USTORM_ISCSI_AG_CONTEXT_TX_CF_SHIFT 0
1668 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF (0x3<<2)
1669 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF_SHIFT 2
1670 #define USTORM_ISCSI_AG_CONTEXT_AGG_MISC4_RULE (0x7<<4)
1671 #define USTORM_ISCSI_AG_CONTEXT_AGG_MISC4_RULE_SHIFT 4
1672 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_MASK (0x1<<7)
1673 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_MASK_SHIFT 7
1675 #define __USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1676 #define __USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1677 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1678 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1679 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
1680 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
1681 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
1682 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
1683 #define USTORM_ISCSI_AG_CONTEXT_INV_CF (0x3<<4)
1684 #define USTORM_ISCSI_AG_CONTEXT_INV_CF_SHIFT 4
1685 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF (0x3<<6)
1686 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF_SHIFT 6
1688 #elif defined(__LITTLE_ENDIAN)
1691 #define __USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1692 #define __USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1693 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1694 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1695 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
1696 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
1697 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
1698 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
1699 #define USTORM_ISCSI_AG_CONTEXT_INV_CF (0x3<<4)
1700 #define USTORM_ISCSI_AG_CONTEXT_INV_CF_SHIFT 4
1701 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF (0x3<<6)
1702 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF_SHIFT 6
1704 #define USTORM_ISCSI_AG_CONTEXT_TX_CF (0x3<<0)
1705 #define USTORM_ISCSI_AG_CONTEXT_TX_CF_SHIFT 0
1706 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF (0x3<<2)
1707 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF_SHIFT 2
1708 #define USTORM_ISCSI_AG_CONTEXT_AGG_MISC4_RULE (0x7<<4)
1709 #define USTORM_ISCSI_AG_CONTEXT_AGG_MISC4_RULE_SHIFT 4
1710 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_MASK (0x1<<7)
1711 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_MASK_SHIFT 7
1712 u8 __aux_counter_flags
;
1714 #if defined(__BIG_ENDIAN)
1717 u16 __cq_local_comp_itt_val
;
1718 #elif defined(__LITTLE_ENDIAN)
1719 u16 __cq_local_comp_itt_val
;
1724 #if defined(__BIG_ENDIAN)
1728 #elif defined(__LITTLE_ENDIAN)
1735 #if defined(__BIG_ENDIAN)
1738 #elif defined(__LITTLE_ENDIAN)
1742 #if defined(__BIG_ENDIAN)
1745 #define USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_RULE (0x7<<0)
1746 #define USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_RULE_SHIFT 0
1747 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL3_RULE (0x7<<3)
1748 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL3_RULE_SHIFT 3
1749 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_ARM_N_FLAG (0x1<<6)
1750 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_ARM_N_FLAG_SHIFT 6
1751 #define __USTORM_ISCSI_AG_CONTEXT_RESERVED1 (0x1<<7)
1752 #define __USTORM_ISCSI_AG_CONTEXT_RESERVED1_SHIFT 7
1753 u8 decision_rule_enable_bits
;
1754 #define USTORM_ISCSI_AG_CONTEXT_INV_CF_EN (0x1<<0)
1755 #define USTORM_ISCSI_AG_CONTEXT_INV_CF_EN_SHIFT 0
1756 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF_EN (0x1<<1)
1757 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF_EN_SHIFT 1
1758 #define USTORM_ISCSI_AG_CONTEXT_TX_CF_EN (0x1<<2)
1759 #define USTORM_ISCSI_AG_CONTEXT_TX_CF_EN_SHIFT 2
1760 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF_EN (0x1<<3)
1761 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF_EN_SHIFT 3
1762 #define __USTORM_ISCSI_AG_CONTEXT_CQ_LOCAL_COMP_CF_EN (0x1<<4)
1763 #define __USTORM_ISCSI_AG_CONTEXT_CQ_LOCAL_COMP_CF_EN_SHIFT 4
1764 #define __USTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_EN (0x1<<5)
1765 #define __USTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_EN_SHIFT 5
1766 #define __USTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN (0x1<<6)
1767 #define __USTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN_SHIFT 6
1768 #define __USTORM_ISCSI_AG_CONTEXT_DQ_CF_EN (0x1<<7)
1769 #define __USTORM_ISCSI_AG_CONTEXT_DQ_CF_EN_SHIFT 7
1770 #elif defined(__LITTLE_ENDIAN)
1771 u8 decision_rule_enable_bits
;
1772 #define USTORM_ISCSI_AG_CONTEXT_INV_CF_EN (0x1<<0)
1773 #define USTORM_ISCSI_AG_CONTEXT_INV_CF_EN_SHIFT 0
1774 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF_EN (0x1<<1)
1775 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF_EN_SHIFT 1
1776 #define USTORM_ISCSI_AG_CONTEXT_TX_CF_EN (0x1<<2)
1777 #define USTORM_ISCSI_AG_CONTEXT_TX_CF_EN_SHIFT 2
1778 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF_EN (0x1<<3)
1779 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF_EN_SHIFT 3
1780 #define __USTORM_ISCSI_AG_CONTEXT_CQ_LOCAL_COMP_CF_EN (0x1<<4)
1781 #define __USTORM_ISCSI_AG_CONTEXT_CQ_LOCAL_COMP_CF_EN_SHIFT 4
1782 #define __USTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_EN (0x1<<5)
1783 #define __USTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_EN_SHIFT 5
1784 #define __USTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN (0x1<<6)
1785 #define __USTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN_SHIFT 6
1786 #define __USTORM_ISCSI_AG_CONTEXT_DQ_CF_EN (0x1<<7)
1787 #define __USTORM_ISCSI_AG_CONTEXT_DQ_CF_EN_SHIFT 7
1789 #define USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_RULE (0x7<<0)
1790 #define USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_RULE_SHIFT 0
1791 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL3_RULE (0x7<<3)
1792 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL3_RULE_SHIFT 3
1793 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_ARM_N_FLAG (0x1<<6)
1794 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_ARM_N_FLAG_SHIFT 6
1795 #define __USTORM_ISCSI_AG_CONTEXT_RESERVED1 (0x1<<7)
1796 #define __USTORM_ISCSI_AG_CONTEXT_RESERVED1_SHIFT 7
1802 * Timers connection context
1804 struct iscsi_timers_block_context
{
1809 #define __ISCSI_TIMERS_BLOCK_CONTEXT_NUM_OF_ACTIVE_TIMERS (0x3<<0)
1810 #define __ISCSI_TIMERS_BLOCK_CONTEXT_NUM_OF_ACTIVE_TIMERS_SHIFT 0
1811 #define ISCSI_TIMERS_BLOCK_CONTEXT_CONN_VALID_FLG (0x1<<2)
1812 #define ISCSI_TIMERS_BLOCK_CONTEXT_CONN_VALID_FLG_SHIFT 2
1813 #define __ISCSI_TIMERS_BLOCK_CONTEXT_RESERVED0 (0x1FFFFFFF<<3)
1814 #define __ISCSI_TIMERS_BLOCK_CONTEXT_RESERVED0_SHIFT 3
1818 * Ethernet context section, shared in TOE, RDMA and ISCSI
1820 struct xstorm_eth_context_section
{
1821 #if defined(__BIG_ENDIAN)
1826 #elif defined(__LITTLE_ENDIAN)
1832 #if defined(__BIG_ENDIAN)
1837 #elif defined(__LITTLE_ENDIAN)
1843 #if defined(__BIG_ENDIAN)
1844 u16 reserved_vlan_type
;
1846 #define XSTORM_ETH_CONTEXT_SECTION_VLAN_ID (0xFFF<<0)
1847 #define XSTORM_ETH_CONTEXT_SECTION_VLAN_ID_SHIFT 0
1848 #define XSTORM_ETH_CONTEXT_SECTION_CFI (0x1<<12)
1849 #define XSTORM_ETH_CONTEXT_SECTION_CFI_SHIFT 12
1850 #define XSTORM_ETH_CONTEXT_SECTION_PRIORITY (0x7<<13)
1851 #define XSTORM_ETH_CONTEXT_SECTION_PRIORITY_SHIFT 13
1852 #elif defined(__LITTLE_ENDIAN)
1854 #define XSTORM_ETH_CONTEXT_SECTION_VLAN_ID (0xFFF<<0)
1855 #define XSTORM_ETH_CONTEXT_SECTION_VLAN_ID_SHIFT 0
1856 #define XSTORM_ETH_CONTEXT_SECTION_CFI (0x1<<12)
1857 #define XSTORM_ETH_CONTEXT_SECTION_CFI_SHIFT 12
1858 #define XSTORM_ETH_CONTEXT_SECTION_PRIORITY (0x7<<13)
1859 #define XSTORM_ETH_CONTEXT_SECTION_PRIORITY_SHIFT 13
1860 u16 reserved_vlan_type
;
1862 #if defined(__BIG_ENDIAN)
1867 #elif defined(__LITTLE_ENDIAN)
1876 * IpV4 context section, shared in TOE, RDMA and ISCSI
1878 struct xstorm_ip_v4_context_section
{
1879 #if defined(__BIG_ENDIAN)
1880 u16 __pbf_hdr_cmd_rsvd_id
;
1881 u16 __pbf_hdr_cmd_rsvd_flags_offset
;
1882 #elif defined(__LITTLE_ENDIAN)
1883 u16 __pbf_hdr_cmd_rsvd_flags_offset
;
1884 u16 __pbf_hdr_cmd_rsvd_id
;
1886 #if defined(__BIG_ENDIAN)
1887 u8 __pbf_hdr_cmd_rsvd_ver_ihl
;
1889 u16 __pbf_hdr_cmd_rsvd_length
;
1890 #elif defined(__LITTLE_ENDIAN)
1891 u16 __pbf_hdr_cmd_rsvd_length
;
1893 u8 __pbf_hdr_cmd_rsvd_ver_ihl
;
1896 #if defined(__BIG_ENDIAN)
1898 u8 __pbf_hdr_cmd_rsvd_protocol
;
1899 u16 __pbf_hdr_cmd_rsvd_csum
;
1900 #elif defined(__LITTLE_ENDIAN)
1901 u16 __pbf_hdr_cmd_rsvd_csum
;
1902 u8 __pbf_hdr_cmd_rsvd_protocol
;
1905 u32 __pbf_hdr_cmd_rsvd_1
;
1910 * context section, shared in TOE, RDMA and ISCSI
1912 struct xstorm_padded_ip_v4_context_section
{
1913 struct xstorm_ip_v4_context_section ip_v4
;
1918 * IpV6 context section, shared in TOE, RDMA and ISCSI
1920 struct xstorm_ip_v6_context_section
{
1921 #if defined(__BIG_ENDIAN)
1922 u16 pbf_hdr_cmd_rsvd_payload_len
;
1923 u8 pbf_hdr_cmd_rsvd_nxt_hdr
;
1925 #elif defined(__LITTLE_ENDIAN)
1927 u8 pbf_hdr_cmd_rsvd_nxt_hdr
;
1928 u16 pbf_hdr_cmd_rsvd_payload_len
;
1930 u32 priority_flow_label
;
1931 #define XSTORM_IP_V6_CONTEXT_SECTION_FLOW_LABEL (0xFFFFF<<0)
1932 #define XSTORM_IP_V6_CONTEXT_SECTION_FLOW_LABEL_SHIFT 0
1933 #define XSTORM_IP_V6_CONTEXT_SECTION_TRAFFIC_CLASS (0xFF<<20)
1934 #define XSTORM_IP_V6_CONTEXT_SECTION_TRAFFIC_CLASS_SHIFT 20
1935 #define XSTORM_IP_V6_CONTEXT_SECTION_PBF_HDR_CMD_RSVD_VER (0xF<<28)
1936 #define XSTORM_IP_V6_CONTEXT_SECTION_PBF_HDR_CMD_RSVD_VER_SHIFT 28
1937 u32 ip_local_addr_lo_hi
;
1938 u32 ip_local_addr_lo_lo
;
1939 u32 ip_local_addr_hi_hi
;
1940 u32 ip_local_addr_hi_lo
;
1941 u32 ip_remote_addr_lo_hi
;
1942 u32 ip_remote_addr_lo_lo
;
1943 u32 ip_remote_addr_hi_hi
;
1944 u32 ip_remote_addr_hi_lo
;
1947 union xstorm_ip_context_section_types
{
1948 struct xstorm_padded_ip_v4_context_section padded_ip_v4
;
1949 struct xstorm_ip_v6_context_section ip_v6
;
1953 * TCP context section, shared in TOE, RDMA and ISCSI
1955 struct xstorm_tcp_context_section
{
1957 #if defined(__BIG_ENDIAN)
1960 #elif defined(__LITTLE_ENDIAN)
1964 #if defined(__BIG_ENDIAN)
1965 u8 original_nagle_1b
;
1968 #define XSTORM_TCP_CONTEXT_SECTION_TOTAL_HEADER_SIZE (0xFF<<0)
1969 #define XSTORM_TCP_CONTEXT_SECTION_TOTAL_HEADER_SIZE_SHIFT 0
1970 #define __XSTORM_TCP_CONTEXT_SECTION_ECT_BIT (0x1<<8)
1971 #define __XSTORM_TCP_CONTEXT_SECTION_ECT_BIT_SHIFT 8
1972 #define __XSTORM_TCP_CONTEXT_SECTION_ECN_ENABLED (0x1<<9)
1973 #define __XSTORM_TCP_CONTEXT_SECTION_ECN_ENABLED_SHIFT 9
1974 #define XSTORM_TCP_CONTEXT_SECTION_SACK_ENABLED (0x1<<10)
1975 #define XSTORM_TCP_CONTEXT_SECTION_SACK_ENABLED_SHIFT 10
1976 #define XSTORM_TCP_CONTEXT_SECTION_KA_STATE (0x1<<11)
1977 #define XSTORM_TCP_CONTEXT_SECTION_KA_STATE_SHIFT 11
1978 #define XSTORM_TCP_CONTEXT_SECTION_FIN_SENT_FLAG (0x1<<12)
1979 #define XSTORM_TCP_CONTEXT_SECTION_FIN_SENT_FLAG_SHIFT 12
1980 #define XSTORM_TCP_CONTEXT_SECTION_WINDOW_SATURATED (0x1<<13)
1981 #define XSTORM_TCP_CONTEXT_SECTION_WINDOW_SATURATED_SHIFT 13
1982 #define XSTORM_TCP_CONTEXT_SECTION_SLOWPATH_QUEUES_FLUSH_COUNTER (0x3<<14)
1983 #define XSTORM_TCP_CONTEXT_SECTION_SLOWPATH_QUEUES_FLUSH_COUNTER_SHIFT 14
1984 #elif defined(__LITTLE_ENDIAN)
1986 #define XSTORM_TCP_CONTEXT_SECTION_TOTAL_HEADER_SIZE (0xFF<<0)
1987 #define XSTORM_TCP_CONTEXT_SECTION_TOTAL_HEADER_SIZE_SHIFT 0
1988 #define __XSTORM_TCP_CONTEXT_SECTION_ECT_BIT (0x1<<8)
1989 #define __XSTORM_TCP_CONTEXT_SECTION_ECT_BIT_SHIFT 8
1990 #define __XSTORM_TCP_CONTEXT_SECTION_ECN_ENABLED (0x1<<9)
1991 #define __XSTORM_TCP_CONTEXT_SECTION_ECN_ENABLED_SHIFT 9
1992 #define XSTORM_TCP_CONTEXT_SECTION_SACK_ENABLED (0x1<<10)
1993 #define XSTORM_TCP_CONTEXT_SECTION_SACK_ENABLED_SHIFT 10
1994 #define XSTORM_TCP_CONTEXT_SECTION_KA_STATE (0x1<<11)
1995 #define XSTORM_TCP_CONTEXT_SECTION_KA_STATE_SHIFT 11
1996 #define XSTORM_TCP_CONTEXT_SECTION_FIN_SENT_FLAG (0x1<<12)
1997 #define XSTORM_TCP_CONTEXT_SECTION_FIN_SENT_FLAG_SHIFT 12
1998 #define XSTORM_TCP_CONTEXT_SECTION_WINDOW_SATURATED (0x1<<13)
1999 #define XSTORM_TCP_CONTEXT_SECTION_WINDOW_SATURATED_SHIFT 13
2000 #define XSTORM_TCP_CONTEXT_SECTION_SLOWPATH_QUEUES_FLUSH_COUNTER (0x3<<14)
2001 #define XSTORM_TCP_CONTEXT_SECTION_SLOWPATH_QUEUES_FLUSH_COUNTER_SHIFT 14
2003 u8 original_nagle_1b
;
2005 #if defined(__BIG_ENDIAN)
2007 u16 window_scaling_factor
;
2008 #elif defined(__LITTLE_ENDIAN)
2009 u16 window_scaling_factor
;
2014 u32 __next_timer_expir
;
2018 * Common context section, shared in TOE, RDMA and ISCSI
2020 struct xstorm_common_context_section
{
2021 struct xstorm_eth_context_section ethernet
;
2022 union xstorm_ip_context_section_types ip_union
;
2023 struct xstorm_tcp_context_section tcp
;
2024 #if defined(__BIG_ENDIAN)
2026 u8 statistics_params
;
2027 #define XSTORM_COMMON_CONTEXT_SECTION_UPDATE_L2_STATSTICS (0x1<<0)
2028 #define XSTORM_COMMON_CONTEXT_SECTION_UPDATE_L2_STATSTICS_SHIFT 0
2029 #define XSTORM_COMMON_CONTEXT_SECTION_UPDATE_L4_STATSTICS (0x1<<1)
2030 #define XSTORM_COMMON_CONTEXT_SECTION_UPDATE_L4_STATSTICS_SHIFT 1
2031 #define XSTORM_COMMON_CONTEXT_SECTION_STATISTICS_COUNTER_ID (0x1F<<2)
2032 #define XSTORM_COMMON_CONTEXT_SECTION_STATISTICS_COUNTER_ID_SHIFT 2
2033 #define XSTORM_COMMON_CONTEXT_SECTION_RESERVED0 (0x1<<7)
2034 #define XSTORM_COMMON_CONTEXT_SECTION_RESERVED0_SHIFT 7
2036 #elif defined(__LITTLE_ENDIAN)
2038 u8 statistics_params
;
2039 #define XSTORM_COMMON_CONTEXT_SECTION_UPDATE_L2_STATSTICS (0x1<<0)
2040 #define XSTORM_COMMON_CONTEXT_SECTION_UPDATE_L2_STATSTICS_SHIFT 0
2041 #define XSTORM_COMMON_CONTEXT_SECTION_UPDATE_L4_STATSTICS (0x1<<1)
2042 #define XSTORM_COMMON_CONTEXT_SECTION_UPDATE_L4_STATSTICS_SHIFT 1
2043 #define XSTORM_COMMON_CONTEXT_SECTION_STATISTICS_COUNTER_ID (0x1F<<2)
2044 #define XSTORM_COMMON_CONTEXT_SECTION_STATISTICS_COUNTER_ID_SHIFT 2
2045 #define XSTORM_COMMON_CONTEXT_SECTION_RESERVED0 (0x1<<7)
2046 #define XSTORM_COMMON_CONTEXT_SECTION_RESERVED0_SHIFT 7
2052 * Flags used in ISCSI context section
2054 struct xstorm_iscsi_context_flags
{
2056 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_IMMEDIATE_DATA (0x1<<0)
2057 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_IMMEDIATE_DATA_SHIFT 0
2058 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_INITIAL_R2T (0x1<<1)
2059 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_INITIAL_R2T_SHIFT 1
2060 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_EN_HEADER_DIGEST (0x1<<2)
2061 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_EN_HEADER_DIGEST_SHIFT 2
2062 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_EN_DATA_DIGEST (0x1<<3)
2063 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_EN_DATA_DIGEST_SHIFT 3
2064 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_HQ_BD_WRITTEN (0x1<<4)
2065 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_HQ_BD_WRITTEN_SHIFT 4
2066 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_LAST_OP_SQ (0x1<<5)
2067 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_LAST_OP_SQ_SHIFT 5
2068 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_UPDATE_SND_NXT (0x1<<6)
2069 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_UPDATE_SND_NXT_SHIFT 6
2070 #define XSTORM_ISCSI_CONTEXT_FLAGS_RESERVED4 (0x1<<7)
2071 #define XSTORM_ISCSI_CONTEXT_FLAGS_RESERVED4_SHIFT 7
2074 struct iscsi_task_context_entry_x
{
2075 u32 data_out_buffer_offset
;
2080 struct iscsi_task_context_entry_xuc_x_write_only
{
2084 struct iscsi_task_context_entry_xuc_xu_write_both
{
2087 #if defined(__BIG_ENDIAN)
2091 #elif defined(__LITTLE_ENDIAN)
2099 * iSCSI context section
2101 struct xstorm_iscsi_context_section
{
2102 u32 first_burst_length
;
2103 u32 max_send_pdu_length
;
2104 struct regpair sq_pbl_base
;
2105 struct regpair sq_curr_pbe
;
2106 struct regpair hq_pbl_base
;
2107 struct regpair hq_curr_pbe_base
;
2108 struct regpair r2tq_pbl_base
;
2109 struct regpair r2tq_curr_pbe_base
;
2110 struct regpair task_pbl_base
;
2111 #if defined(__BIG_ENDIAN)
2113 struct xstorm_iscsi_context_flags flags
;
2114 u8 task_pbl_cache_idx
;
2115 #elif defined(__LITTLE_ENDIAN)
2116 u8 task_pbl_cache_idx
;
2117 struct xstorm_iscsi_context_flags flags
;
2120 u32 seq_more_2_send
;
2121 u32 pdu_more_2_send
;
2122 struct iscsi_task_context_entry_x temp_tce_x
;
2123 struct iscsi_task_context_entry_xuc_x_write_only temp_tce_x_wr
;
2124 struct iscsi_task_context_entry_xuc_xu_write_both temp_tce_xu_wr
;
2126 u32 exp_data_transfer_len_ttt
;
2127 u32 pdu_data_2_rxmit
;
2128 u32 rxmit_bytes_2_dr
;
2129 #if defined(__BIG_ENDIAN)
2130 u16 rxmit_sge_offset
;
2132 #elif defined(__LITTLE_ENDIAN)
2134 u16 rxmit_sge_offset
;
2136 #if defined(__BIG_ENDIAN)
2139 #define XSTORM_ISCSI_CONTEXT_SECTION_B_NEW_HQ_BD (0x1<<0)
2140 #define XSTORM_ISCSI_CONTEXT_SECTION_B_NEW_HQ_BD_SHIFT 0
2141 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PDU_HDR (0x1<<1)
2142 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PDU_HDR_SHIFT 1
2143 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_END_PDU (0x1<<2)
2144 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_END_PDU_SHIFT 2
2145 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_DR (0x1<<3)
2146 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_DR_SHIFT 3
2147 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_START_DR (0x1<<4)
2148 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_START_DR_SHIFT 4
2149 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PADDING (0x3<<5)
2150 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PADDING_SHIFT 5
2151 #define XSTORM_ISCSI_CONTEXT_SECTION_B_ISCSI_CONT_FAST_RXMIT (0x1<<7)
2152 #define XSTORM_ISCSI_CONTEXT_SECTION_B_ISCSI_CONT_FAST_RXMIT_SHIFT 7
2154 #elif defined(__LITTLE_ENDIAN)
2157 #define XSTORM_ISCSI_CONTEXT_SECTION_B_NEW_HQ_BD (0x1<<0)
2158 #define XSTORM_ISCSI_CONTEXT_SECTION_B_NEW_HQ_BD_SHIFT 0
2159 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PDU_HDR (0x1<<1)
2160 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PDU_HDR_SHIFT 1
2161 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_END_PDU (0x1<<2)
2162 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_END_PDU_SHIFT 2
2163 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_DR (0x1<<3)
2164 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_DR_SHIFT 3
2165 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_START_DR (0x1<<4)
2166 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_START_DR_SHIFT 4
2167 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PADDING (0x3<<5)
2168 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PADDING_SHIFT 5
2169 #define XSTORM_ISCSI_CONTEXT_SECTION_B_ISCSI_CONT_FAST_RXMIT (0x1<<7)
2170 #define XSTORM_ISCSI_CONTEXT_SECTION_B_ISCSI_CONT_FAST_RXMIT_SHIFT 7
2173 u32 hq_rxmit_tcp_seq
;
2177 * Xstorm iSCSI Storm Context
2179 struct xstorm_iscsi_st_context
{
2180 struct xstorm_common_context_section common
;
2181 struct xstorm_iscsi_context_section iscsi
;
2185 * CQ DB CQ producer and pending completion counter
2187 struct iscsi_cq_db_prod_pnd_cmpltn_cnt
{
2188 #if defined(__BIG_ENDIAN)
2191 #elif defined(__LITTLE_ENDIAN)
2198 * CQ DB pending completion ITT array
2200 struct iscsi_cq_db_prod_pnd_cmpltn_cnt_arr
{
2201 struct iscsi_cq_db_prod_pnd_cmpltn_cnt prod_pend_comp
[8];
2205 * Cstorm CQ sequence to notify array, updated by driver
2207 struct iscsi_cq_db_sqn_2_notify_arr
{
2212 * Cstorm iSCSI Storm Context
2214 struct cstorm_iscsi_st_context
{
2215 struct iscsi_cq_db_prod_pnd_cmpltn_cnt_arr cq_c_prod_pend_comp_ctr_arr
;
2216 struct iscsi_cq_db_sqn_2_notify_arr cq_c_prod_sqn_arr
;
2217 struct iscsi_cq_db_sqn_2_notify_arr cq_c_sqn_2_notify_arr
;
2218 struct regpair hq_pbl_base
;
2219 struct regpair hq_curr_pbe
;
2220 struct regpair task_pbl_base
;
2221 struct regpair cq_db_base
;
2222 #if defined(__BIG_ENDIAN)
2225 #elif defined(__LITTLE_ENDIAN)
2229 u32 hq_bd_data_segment_len
;
2230 u32 hq_bd_buffer_offset
;
2231 #if defined(__BIG_ENDIAN)
2233 u8 cq_proc_en_bit_map
;
2234 u8 cq_pend_comp_itt_valid_bit_map
;
2236 #elif defined(__LITTLE_ENDIAN)
2238 u8 cq_pend_comp_itt_valid_bit_map
;
2239 u8 cq_proc_en_bit_map
;
2243 #if defined(__BIG_ENDIAN)
2245 #define CSTORM_ISCSI_ST_CONTEXT_DATA_DIGEST_EN (0x1<<0)
2246 #define CSTORM_ISCSI_ST_CONTEXT_DATA_DIGEST_EN_SHIFT 0
2247 #define CSTORM_ISCSI_ST_CONTEXT_HDR_DIGEST_EN (0x1<<1)
2248 #define CSTORM_ISCSI_ST_CONTEXT_HDR_DIGEST_EN_SHIFT 1
2249 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_CTXT_VALID (0x1<<2)
2250 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_CTXT_VALID_SHIFT 2
2251 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_LCL_CMPLN_FLG (0x1<<3)
2252 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_LCL_CMPLN_FLG_SHIFT 3
2253 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_WRITE_TASK (0x1<<4)
2254 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_WRITE_TASK_SHIFT 4
2255 #define CSTORM_ISCSI_ST_CONTEXT_CTRL_FLAGS_RSRV (0x7FF<<5)
2256 #define CSTORM_ISCSI_ST_CONTEXT_CTRL_FLAGS_RSRV_SHIFT 5
2258 #elif defined(__LITTLE_ENDIAN)
2261 #define CSTORM_ISCSI_ST_CONTEXT_DATA_DIGEST_EN (0x1<<0)
2262 #define CSTORM_ISCSI_ST_CONTEXT_DATA_DIGEST_EN_SHIFT 0
2263 #define CSTORM_ISCSI_ST_CONTEXT_HDR_DIGEST_EN (0x1<<1)
2264 #define CSTORM_ISCSI_ST_CONTEXT_HDR_DIGEST_EN_SHIFT 1
2265 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_CTXT_VALID (0x1<<2)
2266 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_CTXT_VALID_SHIFT 2
2267 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_LCL_CMPLN_FLG (0x1<<3)
2268 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_LCL_CMPLN_FLG_SHIFT 3
2269 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_WRITE_TASK (0x1<<4)
2270 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_WRITE_TASK_SHIFT 4
2271 #define CSTORM_ISCSI_ST_CONTEXT_CTRL_FLAGS_RSRV (0x7FF<<5)
2272 #define CSTORM_ISCSI_ST_CONTEXT_CTRL_FLAGS_RSRV_SHIFT 5
2274 struct regpair rsrv1
;
2278 * Iscsi connection context
2280 struct iscsi_context
{
2281 struct ustorm_iscsi_st_context ustorm_st_context
;
2282 struct tstorm_iscsi_st_context tstorm_st_context
;
2283 struct xstorm_iscsi_ag_context xstorm_ag_context
;
2284 struct tstorm_iscsi_ag_context tstorm_ag_context
;
2285 struct cstorm_iscsi_ag_context cstorm_ag_context
;
2286 struct ustorm_iscsi_ag_context ustorm_ag_context
;
2287 struct iscsi_timers_block_context timers_context
;
2288 struct regpair upb_context
;
2289 struct xstorm_iscsi_st_context xstorm_st_context
;
2290 struct regpair xpb_context
;
2291 struct cstorm_iscsi_st_context cstorm_st_context
;
2295 * Buffer per connection, used in Tstorm
2297 struct iscsi_conn_buf
{
2298 struct regpair reserved
[8];
2312 * l5cm- connection identification params
2314 struct l5cm_conn_addr_params
{
2316 #if defined(__BIG_ENDIAN)
2321 #elif defined(__LITTLE_ENDIAN)
2327 #if defined(__BIG_ENDIAN)
2329 #define L5CM_CONN_ADDR_PARAMS_IP_VERSION (0x1<<0)
2330 #define L5CM_CONN_ADDR_PARAMS_IP_VERSION_SHIFT 0
2331 #define L5CM_CONN_ADDR_PARAMS_RSRV (0x7FFF<<1)
2332 #define L5CM_CONN_ADDR_PARAMS_RSRV_SHIFT 1
2335 #elif defined(__LITTLE_ENDIAN)
2339 #define L5CM_CONN_ADDR_PARAMS_IP_VERSION (0x1<<0)
2340 #define L5CM_CONN_ADDR_PARAMS_IP_VERSION_SHIFT 0
2341 #define L5CM_CONN_ADDR_PARAMS_RSRV (0x7FFF<<1)
2342 #define L5CM_CONN_ADDR_PARAMS_RSRV_SHIFT 1
2344 struct ip_v6_addr local_ip_addr
;
2345 struct ip_v6_addr remote_ip_addr
;
2346 u32 ipv6_flow_label_20b
;
2348 #if defined(__BIG_ENDIAN)
2349 u16 remote_tcp_port
;
2351 #elif defined(__LITTLE_ENDIAN)
2353 u16 remote_tcp_port
;
2358 * l5cm-xstorm connection buffer
2360 struct l5cm_xstorm_conn_buffer
{
2361 #if defined(__BIG_ENDIAN)
2364 #define L5CM_XSTORM_CONN_BUFFER_NAGLE_ENABLE (0x1<<0)
2365 #define L5CM_XSTORM_CONN_BUFFER_NAGLE_ENABLE_SHIFT 0
2366 #define L5CM_XSTORM_CONN_BUFFER_RSRV (0x7FFF<<1)
2367 #define L5CM_XSTORM_CONN_BUFFER_RSRV_SHIFT 1
2368 #elif defined(__LITTLE_ENDIAN)
2370 #define L5CM_XSTORM_CONN_BUFFER_NAGLE_ENABLE (0x1<<0)
2371 #define L5CM_XSTORM_CONN_BUFFER_NAGLE_ENABLE_SHIFT 0
2372 #define L5CM_XSTORM_CONN_BUFFER_RSRV (0x7FFF<<1)
2373 #define L5CM_XSTORM_CONN_BUFFER_RSRV_SHIFT 1
2376 #if defined(__BIG_ENDIAN)
2378 u16 pseudo_header_checksum
;
2379 #elif defined(__LITTLE_ENDIAN)
2380 u16 pseudo_header_checksum
;
2385 struct regpair context_addr
;
2389 * l5cm-tstorm connection buffer
2391 struct l5cm_tstorm_conn_buffer
{
2394 #if defined(__BIG_ENDIAN)
2396 #define L5CM_TSTORM_CONN_BUFFER_DELAYED_ACK_ENABLE (0x1<<0)
2397 #define L5CM_TSTORM_CONN_BUFFER_DELAYED_ACK_ENABLE_SHIFT 0
2398 #define L5CM_TSTORM_CONN_BUFFER_RSRV (0x7FFF<<1)
2399 #define L5CM_TSTORM_CONN_BUFFER_RSRV_SHIFT 1
2400 u8 ka_max_probe_count
;
2402 #elif defined(__LITTLE_ENDIAN)
2404 u8 ka_max_probe_count
;
2406 #define L5CM_TSTORM_CONN_BUFFER_DELAYED_ACK_ENABLE (0x1<<0)
2407 #define L5CM_TSTORM_CONN_BUFFER_DELAYED_ACK_ENABLE_SHIFT 0
2408 #define L5CM_TSTORM_CONN_BUFFER_RSRV (0x7FFF<<1)
2409 #define L5CM_TSTORM_CONN_BUFFER_RSRV_SHIFT 1
2417 * l5cm connection buffer for active side
2419 struct l5cm_active_conn_buffer
{
2420 struct l5cm_conn_addr_params conn_addr_buf
;
2421 struct l5cm_xstorm_conn_buffer xstorm_conn_buffer
;
2422 struct l5cm_tstorm_conn_buffer tstorm_conn_buffer
;
2426 * l5cm slow path element
2428 struct l5cm_packet_size
{
2434 * l5cm connection parameters
2436 union l5cm_reduce_param_union
{
2437 u32 passive_side_scramble_key
;
2442 * l5cm connection parameters
2444 struct l5cm_reduce_conn
{
2445 union l5cm_reduce_param_union param
;
2450 * l5cm slow path element
2452 union l5cm_specific_data
{
2453 u8 protocol_data
[8];
2454 struct regpair phy_address
;
2455 struct l5cm_packet_size packet_size
;
2456 struct l5cm_reduce_conn reduced_conn
;
2460 * l5 slow path element
2464 union l5cm_specific_data data
;
2470 struct tstorm_l5cm_tcp_flags
{
2472 #define TSTORM_L5CM_TCP_FLAGS_VLAN_ID (0xFFF<<0)
2473 #define TSTORM_L5CM_TCP_FLAGS_VLAN_ID_SHIFT 0
2474 #define TSTORM_L5CM_TCP_FLAGS_RSRV0 (0x1<<12)
2475 #define TSTORM_L5CM_TCP_FLAGS_RSRV0_SHIFT 12
2476 #define TSTORM_L5CM_TCP_FLAGS_TS_ENABLED (0x1<<13)
2477 #define TSTORM_L5CM_TCP_FLAGS_TS_ENABLED_SHIFT 13
2478 #define TSTORM_L5CM_TCP_FLAGS_RSRV1 (0x3<<14)
2479 #define TSTORM_L5CM_TCP_FLAGS_RSRV1_SHIFT 14
2485 struct xstorm_l5cm_tcp_flags
{
2487 #define XSTORM_L5CM_TCP_FLAGS_ENC_ENABLED (0x1<<0)
2488 #define XSTORM_L5CM_TCP_FLAGS_ENC_ENABLED_SHIFT 0
2489 #define XSTORM_L5CM_TCP_FLAGS_TS_ENABLED (0x1<<1)
2490 #define XSTORM_L5CM_TCP_FLAGS_TS_ENABLED_SHIFT 1
2491 #define XSTORM_L5CM_TCP_FLAGS_WND_SCL_EN (0x1<<2)
2492 #define XSTORM_L5CM_TCP_FLAGS_WND_SCL_EN_SHIFT 2
2493 #define XSTORM_L5CM_TCP_FLAGS_RSRV (0x1F<<3)
2494 #define XSTORM_L5CM_TCP_FLAGS_RSRV_SHIFT 3
2497 #endif /* CNIC_DEFS_H */