18 #ifndef _CQ_ENET_DESC_H_
19 #define _CQ_ENET_DESC_H_
34 cq_desc_dec((
struct cq_desc *)desc, type,
35 color, q_number, completed_index);
50 #define CQ_ENET_RQ_DESC_FLAGS_INGRESS_PORT (0x1 << 12)
51 #define CQ_ENET_RQ_DESC_FLAGS_FCOE (0x1 << 13)
52 #define CQ_ENET_RQ_DESC_FLAGS_EOP (0x1 << 14)
53 #define CQ_ENET_RQ_DESC_FLAGS_SOP (0x1 << 15)
55 #define CQ_ENET_RQ_DESC_RSS_TYPE_BITS 4
56 #define CQ_ENET_RQ_DESC_RSS_TYPE_MASK \
57 ((1 << CQ_ENET_RQ_DESC_RSS_TYPE_BITS) - 1)
58 #define CQ_ENET_RQ_DESC_RSS_TYPE_NONE 0
59 #define CQ_ENET_RQ_DESC_RSS_TYPE_IPv4 1
60 #define CQ_ENET_RQ_DESC_RSS_TYPE_TCP_IPv4 2
61 #define CQ_ENET_RQ_DESC_RSS_TYPE_IPv6 3
62 #define CQ_ENET_RQ_DESC_RSS_TYPE_TCP_IPv6 4
63 #define CQ_ENET_RQ_DESC_RSS_TYPE_IPv6_EX 5
64 #define CQ_ENET_RQ_DESC_RSS_TYPE_TCP_IPv6_EX 6
66 #define CQ_ENET_RQ_DESC_FLAGS_CSUM_NOT_CALC (0x1 << 14)
68 #define CQ_ENET_RQ_DESC_BYTES_WRITTEN_BITS 14
69 #define CQ_ENET_RQ_DESC_BYTES_WRITTEN_MASK \
70 ((1 << CQ_ENET_RQ_DESC_BYTES_WRITTEN_BITS) - 1)
71 #define CQ_ENET_RQ_DESC_FLAGS_TRUNCATED (0x1 << 14)
72 #define CQ_ENET_RQ_DESC_FLAGS_VLAN_STRIPPED (0x1 << 15)
74 #define CQ_ENET_RQ_DESC_FCOE_SOF_BITS 4
75 #define CQ_ENET_RQ_DESC_FCOE_SOF_MASK \
76 ((1 << CQ_ENET_RQ_DESC_FCOE_SOF_BITS) - 1)
77 #define CQ_ENET_RQ_DESC_FCOE_EOF_BITS 8
78 #define CQ_ENET_RQ_DESC_FCOE_EOF_MASK \
79 ((1 << CQ_ENET_RQ_DESC_FCOE_EOF_BITS) - 1)
80 #define CQ_ENET_RQ_DESC_FCOE_EOF_SHIFT 8
82 #define CQ_ENET_RQ_DESC_FLAGS_TCP_UDP_CSUM_OK (0x1 << 0)
83 #define CQ_ENET_RQ_DESC_FCOE_FC_CRC_OK (0x1 << 0)
84 #define CQ_ENET_RQ_DESC_FLAGS_UDP (0x1 << 1)
85 #define CQ_ENET_RQ_DESC_FCOE_ENC_ERROR (0x1 << 1)
86 #define CQ_ENET_RQ_DESC_FLAGS_TCP (0x1 << 2)
87 #define CQ_ENET_RQ_DESC_FLAGS_IPV4_CSUM_OK (0x1 << 3)
88 #define CQ_ENET_RQ_DESC_FLAGS_IPV6 (0x1 << 4)
89 #define CQ_ENET_RQ_DESC_FLAGS_IPV4 (0x1 << 5)
90 #define CQ_ENET_RQ_DESC_FLAGS_IPV4_FRAGMENT (0x1 << 6)
91 #define CQ_ENET_RQ_DESC_FLAGS_FCS_OK (0x1 << 7)
94 u8 *type,
u8 *color,
u16 *q_number,
u16 *completed_index,
95 u8 *ingress_port,
u8 *fcoe,
u8 *eop,
u8 *sop,
u8 *rss_type,
96 u8 *csum_not_calc,
u32 *rss_hash,
u16 *bytes_written,
u8 *packet_error,
99 u8 *tcp_udp_csum_ok,
u8 *udp,
u8 *tcp,
u8 *ipv4_csum_ok,
100 u8 *ipv6,
u8 *ipv4,
u8 *ipv4_fragment,
u8 *fcs_ok)
103 u16 q_number_rss_type_flags =
107 cq_desc_dec((
struct cq_desc *)desc, type,
108 color, q_number, completed_index);
110 *ingress_port = (completed_index_flags &
121 *csum_not_calc = (q_number_rss_type_flags &
126 *bytes_written = bytes_written_flags &
128 *packet_error = (bytes_written_flags &
130 *vlan_stripped = (bytes_written_flags &
138 *fcoe_fc_crc_ok = (desc->
flags &
140 *fcoe_enc_error = (desc->
flags &