1 /**************************************************************************
3 Copyright (c) 2007, Chelsio Inc.
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met:
9 1. Redistributions of source code must retain the above copyright notice,
10 this list of conditions and the following disclaimer.
12 2. Neither the name of the Chelsio Corporation nor the names of its
13 contributors may be used to endorse or promote products derived from
14 this software without specific prior written permission.
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 POSSIBILITY OF SUCH DAMAGE.
28 $FreeBSD: src/sys/dev/cxgb/common/cxgb_t3_cpl.h,v 1.4 2007/07/17 06:50:34 kmacy Exp $
30 ***************************************************************************/
35 CPL_PASS_OPEN_REQ
= 0x1,
36 CPL_PASS_ACCEPT_RPL
= 0x2,
37 CPL_ACT_OPEN_REQ
= 0x3,
39 CPL_SET_TCB_FIELD
= 0x5,
42 CPL_CLOSE_CON_REQ
= 0x8,
43 CPL_CLOSE_LISTSRV_REQ
= 0x9,
47 CPL_RX_DATA_ACK
= 0xD,
49 CPL_RTE_DELETE_REQ
= 0xF,
50 CPL_RTE_WRITE_REQ
= 0x10,
51 CPL_RTE_READ_REQ
= 0x11,
52 CPL_L2T_WRITE_REQ
= 0x12,
53 CPL_L2T_READ_REQ
= 0x13,
54 CPL_SMT_WRITE_REQ
= 0x14,
55 CPL_SMT_READ_REQ
= 0x15,
56 CPL_TX_PKT_LSO
= 0x16,
59 CPL_TID_RELEASE
= 0x1A,
61 CPL_CLOSE_LISTSRV_RPL
= 0x20,
63 CPL_GET_TCB_RPL
= 0x22,
64 CPL_L2T_WRITE_RPL
= 0x23,
65 CPL_PCMD_READ_RPL
= 0x24,
67 CPL_PEER_CLOSE
= 0x26,
68 CPL_RTE_DELETE_RPL
= 0x27,
69 CPL_RTE_WRITE_RPL
= 0x28,
70 CPL_RX_DDP_COMPLETE
= 0x29,
71 CPL_RX_PHYS_ADDR
= 0x2A,
73 CPL_RX_URG_NOTIFY
= 0x2C,
74 CPL_SET_TCB_RPL
= 0x2D,
75 CPL_SMT_WRITE_RPL
= 0x2E,
76 CPL_TX_DATA_ACK
= 0x2F,
78 CPL_ABORT_REQ_RSS
= 0x30,
79 CPL_ABORT_RPL_RSS
= 0x31,
80 CPL_CLOSE_CON_RPL
= 0x32,
82 CPL_L2T_READ_RPL
= 0x34,
84 CPL_RDMA_CQE_READ_RSP
= 0x36,
85 CPL_RDMA_CQE_ERR
= 0x37,
86 CPL_RTE_READ_RPL
= 0x38,
89 CPL_ACT_OPEN_RPL
= 0x40,
90 CPL_PASS_OPEN_RPL
= 0x41,
91 CPL_RX_DATA_DDP
= 0x42,
92 CPL_SMT_READ_RPL
= 0x43,
94 CPL_ACT_ESTABLISH
= 0x50,
95 CPL_PASS_ESTABLISH
= 0x51,
97 CPL_PASS_ACCEPT_REQ
= 0x70,
99 CPL_ASYNC_NOTIF
= 0x80, /* fake opcode for async notifications */
101 CPL_TX_DMA_ACK
= 0xA0,
102 CPL_RDMA_READ_REQ
= 0xA1,
103 CPL_RDMA_TERMINATE
= 0xA2,
104 CPL_TRACE_PKT
= 0xA3,
105 CPL_RDMA_EC_STATUS
= 0xA5,
107 NUM_CPL_CMDS
/* must be last and previous entries must be sorted */
112 CPL_ERR_TCAM_PARITY
= 1,
113 CPL_ERR_TCAM_FULL
= 3,
114 CPL_ERR_CONN_RESET
= 20,
115 CPL_ERR_CONN_EXIST
= 22,
116 CPL_ERR_ARP_MISS
= 23,
117 CPL_ERR_BAD_SYN
= 24,
118 CPL_ERR_CONN_TIMEDOUT
= 30,
119 CPL_ERR_XMIT_TIMEDOUT
= 31,
120 CPL_ERR_PERSIST_TIMEDOUT
= 32,
121 CPL_ERR_FINWAIT2_TIMEDOUT
= 33,
122 CPL_ERR_KEEPALIVE_TIMEDOUT
= 34,
123 CPL_ERR_RTX_NEG_ADVICE
= 35,
124 CPL_ERR_PERSIST_NEG_ADVICE
= 36,
125 CPL_ERR_ABORT_FAILED
= 42,
130 CPL_CONN_POLICY_AUTO
= 0,
131 CPL_CONN_POLICY_ASK
= 1,
132 CPL_CONN_POLICY_FILTER
= 2,
133 CPL_CONN_POLICY_DENY
= 3
138 ULP_MODE_TCP_DDP
= 1,
145 ULP_CRC_HEADER
= 1 << 0,
146 ULP_CRC_DATA
= 1 << 1
150 CPL_PASS_OPEN_ACCEPT
,
155 CPL_ABORT_SEND_RST
= 0,
157 CPL_ABORT_POST_CLOSE_REQ
= 2
160 enum { /* TX_PKT_LSO ethernet types */
167 enum { /* TCP congestion control algorithms */
174 enum { /* RSS hash type */
176 RSS_HASH_2_TUPLE
= 1 << 0,
177 RSS_HASH_4_TUPLE
= 1 << 1
186 #define V_OPCODE(x) ((x) << S_OPCODE)
187 #define G_OPCODE(x) (((x) >> S_OPCODE) & 0xFF)
188 #define G_TID(x) ((x) & 0xFFFFFF)
190 #define S_HASHTYPE 22
191 #define M_HASHTYPE 0x3
192 #define G_HASHTYPE(x) (((x) >> S_HASHTYPE) & M_HASHTYPE)
195 #define G_QNUM(x) (((x) >> S_QNUM) & 0xFFFF)
197 /* tid is assumed to be 24-bits */
198 #define MK_OPCODE_TID(opcode, tid) (V_OPCODE(opcode) | (tid))
200 #define OPCODE_TID(cmd) ((cmd)->ot.opcode_tid)
202 /* extract the TID from a CPL command */
203 #define GET_TID(cmd) (G_TID(ntohl(OPCODE_TID(cmd))))
208 #if defined(__LITTLE_ENDIAN_BITFIELD)
223 #if defined(__LITTLE_ENDIAN_BITFIELD)
235 struct work_request_hdr
{
241 #define S_WR_SGE_CREDITS 0
242 #define M_WR_SGE_CREDITS 0xFF
243 #define V_WR_SGE_CREDITS(x) ((x) << S_WR_SGE_CREDITS)
244 #define G_WR_SGE_CREDITS(x) (((x) >> S_WR_SGE_CREDITS) & M_WR_SGE_CREDITS)
246 #define S_WR_SGLSFLT 8
247 #define M_WR_SGLSFLT 0xFF
248 #define V_WR_SGLSFLT(x) ((x) << S_WR_SGLSFLT)
249 #define G_WR_SGLSFLT(x) (((x) >> S_WR_SGLSFLT) & M_WR_SGLSFLT)
251 #define S_WR_BCNTLFLT 16
252 #define M_WR_BCNTLFLT 0xF
253 #define V_WR_BCNTLFLT(x) ((x) << S_WR_BCNTLFLT)
254 #define G_WR_BCNTLFLT(x) (((x) >> S_WR_BCNTLFLT) & M_WR_BCNTLFLT)
256 /* Applicable to BYPASS WRs only: the uP will added a CPL_BARRIER before
257 * and after the BYPASS WR if the ATOMIC bit is set.
259 #define S_WR_ATOMIC 16
260 #define V_WR_ATOMIC(x) ((x) << S_WR_ATOMIC)
261 #define F_WR_ATOMIC V_WR_ATOMIC(1U)
263 /* Applicable to BYPASS WRs only: the uP will flush buffered non abort
266 #define S_WR_FLUSH 17
267 #define V_WR_FLUSH(x) ((x) << S_WR_FLUSH)
268 #define F_WR_FLUSH V_WR_FLUSH(1U)
270 #define S_WR_DATATYPE 20
271 #define V_WR_DATATYPE(x) ((x) << S_WR_DATATYPE)
272 #define F_WR_DATATYPE V_WR_DATATYPE(1U)
274 #define S_WR_COMPL 21
275 #define V_WR_COMPL(x) ((x) << S_WR_COMPL)
276 #define F_WR_COMPL V_WR_COMPL(1U)
279 #define V_WR_EOP(x) ((x) << S_WR_EOP)
280 #define F_WR_EOP V_WR_EOP(1U)
283 #define V_WR_SOP(x) ((x) << S_WR_SOP)
284 #define F_WR_SOP V_WR_SOP(1U)
288 #define V_WR_OP(x) ((x) << S_WR_OP)
289 #define G_WR_OP(x) (((x) >> S_WR_OP) & M_WR_OP)
293 #define M_WR_LEN 0xFF
294 #define V_WR_LEN(x) ((x) << S_WR_LEN)
295 #define G_WR_LEN(x) (((x) >> S_WR_LEN) & M_WR_LEN)
298 #define M_WR_TID 0xFFFFF
299 #define V_WR_TID(x) ((x) << S_WR_TID)
300 #define G_WR_TID(x) (((x) >> S_WR_TID) & M_WR_TID)
302 #define S_WR_CR_FLUSH 30
303 #define V_WR_CR_FLUSH(x) ((x) << S_WR_CR_FLUSH)
304 #define F_WR_CR_FLUSH V_WR_CR_FLUSH(1U)
307 #define V_WR_GEN(x) ((x) << S_WR_GEN)
308 #define F_WR_GEN V_WR_GEN(1U)
310 # define WR_HDR struct work_request_hdr wr
314 # define RSS_HDR struct rss_header rss_hdr;
317 /* option 0 lower-half fields */
318 #define S_CPL_STATUS 0
319 #define M_CPL_STATUS 0xFF
320 #define V_CPL_STATUS(x) ((x) << S_CPL_STATUS)
321 #define G_CPL_STATUS(x) (((x) >> S_CPL_STATUS) & M_CPL_STATUS)
323 #define S_INJECT_TIMER 6
324 #define V_INJECT_TIMER(x) ((x) << S_INJECT_TIMER)
325 #define F_INJECT_TIMER V_INJECT_TIMER(1U)
327 #define S_NO_OFFLOAD 7
328 #define V_NO_OFFLOAD(x) ((x) << S_NO_OFFLOAD)
329 #define F_NO_OFFLOAD V_NO_OFFLOAD(1U)
332 #define M_ULP_MODE 0xF
333 #define V_ULP_MODE(x) ((x) << S_ULP_MODE)
334 #define G_ULP_MODE(x) (((x) >> S_ULP_MODE) & M_ULP_MODE)
336 #define S_RCV_BUFSIZ 12
337 #define M_RCV_BUFSIZ 0x3FFF
338 #define V_RCV_BUFSIZ(x) ((x) << S_RCV_BUFSIZ)
339 #define G_RCV_BUFSIZ(x) (((x) >> S_RCV_BUFSIZ) & M_RCV_BUFSIZ)
343 #define V_TOS(x) ((x) << S_TOS)
344 #define G_TOS(x) (((x) >> S_TOS) & M_TOS)
346 /* option 0 upper-half fields */
348 #define V_DELACK(x) ((x) << S_DELACK)
349 #define F_DELACK V_DELACK(1U)
352 #define V_NO_CONG(x) ((x) << S_NO_CONG)
353 #define F_NO_CONG V_NO_CONG(1U)
355 #define S_SRC_MAC_SEL 2
356 #define M_SRC_MAC_SEL 0x3
357 #define V_SRC_MAC_SEL(x) ((x) << S_SRC_MAC_SEL)
358 #define G_SRC_MAC_SEL(x) (((x) >> S_SRC_MAC_SEL) & M_SRC_MAC_SEL)
361 #define M_L2T_IDX 0x7FF
362 #define V_L2T_IDX(x) ((x) << S_L2T_IDX)
363 #define G_L2T_IDX(x) (((x) >> S_L2T_IDX) & M_L2T_IDX)
365 #define S_TX_CHANNEL 15
366 #define V_TX_CHANNEL(x) ((x) << S_TX_CHANNEL)
367 #define F_TX_CHANNEL V_TX_CHANNEL(1U)
369 #define S_TCAM_BYPASS 16
370 #define V_TCAM_BYPASS(x) ((x) << S_TCAM_BYPASS)
371 #define F_TCAM_BYPASS V_TCAM_BYPASS(1U)
374 #define V_NAGLE(x) ((x) << S_NAGLE)
375 #define F_NAGLE V_NAGLE(1U)
377 #define S_WND_SCALE 18
378 #define M_WND_SCALE 0xF
379 #define V_WND_SCALE(x) ((x) << S_WND_SCALE)
380 #define G_WND_SCALE(x) (((x) >> S_WND_SCALE) & M_WND_SCALE)
382 #define S_KEEP_ALIVE 22
383 #define V_KEEP_ALIVE(x) ((x) << S_KEEP_ALIVE)
384 #define F_KEEP_ALIVE V_KEEP_ALIVE(1U)
386 #define S_MAX_RETRANS 23
387 #define M_MAX_RETRANS 0xF
388 #define V_MAX_RETRANS(x) ((x) << S_MAX_RETRANS)
389 #define G_MAX_RETRANS(x) (((x) >> S_MAX_RETRANS) & M_MAX_RETRANS)
391 #define S_MAX_RETRANS_OVERRIDE 27
392 #define V_MAX_RETRANS_OVERRIDE(x) ((x) << S_MAX_RETRANS_OVERRIDE)
393 #define F_MAX_RETRANS_OVERRIDE V_MAX_RETRANS_OVERRIDE(1U)
396 #define M_MSS_IDX 0xF
397 #define V_MSS_IDX(x) ((x) << S_MSS_IDX)
398 #define G_MSS_IDX(x) (((x) >> S_MSS_IDX) & M_MSS_IDX)
400 /* option 1 fields */
401 #define S_RSS_ENABLE 0
402 #define V_RSS_ENABLE(x) ((x) << S_RSS_ENABLE)
403 #define F_RSS_ENABLE V_RSS_ENABLE(1U)
405 #define S_RSS_MASK_LEN 1
406 #define M_RSS_MASK_LEN 0x7
407 #define V_RSS_MASK_LEN(x) ((x) << S_RSS_MASK_LEN)
408 #define G_RSS_MASK_LEN(x) (((x) >> S_RSS_MASK_LEN) & M_RSS_MASK_LEN)
411 #define M_CPU_IDX 0x3F
412 #define V_CPU_IDX(x) ((x) << S_CPU_IDX)
413 #define G_CPU_IDX(x) (((x) >> S_CPU_IDX) & M_CPU_IDX)
415 #define S_OPT1_VLAN 6
416 #define M_OPT1_VLAN 0xFFF
417 #define V_OPT1_VLAN(x) ((x) << S_OPT1_VLAN)
418 #define G_OPT1_VLAN(x) (((x) >> S_OPT1_VLAN) & M_OPT1_VLAN)
420 #define S_MAC_MATCH_VALID 18
421 #define V_MAC_MATCH_VALID(x) ((x) << S_MAC_MATCH_VALID)
422 #define F_MAC_MATCH_VALID V_MAC_MATCH_VALID(1U)
424 #define S_CONN_POLICY 19
425 #define M_CONN_POLICY 0x3
426 #define V_CONN_POLICY(x) ((x) << S_CONN_POLICY)
427 #define G_CONN_POLICY(x) (((x) >> S_CONN_POLICY) & M_CONN_POLICY)
429 #define S_SYN_DEFENSE 21
430 #define V_SYN_DEFENSE(x) ((x) << S_SYN_DEFENSE)
431 #define F_SYN_DEFENSE V_SYN_DEFENSE(1U)
433 #define S_VLAN_PRI 22
434 #define M_VLAN_PRI 0x3
435 #define V_VLAN_PRI(x) ((x) << S_VLAN_PRI)
436 #define G_VLAN_PRI(x) (((x) >> S_VLAN_PRI) & M_VLAN_PRI)
438 #define S_VLAN_PRI_VALID 24
439 #define V_VLAN_PRI_VALID(x) ((x) << S_VLAN_PRI_VALID)
440 #define F_VLAN_PRI_VALID V_VLAN_PRI_VALID(1U)
442 #define S_PKT_TYPE 25
443 #define M_PKT_TYPE 0x3
444 #define V_PKT_TYPE(x) ((x) << S_PKT_TYPE)
445 #define G_PKT_TYPE(x) (((x) >> S_PKT_TYPE) & M_PKT_TYPE)
447 #define S_MAC_MATCH 27
448 #define M_MAC_MATCH 0x1F
449 #define V_MAC_MATCH(x) ((x) << S_MAC_MATCH)
450 #define G_MAC_MATCH(x) (((x) >> S_MAC_MATCH) & M_MAC_MATCH)
452 /* option 2 fields */
453 #define S_CPU_INDEX 0
454 #define M_CPU_INDEX 0x7F
455 #define V_CPU_INDEX(x) ((x) << S_CPU_INDEX)
456 #define G_CPU_INDEX(x) (((x) >> S_CPU_INDEX) & M_CPU_INDEX)
458 #define S_CPU_INDEX_VALID 7
459 #define V_CPU_INDEX_VALID(x) ((x) << S_CPU_INDEX_VALID)
460 #define F_CPU_INDEX_VALID V_CPU_INDEX_VALID(1U)
462 #define S_RX_COALESCE 8
463 #define M_RX_COALESCE 0x3
464 #define V_RX_COALESCE(x) ((x) << S_RX_COALESCE)
465 #define G_RX_COALESCE(x) (((x) >> S_RX_COALESCE) & M_RX_COALESCE)
467 #define S_RX_COALESCE_VALID 10
468 #define V_RX_COALESCE_VALID(x) ((x) << S_RX_COALESCE_VALID)
469 #define F_RX_COALESCE_VALID V_RX_COALESCE_VALID(1U)
471 #define S_CONG_CONTROL_FLAVOR 11
472 #define M_CONG_CONTROL_FLAVOR 0x3
473 #define V_CONG_CONTROL_FLAVOR(x) ((x) << S_CONG_CONTROL_FLAVOR)
474 #define G_CONG_CONTROL_FLAVOR(x) (((x) >> S_CONG_CONTROL_FLAVOR) & M_CONG_CONTROL_FLAVOR)
476 #define S_PACING_FLAVOR 13
477 #define M_PACING_FLAVOR 0x3
478 #define V_PACING_FLAVOR(x) ((x) << S_PACING_FLAVOR)
479 #define G_PACING_FLAVOR(x) (((x) >> S_PACING_FLAVOR) & M_PACING_FLAVOR)
481 #define S_FLAVORS_VALID 15
482 #define V_FLAVORS_VALID(x) ((x) << S_FLAVORS_VALID)
483 #define F_FLAVORS_VALID V_FLAVORS_VALID(1U)
485 #define S_RX_FC_DISABLE 16
486 #define V_RX_FC_DISABLE(x) ((x) << S_RX_FC_DISABLE)
487 #define F_RX_FC_DISABLE V_RX_FC_DISABLE(1U)
489 #define S_RX_FC_VALID 17
490 #define V_RX_FC_VALID(x) ((x) << S_RX_FC_VALID)
491 #define F_RX_FC_VALID V_RX_FC_VALID(1U)
493 struct cpl_pass_open_req
{
506 struct cpl_pass_open_rpl
{
517 struct cpl_pass_establish
{
531 /* cpl_pass_establish.tos_tid fields */
532 #define S_PASS_OPEN_TID 0
533 #define M_PASS_OPEN_TID 0xFFFFFF
534 #define V_PASS_OPEN_TID(x) ((x) << S_PASS_OPEN_TID)
535 #define G_PASS_OPEN_TID(x) (((x) >> S_PASS_OPEN_TID) & M_PASS_OPEN_TID)
537 #define S_PASS_OPEN_TOS 24
538 #define M_PASS_OPEN_TOS 0xFF
539 #define V_PASS_OPEN_TOS(x) ((x) << S_PASS_OPEN_TOS)
540 #define G_PASS_OPEN_TOS(x) (((x) >> S_PASS_OPEN_TOS) & M_PASS_OPEN_TOS)
542 /* cpl_pass_establish.l2t_idx fields */
543 #define S_L2T_IDX16 5
544 #define M_L2T_IDX16 0x7FF
545 #define V_L2T_IDX16(x) ((x) << S_L2T_IDX16)
546 #define G_L2T_IDX16(x) (((x) >> S_L2T_IDX16) & M_L2T_IDX16)
548 /* cpl_pass_establish.tcp_opt fields (also applies act_open_establish) */
549 #define G_TCPOPT_WSCALE_OK(x) (((x) >> 5) & 1)
550 #define G_TCPOPT_SACK(x) (((x) >> 6) & 1)
551 #define G_TCPOPT_TSTAMP(x) (((x) >> 7) & 1)
552 #define G_TCPOPT_SND_WSCALE(x) (((x) >> 8) & 0xf)
553 #define G_TCPOPT_MSS(x) (((x) >> 12) & 0xf)
555 struct cpl_pass_accept_req
{
563 struct tcp_options tcp_options
;
567 #if defined(__LITTLE_ENDIAN_BITFIELD)
583 struct cpl_pass_accept_rpl
{
593 struct cpl_act_open_req
{
606 /* cpl_act_open_req.params fields */
607 #define S_AOPEN_VLAN_PRI 9
608 #define M_AOPEN_VLAN_PRI 0x3
609 #define V_AOPEN_VLAN_PRI(x) ((x) << S_AOPEN_VLAN_PRI)
610 #define G_AOPEN_VLAN_PRI(x) (((x) >> S_AOPEN_VLAN_PRI) & M_AOPEN_VLAN_PRI)
612 #define S_AOPEN_VLAN_PRI_VALID 11
613 #define V_AOPEN_VLAN_PRI_VALID(x) ((x) << S_AOPEN_VLAN_PRI_VALID)
614 #define F_AOPEN_VLAN_PRI_VALID V_AOPEN_VLAN_PRI_VALID(1U)
616 #define S_AOPEN_PKT_TYPE 12
617 #define M_AOPEN_PKT_TYPE 0x3
618 #define V_AOPEN_PKT_TYPE(x) ((x) << S_AOPEN_PKT_TYPE)
619 #define G_AOPEN_PKT_TYPE(x) (((x) >> S_AOPEN_PKT_TYPE) & M_AOPEN_PKT_TYPE)
621 #define S_AOPEN_MAC_MATCH 14
622 #define M_AOPEN_MAC_MATCH 0x1F
623 #define V_AOPEN_MAC_MATCH(x) ((x) << S_AOPEN_MAC_MATCH)
624 #define G_AOPEN_MAC_MATCH(x) (((x) >> S_AOPEN_MAC_MATCH) & M_AOPEN_MAC_MATCH)
626 #define S_AOPEN_MAC_MATCH_VALID 19
627 #define V_AOPEN_MAC_MATCH_VALID(x) ((x) << S_AOPEN_MAC_MATCH_VALID)
628 #define F_AOPEN_MAC_MATCH_VALID V_AOPEN_MAC_MATCH_VALID(1U)
630 #define S_AOPEN_IFF_VLAN 20
631 #define M_AOPEN_IFF_VLAN 0xFFF
632 #define V_AOPEN_IFF_VLAN(x) ((x) << S_AOPEN_IFF_VLAN)
633 #define G_AOPEN_IFF_VLAN(x) (((x) >> S_AOPEN_IFF_VLAN) & M_AOPEN_IFF_VLAN)
635 struct cpl_act_open_rpl
{
647 struct cpl_act_establish
{
668 struct cpl_get_tcb_rpl
{
684 /* cpl_set_tcb.reply fields */
686 #define V_NO_REPLY(x) ((x) << S_NO_REPLY)
687 #define F_NO_REPLY V_NO_REPLY(1U)
689 struct cpl_set_tcb_field
{
699 struct cpl_set_tcb_rpl
{
710 #if defined(__LITTLE_ENDIAN_BITFIELD)
724 struct cpl_pcmd_reply
{
732 struct cpl_close_con_req
{
738 struct cpl_close_con_rpl
{
747 struct cpl_close_listserv_req
{
755 struct cpl_close_listserv_rpl
{
762 struct cpl_abort_req_rss
{
771 struct cpl_abort_req
{
780 struct cpl_abort_rpl_rss
{
789 struct cpl_abort_rpl
{
798 struct cpl_peer_close
{
813 /* tx_data_wr.flags fields */
814 #define S_TX_ACK_PAGES 21
815 #define M_TX_ACK_PAGES 0x7
816 #define V_TX_ACK_PAGES(x) ((x) << S_TX_ACK_PAGES)
817 #define G_TX_ACK_PAGES(x) (((x) >> S_TX_ACK_PAGES) & M_TX_ACK_PAGES)
819 /* tx_data_wr.param fields */
821 #define M_TX_PORT 0x7
822 #define V_TX_PORT(x) ((x) << S_TX_PORT)
823 #define G_TX_PORT(x) (((x) >> S_TX_PORT) & M_TX_PORT)
827 #define V_TX_MSS(x) ((x) << S_TX_MSS)
828 #define G_TX_MSS(x) (((x) >> S_TX_MSS) & M_TX_MSS)
831 #define M_TX_QOS 0xFF
832 #define V_TX_QOS(x) ((x) << S_TX_QOS)
833 #define G_TX_QOS(x) (((x) >> S_TX_QOS) & M_TX_QOS)
835 #define S_TX_SNDBUF 16
836 #define M_TX_SNDBUF 0xFFFF
837 #define V_TX_SNDBUF(x) ((x) << S_TX_SNDBUF)
838 #define G_TX_SNDBUF(x) (((x) >> S_TX_SNDBUF) & M_TX_SNDBUF)
848 /* cpl_tx_data.flags fields */
849 #define S_TX_ULP_SUBMODE 6
850 #define M_TX_ULP_SUBMODE 0xF
851 #define V_TX_ULP_SUBMODE(x) ((x) << S_TX_ULP_SUBMODE)
852 #define G_TX_ULP_SUBMODE(x) (((x) >> S_TX_ULP_SUBMODE) & M_TX_ULP_SUBMODE)
854 #define S_TX_ULP_MODE 10
855 #define M_TX_ULP_MODE 0xF
856 #define V_TX_ULP_MODE(x) ((x) << S_TX_ULP_MODE)
857 #define G_TX_ULP_MODE(x) (((x) >> S_TX_ULP_MODE) & M_TX_ULP_MODE)
859 #define S_TX_SHOVE 14
860 #define V_TX_SHOVE(x) ((x) << S_TX_SHOVE)
861 #define F_TX_SHOVE V_TX_SHOVE(1U)
864 #define V_TX_MORE(x) ((x) << S_TX_MORE)
865 #define F_TX_MORE V_TX_MORE(1U)
867 /* additional tx_data_wr.flags fields */
868 #define S_TX_CPU_IDX 0
869 #define M_TX_CPU_IDX 0x3F
870 #define V_TX_CPU_IDX(x) ((x) << S_TX_CPU_IDX)
871 #define G_TX_CPU_IDX(x) (((x) >> S_TX_CPU_IDX) & M_TX_CPU_IDX)
874 #define V_TX_URG(x) ((x) << S_TX_URG)
875 #define F_TX_URG V_TX_URG(1U)
877 #define S_TX_CLOSE 17
878 #define V_TX_CLOSE(x) ((x) << S_TX_CLOSE)
879 #define F_TX_CLOSE V_TX_CLOSE(1U)
882 #define V_TX_INIT(x) ((x) << S_TX_INIT)
883 #define F_TX_INIT V_TX_INIT(1U)
885 #define S_TX_IMM_ACK 19
886 #define V_TX_IMM_ACK(x) ((x) << S_TX_IMM_ACK)
887 #define F_TX_IMM_ACK V_TX_IMM_ACK(1U)
889 #define S_TX_IMM_DMA 20
890 #define V_TX_IMM_DMA(x) ((x) << S_TX_IMM_DMA)
891 #define F_TX_IMM_DMA V_TX_IMM_DMA(1U)
893 struct cpl_tx_data_ack
{
908 struct cpl_rdma_ec_status
{
915 struct mngt_pktsched_wr
{
928 struct cpl_iscsi_hdr
{
939 /* cpl_iscsi_hdr.pdu_len_ddp fields */
940 #define S_ISCSI_PDU_LEN 0
941 #define M_ISCSI_PDU_LEN 0x7FFF
942 #define V_ISCSI_PDU_LEN(x) ((x) << S_ISCSI_PDU_LEN)
943 #define G_ISCSI_PDU_LEN(x) (((x) >> S_ISCSI_PDU_LEN) & M_ISCSI_PDU_LEN)
945 #define S_ISCSI_DDP 15
946 #define V_ISCSI_DDP(x) ((x) << S_ISCSI_DDP)
947 #define F_ISCSI_DDP V_ISCSI_DDP(1U)
956 #if defined(__LITTLE_ENDIAN_BITFIELD)
970 struct cpl_rx_data_ack
{
976 /* cpl_rx_data_ack.ack_seq fields */
977 #define S_RX_CREDITS 0
978 #define M_RX_CREDITS 0x7FFFFFF
979 #define V_RX_CREDITS(x) ((x) << S_RX_CREDITS)
980 #define G_RX_CREDITS(x) (((x) >> S_RX_CREDITS) & M_RX_CREDITS)
982 #define S_RX_MODULATE 27
983 #define V_RX_MODULATE(x) ((x) << S_RX_MODULATE)
984 #define F_RX_MODULATE V_RX_MODULATE(1U)
986 #define S_RX_FORCE_ACK 28
987 #define V_RX_FORCE_ACK(x) ((x) << S_RX_FORCE_ACK)
988 #define F_RX_FORCE_ACK V_RX_FORCE_ACK(1U)
990 #define S_RX_DACK_MODE 29
991 #define M_RX_DACK_MODE 0x3
992 #define V_RX_DACK_MODE(x) ((x) << S_RX_DACK_MODE)
993 #define G_RX_DACK_MODE(x) (((x) >> S_RX_DACK_MODE) & M_RX_DACK_MODE)
995 #define S_RX_DACK_CHANGE 31
996 #define V_RX_DACK_CHANGE(x) ((x) << S_RX_DACK_CHANGE)
997 #define F_RX_DACK_CHANGE V_RX_DACK_CHANGE(1U)
999 struct cpl_rx_urg_notify
{
1001 union opcode_tid ot
;
1005 struct cpl_rx_ddp_complete
{
1007 union opcode_tid ot
;
1011 struct cpl_rx_data_ddp
{
1013 union opcode_tid ot
;
1022 __be32 ddpvld_status
;
1025 /* cpl_rx_data_ddp.ddpvld_status fields */
1026 #define S_DDP_STATUS 0
1027 #define M_DDP_STATUS 0xFF
1028 #define V_DDP_STATUS(x) ((x) << S_DDP_STATUS)
1029 #define G_DDP_STATUS(x) (((x) >> S_DDP_STATUS) & M_DDP_STATUS)
1031 #define S_DDP_VALID 15
1032 #define M_DDP_VALID 0x1FFFF
1033 #define V_DDP_VALID(x) ((x) << S_DDP_VALID)
1034 #define G_DDP_VALID(x) (((x) >> S_DDP_VALID) & M_DDP_VALID)
1036 #define S_DDP_PPOD_MISMATCH 15
1037 #define V_DDP_PPOD_MISMATCH(x) ((x) << S_DDP_PPOD_MISMATCH)
1038 #define F_DDP_PPOD_MISMATCH V_DDP_PPOD_MISMATCH(1U)
1040 #define S_DDP_PDU 16
1041 #define V_DDP_PDU(x) ((x) << S_DDP_PDU)
1042 #define F_DDP_PDU V_DDP_PDU(1U)
1044 #define S_DDP_LLIMIT_ERR 17
1045 #define V_DDP_LLIMIT_ERR(x) ((x) << S_DDP_LLIMIT_ERR)
1046 #define F_DDP_LLIMIT_ERR V_DDP_LLIMIT_ERR(1U)
1048 #define S_DDP_PPOD_PARITY_ERR 18
1049 #define V_DDP_PPOD_PARITY_ERR(x) ((x) << S_DDP_PPOD_PARITY_ERR)
1050 #define F_DDP_PPOD_PARITY_ERR V_DDP_PPOD_PARITY_ERR(1U)
1052 #define S_DDP_PADDING_ERR 19
1053 #define V_DDP_PADDING_ERR(x) ((x) << S_DDP_PADDING_ERR)
1054 #define F_DDP_PADDING_ERR V_DDP_PADDING_ERR(1U)
1056 #define S_DDP_HDRCRC_ERR 20
1057 #define V_DDP_HDRCRC_ERR(x) ((x) << S_DDP_HDRCRC_ERR)
1058 #define F_DDP_HDRCRC_ERR V_DDP_HDRCRC_ERR(1U)
1060 #define S_DDP_DATACRC_ERR 21
1061 #define V_DDP_DATACRC_ERR(x) ((x) << S_DDP_DATACRC_ERR)
1062 #define F_DDP_DATACRC_ERR V_DDP_DATACRC_ERR(1U)
1064 #define S_DDP_INVALID_TAG 22
1065 #define V_DDP_INVALID_TAG(x) ((x) << S_DDP_INVALID_TAG)
1066 #define F_DDP_INVALID_TAG V_DDP_INVALID_TAG(1U)
1068 #define S_DDP_ULIMIT_ERR 23
1069 #define V_DDP_ULIMIT_ERR(x) ((x) << S_DDP_ULIMIT_ERR)
1070 #define F_DDP_ULIMIT_ERR V_DDP_ULIMIT_ERR(1U)
1072 #define S_DDP_OFFSET_ERR 24
1073 #define V_DDP_OFFSET_ERR(x) ((x) << S_DDP_OFFSET_ERR)
1074 #define F_DDP_OFFSET_ERR V_DDP_OFFSET_ERR(1U)
1076 #define S_DDP_COLOR_ERR 25
1077 #define V_DDP_COLOR_ERR(x) ((x) << S_DDP_COLOR_ERR)
1078 #define F_DDP_COLOR_ERR V_DDP_COLOR_ERR(1U)
1080 #define S_DDP_TID_MISMATCH 26
1081 #define V_DDP_TID_MISMATCH(x) ((x) << S_DDP_TID_MISMATCH)
1082 #define F_DDP_TID_MISMATCH V_DDP_TID_MISMATCH(1U)
1084 #define S_DDP_INVALID_PPOD 27
1085 #define V_DDP_INVALID_PPOD(x) ((x) << S_DDP_INVALID_PPOD)
1086 #define F_DDP_INVALID_PPOD V_DDP_INVALID_PPOD(1U)
1088 #define S_DDP_ULP_MODE 28
1089 #define M_DDP_ULP_MODE 0xF
1090 #define V_DDP_ULP_MODE(x) ((x) << S_DDP_ULP_MODE)
1091 #define G_DDP_ULP_MODE(x) (((x) >> S_DDP_ULP_MODE) & M_DDP_ULP_MODE)
1093 /* cpl_rx_data_ddp.ddp_report fields */
1094 #define S_DDP_OFFSET 0
1095 #define M_DDP_OFFSET 0x3FFFFF
1096 #define V_DDP_OFFSET(x) ((x) << S_DDP_OFFSET)
1097 #define G_DDP_OFFSET(x) (((x) >> S_DDP_OFFSET) & M_DDP_OFFSET)
1099 #define S_DDP_URG 24
1100 #define V_DDP_URG(x) ((x) << S_DDP_URG)
1101 #define F_DDP_URG V_DDP_URG(1U)
1103 #define S_DDP_PSH 25
1104 #define V_DDP_PSH(x) ((x) << S_DDP_PSH)
1105 #define F_DDP_PSH V_DDP_PSH(1U)
1107 #define S_DDP_BUF_COMPLETE 26
1108 #define V_DDP_BUF_COMPLETE(x) ((x) << S_DDP_BUF_COMPLETE)
1109 #define F_DDP_BUF_COMPLETE V_DDP_BUF_COMPLETE(1U)
1111 #define S_DDP_BUF_TIMED_OUT 27
1112 #define V_DDP_BUF_TIMED_OUT(x) ((x) << S_DDP_BUF_TIMED_OUT)
1113 #define F_DDP_BUF_TIMED_OUT V_DDP_BUF_TIMED_OUT(1U)
1115 #define S_DDP_BUF_IDX 28
1116 #define V_DDP_BUF_IDX(x) ((x) << S_DDP_BUF_IDX)
1117 #define F_DDP_BUF_IDX V_DDP_BUF_IDX(1U)
1125 struct cpl_tx_pkt_lso
{
1134 /* cpl_tx_pkt*.cntrl fields */
1135 #define S_TXPKT_VLAN 0
1136 #define M_TXPKT_VLAN 0xFFFF
1137 #define V_TXPKT_VLAN(x) ((x) << S_TXPKT_VLAN)
1138 #define G_TXPKT_VLAN(x) (((x) >> S_TXPKT_VLAN) & M_TXPKT_VLAN)
1140 #define S_TXPKT_INTF 16
1141 #define M_TXPKT_INTF 0xF
1142 #define V_TXPKT_INTF(x) ((x) << S_TXPKT_INTF)
1143 #define G_TXPKT_INTF(x) (((x) >> S_TXPKT_INTF) & M_TXPKT_INTF)
1145 #define S_TXPKT_IPCSUM_DIS 20
1146 #define V_TXPKT_IPCSUM_DIS(x) ((x) << S_TXPKT_IPCSUM_DIS)
1147 #define F_TXPKT_IPCSUM_DIS V_TXPKT_IPCSUM_DIS(1U)
1149 #define S_TXPKT_L4CSUM_DIS 21
1150 #define V_TXPKT_L4CSUM_DIS(x) ((x) << S_TXPKT_L4CSUM_DIS)
1151 #define F_TXPKT_L4CSUM_DIS V_TXPKT_L4CSUM_DIS(1U)
1153 #define S_TXPKT_VLAN_VLD 22
1154 #define V_TXPKT_VLAN_VLD(x) ((x) << S_TXPKT_VLAN_VLD)
1155 #define F_TXPKT_VLAN_VLD V_TXPKT_VLAN_VLD(1U)
1157 #define S_TXPKT_LOOPBACK 23
1158 #define V_TXPKT_LOOPBACK(x) ((x) << S_TXPKT_LOOPBACK)
1159 #define F_TXPKT_LOOPBACK V_TXPKT_LOOPBACK(1U)
1161 #define S_TXPKT_OPCODE 24
1162 #define M_TXPKT_OPCODE 0xFF
1163 #define V_TXPKT_OPCODE(x) ((x) << S_TXPKT_OPCODE)
1164 #define G_TXPKT_OPCODE(x) (((x) >> S_TXPKT_OPCODE) & M_TXPKT_OPCODE)
1166 /* cpl_tx_pkt_lso.lso_info fields */
1168 #define M_LSO_MSS 0x3FFF
1169 #define V_LSO_MSS(x) ((x) << S_LSO_MSS)
1170 #define G_LSO_MSS(x) (((x) >> S_LSO_MSS) & M_LSO_MSS)
1172 #define S_LSO_ETH_TYPE 14
1173 #define M_LSO_ETH_TYPE 0x3
1174 #define V_LSO_ETH_TYPE(x) ((x) << S_LSO_ETH_TYPE)
1175 #define G_LSO_ETH_TYPE(x) (((x) >> S_LSO_ETH_TYPE) & M_LSO_ETH_TYPE)
1177 #define S_LSO_TCPHDR_WORDS 16
1178 #define M_LSO_TCPHDR_WORDS 0xF
1179 #define V_LSO_TCPHDR_WORDS(x) ((x) << S_LSO_TCPHDR_WORDS)
1180 #define G_LSO_TCPHDR_WORDS(x) (((x) >> S_LSO_TCPHDR_WORDS) & M_LSO_TCPHDR_WORDS)
1182 #define S_LSO_IPHDR_WORDS 20
1183 #define M_LSO_IPHDR_WORDS 0xF
1184 #define V_LSO_IPHDR_WORDS(x) ((x) << S_LSO_IPHDR_WORDS)
1185 #define G_LSO_IPHDR_WORDS(x) (((x) >> S_LSO_IPHDR_WORDS) & M_LSO_IPHDR_WORDS)
1187 #define S_LSO_IPV6 24
1188 #define V_LSO_IPV6(x) ((x) << S_LSO_IPV6)
1189 #define F_LSO_IPV6 V_LSO_IPV6(1U)
1191 struct cpl_trace_pkt
{
1194 #if defined(__LITTLE_ENDIAN_BITFIELD)
1202 #if defined(__LITTLE_ENDIAN_BITFIELD)
1210 #endif /* CHELSIO_FW */
1213 #if defined(__LITTLE_ENDIAN_BITFIELD)
1227 #if defined(__LITTLE_ENDIAN_BITFIELD)
1245 struct cpl_l2t_write_req
{
1247 union opcode_tid ot
;
1253 /* cpl_l2t_write_req.params fields */
1254 #define S_L2T_W_IDX 0
1255 #define M_L2T_W_IDX 0x7FF
1256 #define V_L2T_W_IDX(x) ((x) << S_L2T_W_IDX)
1257 #define G_L2T_W_IDX(x) (((x) >> S_L2T_W_IDX) & M_L2T_W_IDX)
1259 #define S_L2T_W_VLAN 11
1260 #define M_L2T_W_VLAN 0xFFF
1261 #define V_L2T_W_VLAN(x) ((x) << S_L2T_W_VLAN)
1262 #define G_L2T_W_VLAN(x) (((x) >> S_L2T_W_VLAN) & M_L2T_W_VLAN)
1264 #define S_L2T_W_IFF 23
1265 #define M_L2T_W_IFF 0xF
1266 #define V_L2T_W_IFF(x) ((x) << S_L2T_W_IFF)
1267 #define G_L2T_W_IFF(x) (((x) >> S_L2T_W_IFF) & M_L2T_W_IFF)
1269 #define S_L2T_W_PRIO 27
1270 #define M_L2T_W_PRIO 0x7
1271 #define V_L2T_W_PRIO(x) ((x) << S_L2T_W_PRIO)
1272 #define G_L2T_W_PRIO(x) (((x) >> S_L2T_W_PRIO) & M_L2T_W_PRIO)
1274 struct cpl_l2t_write_rpl
{
1276 union opcode_tid ot
;
1281 struct cpl_l2t_read_req
{
1283 union opcode_tid ot
;
1288 struct cpl_l2t_read_rpl
{
1290 union opcode_tid ot
;
1296 /* cpl_l2t_read_rpl.params fields */
1297 #define S_L2T_R_PRIO 0
1298 #define M_L2T_R_PRIO 0x7
1299 #define V_L2T_R_PRIO(x) ((x) << S_L2T_R_PRIO)
1300 #define G_L2T_R_PRIO(x) (((x) >> S_L2T_R_PRIO) & M_L2T_R_PRIO)
1302 #define S_L2T_R_VLAN 8
1303 #define M_L2T_R_VLAN 0xFFF
1304 #define V_L2T_R_VLAN(x) ((x) << S_L2T_R_VLAN)
1305 #define G_L2T_R_VLAN(x) (((x) >> S_L2T_R_VLAN) & M_L2T_R_VLAN)
1307 #define S_L2T_R_IFF 20
1308 #define M_L2T_R_IFF 0xF
1309 #define V_L2T_R_IFF(x) ((x) << S_L2T_R_IFF)
1310 #define G_L2T_R_IFF(x) (((x) >> S_L2T_R_IFF) & M_L2T_R_IFF)
1312 #define S_L2T_STATUS 24
1313 #define M_L2T_STATUS 0xFF
1314 #define V_L2T_STATUS(x) ((x) << S_L2T_STATUS)
1315 #define G_L2T_STATUS(x) (((x) >> S_L2T_STATUS) & M_L2T_STATUS)
1317 struct cpl_smt_write_req
{
1319 union opcode_tid ot
;
1321 #if defined(__LITTLE_ENDIAN_BITFIELD)
1335 struct cpl_smt_write_rpl
{
1337 union opcode_tid ot
;
1342 struct cpl_smt_read_req
{
1344 union opcode_tid ot
;
1346 #if defined(__LITTLE_ENDIAN_BITFIELD)
1356 struct cpl_smt_read_rpl
{
1358 union opcode_tid ot
;
1360 #if defined(__LITTLE_ENDIAN_BITFIELD)
1374 struct cpl_rte_delete_req
{
1376 union opcode_tid ot
;
1380 /* { cpl_rte_delete_req, cpl_rte_read_req }.params fields */
1381 #define S_RTE_REQ_LUT_IX 8
1382 #define M_RTE_REQ_LUT_IX 0x7FF
1383 #define V_RTE_REQ_LUT_IX(x) ((x) << S_RTE_REQ_LUT_IX)
1384 #define G_RTE_REQ_LUT_IX(x) (((x) >> S_RTE_REQ_LUT_IX) & M_RTE_REQ_LUT_IX)
1386 #define S_RTE_REQ_LUT_BASE 19
1387 #define M_RTE_REQ_LUT_BASE 0x7FF
1388 #define V_RTE_REQ_LUT_BASE(x) ((x) << S_RTE_REQ_LUT_BASE)
1389 #define G_RTE_REQ_LUT_BASE(x) (((x) >> S_RTE_REQ_LUT_BASE) & M_RTE_REQ_LUT_BASE)
1391 #define S_RTE_READ_REQ_SELECT 31
1392 #define V_RTE_READ_REQ_SELECT(x) ((x) << S_RTE_READ_REQ_SELECT)
1393 #define F_RTE_READ_REQ_SELECT V_RTE_READ_REQ_SELECT(1U)
1395 struct cpl_rte_delete_rpl
{
1397 union opcode_tid ot
;
1402 struct cpl_rte_write_req
{
1404 union opcode_tid ot
;
1405 #if defined(__LITTLE_ENDIAN_BITFIELD)
1408 __u8 write_l2t_lut
:1;
1410 __u8 write_l2t_lut
:1;
1422 /* cpl_rte_write_req.lut_params fields */
1423 #define S_RTE_WRITE_REQ_LUT_IX 10
1424 #define M_RTE_WRITE_REQ_LUT_IX 0x7FF
1425 #define V_RTE_WRITE_REQ_LUT_IX(x) ((x) << S_RTE_WRITE_REQ_LUT_IX)
1426 #define G_RTE_WRITE_REQ_LUT_IX(x) (((x) >> S_RTE_WRITE_REQ_LUT_IX) & M_RTE_WRITE_REQ_LUT_IX)
1428 #define S_RTE_WRITE_REQ_LUT_BASE 21
1429 #define M_RTE_WRITE_REQ_LUT_BASE 0x7FF
1430 #define V_RTE_WRITE_REQ_LUT_BASE(x) ((x) << S_RTE_WRITE_REQ_LUT_BASE)
1431 #define G_RTE_WRITE_REQ_LUT_BASE(x) (((x) >> S_RTE_WRITE_REQ_LUT_BASE) & M_RTE_WRITE_REQ_LUT_BASE)
1433 struct cpl_rte_write_rpl
{
1435 union opcode_tid ot
;
1440 struct cpl_rte_read_req
{
1442 union opcode_tid ot
;
1446 struct cpl_rte_read_rpl
{
1448 union opcode_tid ot
;
1452 #if defined(__LITTLE_ENDIAN_BITFIELD)
1463 struct cpl_tid_release
{
1465 union opcode_tid ot
;
1469 struct cpl_barrier
{
1475 struct cpl_rdma_read_req
{
1480 struct cpl_rdma_terminate
{
1484 #if defined(__LITTLE_ENDIAN_BITFIELD)
1498 /* cpl_rdma_terminate.tid_len fields */
1499 #define S_FLIT_CNT 0
1500 #define M_FLIT_CNT 0xFF
1501 #define V_FLIT_CNT(x) ((x) << S_FLIT_CNT)
1502 #define G_FLIT_CNT(x) (((x) >> S_FLIT_CNT) & M_FLIT_CNT)
1504 #define S_TERM_TID 8
1505 #define M_TERM_TID 0xFFFFF
1506 #define V_TERM_TID(x) ((x) << S_TERM_TID)
1507 #define G_TERM_TID(x) (((x) >> S_TERM_TID) & M_TERM_TID)
1509 /* ULP_TX opcodes */
1510 enum { ULP_MEM_READ
= 2, ULP_MEM_WRITE
= 3, ULP_TXPKT
= 4 };
1512 #define S_ULPTX_CMD 28
1513 #define M_ULPTX_CMD 0xF
1514 #define V_ULPTX_CMD(x) ((x) << S_ULPTX_CMD)
1516 #define S_ULPTX_NFLITS 0
1517 #define M_ULPTX_NFLITS 0xFF
1518 #define V_ULPTX_NFLITS(x) ((x) << S_ULPTX_NFLITS)
1522 __be32 cmd_lock_addr
;
1526 /* ulp_mem_io.cmd_lock_addr fields */
1527 #define S_ULP_MEMIO_ADDR 0
1528 #define M_ULP_MEMIO_ADDR 0x7FFFFFF
1529 #define V_ULP_MEMIO_ADDR(x) ((x) << S_ULP_MEMIO_ADDR)
1531 #define S_ULP_MEMIO_LOCK 27
1532 #define V_ULP_MEMIO_LOCK(x) ((x) << S_ULP_MEMIO_LOCK)
1533 #define F_ULP_MEMIO_LOCK V_ULP_MEMIO_LOCK(1U)
1535 /* ulp_mem_io.len fields */
1536 #define S_ULP_MEMIO_DATA_LEN 28
1537 #define M_ULP_MEMIO_DATA_LEN 0xF
1538 #define V_ULP_MEMIO_DATA_LEN(x) ((x) << S_ULP_MEMIO_DATA_LEN)
1545 /* ulp_txpkt.cmd_dest fields */
1546 #define S_ULP_TXPKT_DEST 24
1547 #define M_ULP_TXPKT_DEST 0xF
1548 #define V_ULP_TXPKT_DEST(x) ((x) << S_ULP_TXPKT_DEST)
1550 #endif /* T3_CPL_H */