20 #ifndef _CQ_ENET_DESC_H_
21 #define _CQ_ENET_DESC_H_
36 cq_desc_dec((
struct cq_desc *)desc, type,
37 color, q_number, completed_index);
52 #define CQ_ENET_RQ_DESC_FLAGS_INGRESS_PORT (0x1 << 12)
53 #define CQ_ENET_RQ_DESC_FLAGS_FCOE (0x1 << 13)
54 #define CQ_ENET_RQ_DESC_FLAGS_EOP (0x1 << 14)
55 #define CQ_ENET_RQ_DESC_FLAGS_SOP (0x1 << 15)
57 #define CQ_ENET_RQ_DESC_RSS_TYPE_BITS 4
58 #define CQ_ENET_RQ_DESC_RSS_TYPE_MASK \
59 ((1 << CQ_ENET_RQ_DESC_RSS_TYPE_BITS) - 1)
60 #define CQ_ENET_RQ_DESC_RSS_TYPE_NONE 0
61 #define CQ_ENET_RQ_DESC_RSS_TYPE_IPv4 1
62 #define CQ_ENET_RQ_DESC_RSS_TYPE_TCP_IPv4 2
63 #define CQ_ENET_RQ_DESC_RSS_TYPE_IPv6 3
64 #define CQ_ENET_RQ_DESC_RSS_TYPE_TCP_IPv6 4
65 #define CQ_ENET_RQ_DESC_RSS_TYPE_IPv6_EX 5
66 #define CQ_ENET_RQ_DESC_RSS_TYPE_TCP_IPv6_EX 6
68 #define CQ_ENET_RQ_DESC_FLAGS_CSUM_NOT_CALC (0x1 << 14)
70 #define CQ_ENET_RQ_DESC_BYTES_WRITTEN_BITS 14
71 #define CQ_ENET_RQ_DESC_BYTES_WRITTEN_MASK \
72 ((1 << CQ_ENET_RQ_DESC_BYTES_WRITTEN_BITS) - 1)
73 #define CQ_ENET_RQ_DESC_FLAGS_TRUNCATED (0x1 << 14)
74 #define CQ_ENET_RQ_DESC_FLAGS_VLAN_STRIPPED (0x1 << 15)
76 #define CQ_ENET_RQ_DESC_VLAN_TCI_VLAN_BITS 12
77 #define CQ_ENET_RQ_DESC_VLAN_TCI_VLAN_MASK \
78 ((1 << CQ_ENET_RQ_DESC_VLAN_TCI_VLAN_BITS) - 1)
79 #define CQ_ENET_RQ_DESC_VLAN_TCI_CFI_MASK (0x1 << 12)
80 #define CQ_ENET_RQ_DESC_VLAN_TCI_USER_PRIO_BITS 3
81 #define CQ_ENET_RQ_DESC_VLAN_TCI_USER_PRIO_MASK \
82 ((1 << CQ_ENET_RQ_DESC_VLAN_TCI_USER_PRIO_BITS) - 1)
83 #define CQ_ENET_RQ_DESC_VLAN_TCI_USER_PRIO_SHIFT 13
85 #define CQ_ENET_RQ_DESC_FCOE_SOF_BITS 8
86 #define CQ_ENET_RQ_DESC_FCOE_SOF_MASK \
87 ((1 << CQ_ENET_RQ_DESC_FCOE_SOF_BITS) - 1)
88 #define CQ_ENET_RQ_DESC_FCOE_EOF_BITS 8
89 #define CQ_ENET_RQ_DESC_FCOE_EOF_MASK \
90 ((1 << CQ_ENET_RQ_DESC_FCOE_EOF_BITS) - 1)
91 #define CQ_ENET_RQ_DESC_FCOE_EOF_SHIFT 8
93 #define CQ_ENET_RQ_DESC_FLAGS_TCP_UDP_CSUM_OK (0x1 << 0)
94 #define CQ_ENET_RQ_DESC_FCOE_FC_CRC_OK (0x1 << 0)
95 #define CQ_ENET_RQ_DESC_FLAGS_UDP (0x1 << 1)
96 #define CQ_ENET_RQ_DESC_FCOE_ENC_ERROR (0x1 << 1)
97 #define CQ_ENET_RQ_DESC_FLAGS_TCP (0x1 << 2)
98 #define CQ_ENET_RQ_DESC_FLAGS_IPV4_CSUM_OK (0x1 << 3)
99 #define CQ_ENET_RQ_DESC_FLAGS_IPV6 (0x1 << 4)
100 #define CQ_ENET_RQ_DESC_FLAGS_IPV4 (0x1 << 5)
101 #define CQ_ENET_RQ_DESC_FLAGS_IPV4_FRAGMENT (0x1 << 6)
102 #define CQ_ENET_RQ_DESC_FLAGS_FCS_OK (0x1 << 7)
106 u8 *ingress_port,
u8 *fcoe,
u8 *eop,
u8 *sop,
u8 *rss_type,
107 u8 *csum_not_calc,
u32 *rss_hash,
u16 *bytes_written,
u8 *packet_error,
110 u8 *tcp_udp_csum_ok,
u8 *udp,
u8 *tcp,
u8 *ipv4_csum_ok,
111 u8 *ipv6,
u8 *ipv4,
u8 *ipv4_fragment,
u8 *fcs_ok)
113 u16 completed_index_flags;
114 u16 q_number_rss_type_flags;
115 u16 bytes_written_flags;
117 cq_desc_dec((
struct cq_desc *)desc, type,
118 color, q_number, completed_index);
121 q_number_rss_type_flags =
125 *ingress_port = (completed_index_flags &
136 *csum_not_calc = (q_number_rss_type_flags &
141 *bytes_written = bytes_written_flags &
143 *packet_error = (bytes_written_flags &
145 *vlan_stripped = (bytes_written_flags &
156 *fcoe_fc_crc_ok = (desc->
flags &
158 *fcoe_enc_error = (desc->
flags &