18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * This file contains HW queue descriptor formats, config register
48c2ecf20Sopenharmony_ci * structures etc
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * Copyright (C) 2015 Cavium, Inc.
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifndef Q_STRUCT_H
108c2ecf20Sopenharmony_ci#define Q_STRUCT_H
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci/* Load transaction types for reading segment bytes specified by
138c2ecf20Sopenharmony_ci * NIC_SEND_GATHER_S[LD_TYPE].
148c2ecf20Sopenharmony_ci */
158c2ecf20Sopenharmony_cienum nic_send_ld_type_e {
168c2ecf20Sopenharmony_ci	NIC_SEND_LD_TYPE_E_LDD = 0x0,
178c2ecf20Sopenharmony_ci	NIC_SEND_LD_TYPE_E_LDT = 0x1,
188c2ecf20Sopenharmony_ci	NIC_SEND_LD_TYPE_E_LDWB = 0x2,
198c2ecf20Sopenharmony_ci	NIC_SEND_LD_TYPE_E_ENUM_LAST = 0x3,
208c2ecf20Sopenharmony_ci};
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_cienum ether_type_algorithm {
238c2ecf20Sopenharmony_ci	ETYPE_ALG_NONE = 0x0,
248c2ecf20Sopenharmony_ci	ETYPE_ALG_SKIP = 0x1,
258c2ecf20Sopenharmony_ci	ETYPE_ALG_ENDPARSE = 0x2,
268c2ecf20Sopenharmony_ci	ETYPE_ALG_VLAN = 0x3,
278c2ecf20Sopenharmony_ci	ETYPE_ALG_VLAN_STRIP = 0x4,
288c2ecf20Sopenharmony_ci};
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_cienum layer3_type {
318c2ecf20Sopenharmony_ci	L3TYPE_NONE = 0x00,
328c2ecf20Sopenharmony_ci	L3TYPE_GRH = 0x01,
338c2ecf20Sopenharmony_ci	L3TYPE_IPV4 = 0x04,
348c2ecf20Sopenharmony_ci	L3TYPE_IPV4_OPTIONS = 0x05,
358c2ecf20Sopenharmony_ci	L3TYPE_IPV6 = 0x06,
368c2ecf20Sopenharmony_ci	L3TYPE_IPV6_OPTIONS = 0x07,
378c2ecf20Sopenharmony_ci	L3TYPE_ET_STOP = 0x0D,
388c2ecf20Sopenharmony_ci	L3TYPE_OTHER = 0x0E,
398c2ecf20Sopenharmony_ci};
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_cienum layer4_type {
428c2ecf20Sopenharmony_ci	L4TYPE_NONE = 0x00,
438c2ecf20Sopenharmony_ci	L4TYPE_IPSEC_ESP = 0x01,
448c2ecf20Sopenharmony_ci	L4TYPE_IPFRAG = 0x02,
458c2ecf20Sopenharmony_ci	L4TYPE_IPCOMP = 0x03,
468c2ecf20Sopenharmony_ci	L4TYPE_TCP = 0x04,
478c2ecf20Sopenharmony_ci	L4TYPE_UDP = 0x05,
488c2ecf20Sopenharmony_ci	L4TYPE_SCTP = 0x06,
498c2ecf20Sopenharmony_ci	L4TYPE_GRE = 0x07,
508c2ecf20Sopenharmony_ci	L4TYPE_ROCE_BTH = 0x08,
518c2ecf20Sopenharmony_ci	L4TYPE_OTHER = 0x0E,
528c2ecf20Sopenharmony_ci};
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci/* CPI and RSSI configuration */
558c2ecf20Sopenharmony_cienum cpi_algorithm_type {
568c2ecf20Sopenharmony_ci	CPI_ALG_NONE = 0x0,
578c2ecf20Sopenharmony_ci	CPI_ALG_VLAN = 0x1,
588c2ecf20Sopenharmony_ci	CPI_ALG_VLAN16 = 0x2,
598c2ecf20Sopenharmony_ci	CPI_ALG_DIFF = 0x3,
608c2ecf20Sopenharmony_ci};
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_cienum rss_algorithm_type {
638c2ecf20Sopenharmony_ci	RSS_ALG_NONE = 0x00,
648c2ecf20Sopenharmony_ci	RSS_ALG_PORT = 0x01,
658c2ecf20Sopenharmony_ci	RSS_ALG_IP = 0x02,
668c2ecf20Sopenharmony_ci	RSS_ALG_TCP_IP = 0x03,
678c2ecf20Sopenharmony_ci	RSS_ALG_UDP_IP = 0x04,
688c2ecf20Sopenharmony_ci	RSS_ALG_SCTP_IP = 0x05,
698c2ecf20Sopenharmony_ci	RSS_ALG_GRE_IP = 0x06,
708c2ecf20Sopenharmony_ci	RSS_ALG_ROCE = 0x07,
718c2ecf20Sopenharmony_ci};
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_cienum rss_hash_cfg {
748c2ecf20Sopenharmony_ci	RSS_HASH_L2ETC = 0x00,
758c2ecf20Sopenharmony_ci	RSS_HASH_IP = 0x01,
768c2ecf20Sopenharmony_ci	RSS_HASH_TCP = 0x02,
778c2ecf20Sopenharmony_ci	RSS_HASH_TCP_SYN_DIS = 0x03,
788c2ecf20Sopenharmony_ci	RSS_HASH_UDP = 0x04,
798c2ecf20Sopenharmony_ci	RSS_HASH_L4ETC = 0x05,
808c2ecf20Sopenharmony_ci	RSS_HASH_ROCE = 0x06,
818c2ecf20Sopenharmony_ci	RSS_L3_BIDI = 0x07,
828c2ecf20Sopenharmony_ci	RSS_L4_BIDI = 0x08,
838c2ecf20Sopenharmony_ci};
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci/* Completion queue entry types */
868c2ecf20Sopenharmony_cienum cqe_type {
878c2ecf20Sopenharmony_ci	CQE_TYPE_INVALID = 0x0,
888c2ecf20Sopenharmony_ci	CQE_TYPE_RX = 0x2,
898c2ecf20Sopenharmony_ci	CQE_TYPE_RX_SPLIT = 0x3,
908c2ecf20Sopenharmony_ci	CQE_TYPE_RX_TCP = 0x4,
918c2ecf20Sopenharmony_ci	CQE_TYPE_SEND = 0x8,
928c2ecf20Sopenharmony_ci	CQE_TYPE_SEND_PTP = 0x9,
938c2ecf20Sopenharmony_ci};
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_cienum cqe_rx_tcp_status {
968c2ecf20Sopenharmony_ci	CQE_RX_STATUS_VALID_TCP_CNXT = 0x00,
978c2ecf20Sopenharmony_ci	CQE_RX_STATUS_INVALID_TCP_CNXT = 0x0F,
988c2ecf20Sopenharmony_ci};
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_cienum cqe_send_status {
1018c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_GOOD = 0x00,
1028c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_DESC_FAULT = 0x01,
1038c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_HDR_CONS_ERR = 0x11,
1048c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_SUBDESC_ERR = 0x12,
1058c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_IMM_SIZE_OFLOW = 0x80,
1068c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_CRC_SEQ_ERR = 0x81,
1078c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_DATA_SEQ_ERR = 0x82,
1088c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_MEM_SEQ_ERR = 0x83,
1098c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_LOCK_VIOL = 0x84,
1108c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_LOCK_UFLOW = 0x85,
1118c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_DATA_FAULT = 0x86,
1128c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_TSTMP_CONFLICT = 0x87,
1138c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_TSTMP_TIMEOUT = 0x88,
1148c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_MEM_FAULT = 0x89,
1158c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_CSUM_OVERLAP = 0x8A,
1168c2ecf20Sopenharmony_ci	CQE_SEND_STATUS_CSUM_OVERFLOW = 0x8B,
1178c2ecf20Sopenharmony_ci};
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_cienum cqe_rx_tcp_end_reason {
1208c2ecf20Sopenharmony_ci	CQE_RX_TCP_END_FIN_FLAG_DET = 0,
1218c2ecf20Sopenharmony_ci	CQE_RX_TCP_END_INVALID_FLAG = 1,
1228c2ecf20Sopenharmony_ci	CQE_RX_TCP_END_TIMEOUT = 2,
1238c2ecf20Sopenharmony_ci	CQE_RX_TCP_END_OUT_OF_SEQ = 3,
1248c2ecf20Sopenharmony_ci	CQE_RX_TCP_END_PKT_ERR = 4,
1258c2ecf20Sopenharmony_ci	CQE_RX_TCP_END_QS_DISABLED = 0x0F,
1268c2ecf20Sopenharmony_ci};
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ci/* Packet protocol level error enumeration */
1298c2ecf20Sopenharmony_cienum cqe_rx_err_level {
1308c2ecf20Sopenharmony_ci	CQE_RX_ERRLVL_RE = 0x0,
1318c2ecf20Sopenharmony_ci	CQE_RX_ERRLVL_L2 = 0x1,
1328c2ecf20Sopenharmony_ci	CQE_RX_ERRLVL_L3 = 0x2,
1338c2ecf20Sopenharmony_ci	CQE_RX_ERRLVL_L4 = 0x3,
1348c2ecf20Sopenharmony_ci};
1358c2ecf20Sopenharmony_ci
1368c2ecf20Sopenharmony_ci/* Packet protocol level error type enumeration */
1378c2ecf20Sopenharmony_cienum cqe_rx_err_opcode {
1388c2ecf20Sopenharmony_ci	CQE_RX_ERR_RE_NONE = 0x0,
1398c2ecf20Sopenharmony_ci	CQE_RX_ERR_RE_PARTIAL = 0x1,
1408c2ecf20Sopenharmony_ci	CQE_RX_ERR_RE_JABBER = 0x2,
1418c2ecf20Sopenharmony_ci	CQE_RX_ERR_RE_FCS = 0x7,
1428c2ecf20Sopenharmony_ci	CQE_RX_ERR_RE_TERMINATE = 0x9,
1438c2ecf20Sopenharmony_ci	CQE_RX_ERR_RE_RX_CTL = 0xb,
1448c2ecf20Sopenharmony_ci	CQE_RX_ERR_PREL2_ERR = 0x1f,
1458c2ecf20Sopenharmony_ci	CQE_RX_ERR_L2_FRAGMENT = 0x20,
1468c2ecf20Sopenharmony_ci	CQE_RX_ERR_L2_OVERRUN = 0x21,
1478c2ecf20Sopenharmony_ci	CQE_RX_ERR_L2_PFCS = 0x22,
1488c2ecf20Sopenharmony_ci	CQE_RX_ERR_L2_PUNY = 0x23,
1498c2ecf20Sopenharmony_ci	CQE_RX_ERR_L2_MAL = 0x24,
1508c2ecf20Sopenharmony_ci	CQE_RX_ERR_L2_OVERSIZE = 0x25,
1518c2ecf20Sopenharmony_ci	CQE_RX_ERR_L2_UNDERSIZE = 0x26,
1528c2ecf20Sopenharmony_ci	CQE_RX_ERR_L2_LENMISM = 0x27,
1538c2ecf20Sopenharmony_ci	CQE_RX_ERR_L2_PCLP = 0x28,
1548c2ecf20Sopenharmony_ci	CQE_RX_ERR_IP_NOT = 0x41,
1558c2ecf20Sopenharmony_ci	CQE_RX_ERR_IP_CHK = 0x42,
1568c2ecf20Sopenharmony_ci	CQE_RX_ERR_IP_MAL = 0x43,
1578c2ecf20Sopenharmony_ci	CQE_RX_ERR_IP_MALD = 0x44,
1588c2ecf20Sopenharmony_ci	CQE_RX_ERR_IP_HOP = 0x45,
1598c2ecf20Sopenharmony_ci	CQE_RX_ERR_L3_ICRC = 0x46,
1608c2ecf20Sopenharmony_ci	CQE_RX_ERR_L3_PCLP = 0x47,
1618c2ecf20Sopenharmony_ci	CQE_RX_ERR_L4_MAL = 0x61,
1628c2ecf20Sopenharmony_ci	CQE_RX_ERR_L4_CHK = 0x62,
1638c2ecf20Sopenharmony_ci	CQE_RX_ERR_UDP_LEN = 0x63,
1648c2ecf20Sopenharmony_ci	CQE_RX_ERR_L4_PORT = 0x64,
1658c2ecf20Sopenharmony_ci	CQE_RX_ERR_TCP_FLAG = 0x65,
1668c2ecf20Sopenharmony_ci	CQE_RX_ERR_TCP_OFFSET = 0x66,
1678c2ecf20Sopenharmony_ci	CQE_RX_ERR_L4_PCLP = 0x67,
1688c2ecf20Sopenharmony_ci	CQE_RX_ERR_RBDR_TRUNC = 0x70,
1698c2ecf20Sopenharmony_ci};
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_cistruct cqe_rx_t {
1728c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
1738c2ecf20Sopenharmony_ci	u64   cqe_type:4; /* W0 */
1748c2ecf20Sopenharmony_ci	u64   stdn_fault:1;
1758c2ecf20Sopenharmony_ci	u64   rsvd0:1;
1768c2ecf20Sopenharmony_ci	u64   rq_qs:7;
1778c2ecf20Sopenharmony_ci	u64   rq_idx:3;
1788c2ecf20Sopenharmony_ci	u64   rsvd1:12;
1798c2ecf20Sopenharmony_ci	u64   rss_alg:4;
1808c2ecf20Sopenharmony_ci	u64   rsvd2:4;
1818c2ecf20Sopenharmony_ci	u64   rb_cnt:4;
1828c2ecf20Sopenharmony_ci	u64   vlan_found:1;
1838c2ecf20Sopenharmony_ci	u64   vlan_stripped:1;
1848c2ecf20Sopenharmony_ci	u64   vlan2_found:1;
1858c2ecf20Sopenharmony_ci	u64   vlan2_stripped:1;
1868c2ecf20Sopenharmony_ci	u64   l4_type:4;
1878c2ecf20Sopenharmony_ci	u64   l3_type:4;
1888c2ecf20Sopenharmony_ci	u64   l2_present:1;
1898c2ecf20Sopenharmony_ci	u64   err_level:3;
1908c2ecf20Sopenharmony_ci	u64   err_opcode:8;
1918c2ecf20Sopenharmony_ci
1928c2ecf20Sopenharmony_ci	u64   pkt_len:16; /* W1 */
1938c2ecf20Sopenharmony_ci	u64   l2_ptr:8;
1948c2ecf20Sopenharmony_ci	u64   l3_ptr:8;
1958c2ecf20Sopenharmony_ci	u64   l4_ptr:8;
1968c2ecf20Sopenharmony_ci	u64   cq_pkt_len:8;
1978c2ecf20Sopenharmony_ci	u64   align_pad:3;
1988c2ecf20Sopenharmony_ci	u64   rsvd3:1;
1998c2ecf20Sopenharmony_ci	u64   chan:12;
2008c2ecf20Sopenharmony_ci
2018c2ecf20Sopenharmony_ci	u64   rss_tag:32; /* W2 */
2028c2ecf20Sopenharmony_ci	u64   vlan_tci:16;
2038c2ecf20Sopenharmony_ci	u64   vlan_ptr:8;
2048c2ecf20Sopenharmony_ci	u64   vlan2_ptr:8;
2058c2ecf20Sopenharmony_ci
2068c2ecf20Sopenharmony_ci	u64   rb3_sz:16; /* W3 */
2078c2ecf20Sopenharmony_ci	u64   rb2_sz:16;
2088c2ecf20Sopenharmony_ci	u64   rb1_sz:16;
2098c2ecf20Sopenharmony_ci	u64   rb0_sz:16;
2108c2ecf20Sopenharmony_ci
2118c2ecf20Sopenharmony_ci	u64   rb7_sz:16; /* W4 */
2128c2ecf20Sopenharmony_ci	u64   rb6_sz:16;
2138c2ecf20Sopenharmony_ci	u64   rb5_sz:16;
2148c2ecf20Sopenharmony_ci	u64   rb4_sz:16;
2158c2ecf20Sopenharmony_ci
2168c2ecf20Sopenharmony_ci	u64   rb11_sz:16; /* W5 */
2178c2ecf20Sopenharmony_ci	u64   rb10_sz:16;
2188c2ecf20Sopenharmony_ci	u64   rb9_sz:16;
2198c2ecf20Sopenharmony_ci	u64   rb8_sz:16;
2208c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
2218c2ecf20Sopenharmony_ci	u64   err_opcode:8;
2228c2ecf20Sopenharmony_ci	u64   err_level:3;
2238c2ecf20Sopenharmony_ci	u64   l2_present:1;
2248c2ecf20Sopenharmony_ci	u64   l3_type:4;
2258c2ecf20Sopenharmony_ci	u64   l4_type:4;
2268c2ecf20Sopenharmony_ci	u64   vlan2_stripped:1;
2278c2ecf20Sopenharmony_ci	u64   vlan2_found:1;
2288c2ecf20Sopenharmony_ci	u64   vlan_stripped:1;
2298c2ecf20Sopenharmony_ci	u64   vlan_found:1;
2308c2ecf20Sopenharmony_ci	u64   rb_cnt:4;
2318c2ecf20Sopenharmony_ci	u64   rsvd2:4;
2328c2ecf20Sopenharmony_ci	u64   rss_alg:4;
2338c2ecf20Sopenharmony_ci	u64   rsvd1:12;
2348c2ecf20Sopenharmony_ci	u64   rq_idx:3;
2358c2ecf20Sopenharmony_ci	u64   rq_qs:7;
2368c2ecf20Sopenharmony_ci	u64   rsvd0:1;
2378c2ecf20Sopenharmony_ci	u64   stdn_fault:1;
2388c2ecf20Sopenharmony_ci	u64   cqe_type:4; /* W0 */
2398c2ecf20Sopenharmony_ci	u64   chan:12;
2408c2ecf20Sopenharmony_ci	u64   rsvd3:1;
2418c2ecf20Sopenharmony_ci	u64   align_pad:3;
2428c2ecf20Sopenharmony_ci	u64   cq_pkt_len:8;
2438c2ecf20Sopenharmony_ci	u64   l4_ptr:8;
2448c2ecf20Sopenharmony_ci	u64   l3_ptr:8;
2458c2ecf20Sopenharmony_ci	u64   l2_ptr:8;
2468c2ecf20Sopenharmony_ci	u64   pkt_len:16; /* W1 */
2478c2ecf20Sopenharmony_ci	u64   vlan2_ptr:8;
2488c2ecf20Sopenharmony_ci	u64   vlan_ptr:8;
2498c2ecf20Sopenharmony_ci	u64   vlan_tci:16;
2508c2ecf20Sopenharmony_ci	u64   rss_tag:32; /* W2 */
2518c2ecf20Sopenharmony_ci	u64   rb0_sz:16;
2528c2ecf20Sopenharmony_ci	u64   rb1_sz:16;
2538c2ecf20Sopenharmony_ci	u64   rb2_sz:16;
2548c2ecf20Sopenharmony_ci	u64   rb3_sz:16; /* W3 */
2558c2ecf20Sopenharmony_ci	u64   rb4_sz:16;
2568c2ecf20Sopenharmony_ci	u64   rb5_sz:16;
2578c2ecf20Sopenharmony_ci	u64   rb6_sz:16;
2588c2ecf20Sopenharmony_ci	u64   rb7_sz:16; /* W4 */
2598c2ecf20Sopenharmony_ci	u64   rb8_sz:16;
2608c2ecf20Sopenharmony_ci	u64   rb9_sz:16;
2618c2ecf20Sopenharmony_ci	u64   rb10_sz:16;
2628c2ecf20Sopenharmony_ci	u64   rb11_sz:16; /* W5 */
2638c2ecf20Sopenharmony_ci#endif
2648c2ecf20Sopenharmony_ci	u64   rb0_ptr:64;
2658c2ecf20Sopenharmony_ci	u64   rb1_ptr:64;
2668c2ecf20Sopenharmony_ci	u64   rb2_ptr:64;
2678c2ecf20Sopenharmony_ci	u64   rb3_ptr:64;
2688c2ecf20Sopenharmony_ci	u64   rb4_ptr:64;
2698c2ecf20Sopenharmony_ci	u64   rb5_ptr:64;
2708c2ecf20Sopenharmony_ci	u64   rb6_ptr:64;
2718c2ecf20Sopenharmony_ci	u64   rb7_ptr:64;
2728c2ecf20Sopenharmony_ci	u64   rb8_ptr:64;
2738c2ecf20Sopenharmony_ci	u64   rb9_ptr:64;
2748c2ecf20Sopenharmony_ci	u64   rb10_ptr:64;
2758c2ecf20Sopenharmony_ci	u64   rb11_ptr:64;
2768c2ecf20Sopenharmony_ci};
2778c2ecf20Sopenharmony_ci
2788c2ecf20Sopenharmony_cistruct cqe_rx_tcp_err_t {
2798c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
2808c2ecf20Sopenharmony_ci	u64   cqe_type:4; /* W0 */
2818c2ecf20Sopenharmony_ci	u64   rsvd0:60;
2828c2ecf20Sopenharmony_ci
2838c2ecf20Sopenharmony_ci	u64   rsvd1:4; /* W1 */
2848c2ecf20Sopenharmony_ci	u64   partial_first:1;
2858c2ecf20Sopenharmony_ci	u64   rsvd2:27;
2868c2ecf20Sopenharmony_ci	u64   rbdr_bytes:8;
2878c2ecf20Sopenharmony_ci	u64   rsvd3:24;
2888c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
2898c2ecf20Sopenharmony_ci	u64   rsvd0:60;
2908c2ecf20Sopenharmony_ci	u64   cqe_type:4;
2918c2ecf20Sopenharmony_ci
2928c2ecf20Sopenharmony_ci	u64   rsvd3:24;
2938c2ecf20Sopenharmony_ci	u64   rbdr_bytes:8;
2948c2ecf20Sopenharmony_ci	u64   rsvd2:27;
2958c2ecf20Sopenharmony_ci	u64   partial_first:1;
2968c2ecf20Sopenharmony_ci	u64   rsvd1:4;
2978c2ecf20Sopenharmony_ci#endif
2988c2ecf20Sopenharmony_ci};
2998c2ecf20Sopenharmony_ci
3008c2ecf20Sopenharmony_cistruct cqe_rx_tcp_t {
3018c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
3028c2ecf20Sopenharmony_ci	u64   cqe_type:4; /* W0 */
3038c2ecf20Sopenharmony_ci	u64   rsvd0:52;
3048c2ecf20Sopenharmony_ci	u64   cq_tcp_status:8;
3058c2ecf20Sopenharmony_ci
3068c2ecf20Sopenharmony_ci	u64   rsvd1:32; /* W1 */
3078c2ecf20Sopenharmony_ci	u64   tcp_cntx_bytes:8;
3088c2ecf20Sopenharmony_ci	u64   rsvd2:8;
3098c2ecf20Sopenharmony_ci	u64   tcp_err_bytes:16;
3108c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
3118c2ecf20Sopenharmony_ci	u64   cq_tcp_status:8;
3128c2ecf20Sopenharmony_ci	u64   rsvd0:52;
3138c2ecf20Sopenharmony_ci	u64   cqe_type:4; /* W0 */
3148c2ecf20Sopenharmony_ci
3158c2ecf20Sopenharmony_ci	u64   tcp_err_bytes:16;
3168c2ecf20Sopenharmony_ci	u64   rsvd2:8;
3178c2ecf20Sopenharmony_ci	u64   tcp_cntx_bytes:8;
3188c2ecf20Sopenharmony_ci	u64   rsvd1:32; /* W1 */
3198c2ecf20Sopenharmony_ci#endif
3208c2ecf20Sopenharmony_ci};
3218c2ecf20Sopenharmony_ci
3228c2ecf20Sopenharmony_cistruct cqe_send_t {
3238c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
3248c2ecf20Sopenharmony_ci	u64   cqe_type:4; /* W0 */
3258c2ecf20Sopenharmony_ci	u64   rsvd0:4;
3268c2ecf20Sopenharmony_ci	u64   sqe_ptr:16;
3278c2ecf20Sopenharmony_ci	u64   rsvd1:4;
3288c2ecf20Sopenharmony_ci	u64   rsvd2:10;
3298c2ecf20Sopenharmony_ci	u64   sq_qs:7;
3308c2ecf20Sopenharmony_ci	u64   sq_idx:3;
3318c2ecf20Sopenharmony_ci	u64   rsvd3:8;
3328c2ecf20Sopenharmony_ci	u64   send_status:8;
3338c2ecf20Sopenharmony_ci
3348c2ecf20Sopenharmony_ci	u64   ptp_timestamp:64; /* W1 */
3358c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
3368c2ecf20Sopenharmony_ci	u64   send_status:8;
3378c2ecf20Sopenharmony_ci	u64   rsvd3:8;
3388c2ecf20Sopenharmony_ci	u64   sq_idx:3;
3398c2ecf20Sopenharmony_ci	u64   sq_qs:7;
3408c2ecf20Sopenharmony_ci	u64   rsvd2:10;
3418c2ecf20Sopenharmony_ci	u64   rsvd1:4;
3428c2ecf20Sopenharmony_ci	u64   sqe_ptr:16;
3438c2ecf20Sopenharmony_ci	u64   rsvd0:4;
3448c2ecf20Sopenharmony_ci	u64   cqe_type:4; /* W0 */
3458c2ecf20Sopenharmony_ci
3468c2ecf20Sopenharmony_ci	u64   ptp_timestamp:64; /* W1 */
3478c2ecf20Sopenharmony_ci#endif
3488c2ecf20Sopenharmony_ci};
3498c2ecf20Sopenharmony_ci
3508c2ecf20Sopenharmony_ciunion cq_desc_t {
3518c2ecf20Sopenharmony_ci	u64    u[64];
3528c2ecf20Sopenharmony_ci	struct cqe_send_t snd_hdr;
3538c2ecf20Sopenharmony_ci	struct cqe_rx_t rx_hdr;
3548c2ecf20Sopenharmony_ci	struct cqe_rx_tcp_t rx_tcp_hdr;
3558c2ecf20Sopenharmony_ci	struct cqe_rx_tcp_err_t rx_tcp_err_hdr;
3568c2ecf20Sopenharmony_ci};
3578c2ecf20Sopenharmony_ci
3588c2ecf20Sopenharmony_cistruct rbdr_entry_t {
3598c2ecf20Sopenharmony_ci	u64   buf_addr;
3608c2ecf20Sopenharmony_ci};
3618c2ecf20Sopenharmony_ci
3628c2ecf20Sopenharmony_ci/* TCP reassembly context */
3638c2ecf20Sopenharmony_cistruct rbe_tcp_cnxt_t {
3648c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
3658c2ecf20Sopenharmony_ci	u64   tcp_pkt_cnt:12;
3668c2ecf20Sopenharmony_ci	u64   rsvd1:4;
3678c2ecf20Sopenharmony_ci	u64   align_hdr_bytes:4;
3688c2ecf20Sopenharmony_ci	u64   align_ptr_bytes:4;
3698c2ecf20Sopenharmony_ci	u64   ptr_bytes:16;
3708c2ecf20Sopenharmony_ci	u64   rsvd2:24;
3718c2ecf20Sopenharmony_ci	u64   cqe_type:4;
3728c2ecf20Sopenharmony_ci	u64   rsvd0:54;
3738c2ecf20Sopenharmony_ci	u64   tcp_end_reason:2;
3748c2ecf20Sopenharmony_ci	u64   tcp_status:4;
3758c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
3768c2ecf20Sopenharmony_ci	u64   tcp_status:4;
3778c2ecf20Sopenharmony_ci	u64   tcp_end_reason:2;
3788c2ecf20Sopenharmony_ci	u64   rsvd0:54;
3798c2ecf20Sopenharmony_ci	u64   cqe_type:4;
3808c2ecf20Sopenharmony_ci	u64   rsvd2:24;
3818c2ecf20Sopenharmony_ci	u64   ptr_bytes:16;
3828c2ecf20Sopenharmony_ci	u64   align_ptr_bytes:4;
3838c2ecf20Sopenharmony_ci	u64   align_hdr_bytes:4;
3848c2ecf20Sopenharmony_ci	u64   rsvd1:4;
3858c2ecf20Sopenharmony_ci	u64   tcp_pkt_cnt:12;
3868c2ecf20Sopenharmony_ci#endif
3878c2ecf20Sopenharmony_ci};
3888c2ecf20Sopenharmony_ci
3898c2ecf20Sopenharmony_ci/* Always Big endian */
3908c2ecf20Sopenharmony_cistruct rx_hdr_t {
3918c2ecf20Sopenharmony_ci	u64   opaque:32;
3928c2ecf20Sopenharmony_ci	u64   rss_flow:8;
3938c2ecf20Sopenharmony_ci	u64   skip_length:6;
3948c2ecf20Sopenharmony_ci	u64   disable_rss:1;
3958c2ecf20Sopenharmony_ci	u64   disable_tcp_reassembly:1;
3968c2ecf20Sopenharmony_ci	u64   nodrop:1;
3978c2ecf20Sopenharmony_ci	u64   dest_alg:2;
3988c2ecf20Sopenharmony_ci	u64   rsvd0:2;
3998c2ecf20Sopenharmony_ci	u64   dest_rq:11;
4008c2ecf20Sopenharmony_ci};
4018c2ecf20Sopenharmony_ci
4028c2ecf20Sopenharmony_cienum send_l4_csum_type {
4038c2ecf20Sopenharmony_ci	SEND_L4_CSUM_DISABLE = 0x00,
4048c2ecf20Sopenharmony_ci	SEND_L4_CSUM_UDP = 0x01,
4058c2ecf20Sopenharmony_ci	SEND_L4_CSUM_TCP = 0x02,
4068c2ecf20Sopenharmony_ci	SEND_L4_CSUM_SCTP = 0x03,
4078c2ecf20Sopenharmony_ci};
4088c2ecf20Sopenharmony_ci
4098c2ecf20Sopenharmony_cienum send_crc_alg {
4108c2ecf20Sopenharmony_ci	SEND_CRCALG_CRC32 = 0x00,
4118c2ecf20Sopenharmony_ci	SEND_CRCALG_CRC32C = 0x01,
4128c2ecf20Sopenharmony_ci	SEND_CRCALG_ICRC = 0x02,
4138c2ecf20Sopenharmony_ci};
4148c2ecf20Sopenharmony_ci
4158c2ecf20Sopenharmony_cienum send_load_type {
4168c2ecf20Sopenharmony_ci	SEND_LD_TYPE_LDD = 0x00,
4178c2ecf20Sopenharmony_ci	SEND_LD_TYPE_LDT = 0x01,
4188c2ecf20Sopenharmony_ci	SEND_LD_TYPE_LDWB = 0x02,
4198c2ecf20Sopenharmony_ci};
4208c2ecf20Sopenharmony_ci
4218c2ecf20Sopenharmony_cienum send_mem_alg_type {
4228c2ecf20Sopenharmony_ci	SEND_MEMALG_SET = 0x00,
4238c2ecf20Sopenharmony_ci	SEND_MEMALG_ADD = 0x08,
4248c2ecf20Sopenharmony_ci	SEND_MEMALG_SUB = 0x09,
4258c2ecf20Sopenharmony_ci	SEND_MEMALG_ADDLEN = 0x0A,
4268c2ecf20Sopenharmony_ci	SEND_MEMALG_SUBLEN = 0x0B,
4278c2ecf20Sopenharmony_ci};
4288c2ecf20Sopenharmony_ci
4298c2ecf20Sopenharmony_cienum send_mem_dsz_type {
4308c2ecf20Sopenharmony_ci	SEND_MEMDSZ_B64 = 0x00,
4318c2ecf20Sopenharmony_ci	SEND_MEMDSZ_B32 = 0x01,
4328c2ecf20Sopenharmony_ci	SEND_MEMDSZ_B8 = 0x03,
4338c2ecf20Sopenharmony_ci};
4348c2ecf20Sopenharmony_ci
4358c2ecf20Sopenharmony_cienum sq_subdesc_type {
4368c2ecf20Sopenharmony_ci	SQ_DESC_TYPE_INVALID = 0x00,
4378c2ecf20Sopenharmony_ci	SQ_DESC_TYPE_HEADER = 0x01,
4388c2ecf20Sopenharmony_ci	SQ_DESC_TYPE_CRC = 0x02,
4398c2ecf20Sopenharmony_ci	SQ_DESC_TYPE_IMMEDIATE = 0x03,
4408c2ecf20Sopenharmony_ci	SQ_DESC_TYPE_GATHER = 0x04,
4418c2ecf20Sopenharmony_ci	SQ_DESC_TYPE_MEMORY = 0x05,
4428c2ecf20Sopenharmony_ci};
4438c2ecf20Sopenharmony_ci
4448c2ecf20Sopenharmony_cistruct sq_crc_subdesc {
4458c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
4468c2ecf20Sopenharmony_ci	u64    rsvd1:32;
4478c2ecf20Sopenharmony_ci	u64    crc_ival:32;
4488c2ecf20Sopenharmony_ci	u64    subdesc_type:4;
4498c2ecf20Sopenharmony_ci	u64    crc_alg:2;
4508c2ecf20Sopenharmony_ci	u64    rsvd0:10;
4518c2ecf20Sopenharmony_ci	u64    crc_insert_pos:16;
4528c2ecf20Sopenharmony_ci	u64    hdr_start:16;
4538c2ecf20Sopenharmony_ci	u64    crc_len:16;
4548c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
4558c2ecf20Sopenharmony_ci	u64    crc_len:16;
4568c2ecf20Sopenharmony_ci	u64    hdr_start:16;
4578c2ecf20Sopenharmony_ci	u64    crc_insert_pos:16;
4588c2ecf20Sopenharmony_ci	u64    rsvd0:10;
4598c2ecf20Sopenharmony_ci	u64    crc_alg:2;
4608c2ecf20Sopenharmony_ci	u64    subdesc_type:4;
4618c2ecf20Sopenharmony_ci	u64    crc_ival:32;
4628c2ecf20Sopenharmony_ci	u64    rsvd1:32;
4638c2ecf20Sopenharmony_ci#endif
4648c2ecf20Sopenharmony_ci};
4658c2ecf20Sopenharmony_ci
4668c2ecf20Sopenharmony_cistruct sq_gather_subdesc {
4678c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
4688c2ecf20Sopenharmony_ci	u64    subdesc_type:4; /* W0 */
4698c2ecf20Sopenharmony_ci	u64    ld_type:2;
4708c2ecf20Sopenharmony_ci	u64    rsvd0:42;
4718c2ecf20Sopenharmony_ci	u64    size:16;
4728c2ecf20Sopenharmony_ci
4738c2ecf20Sopenharmony_ci	u64    rsvd1:15; /* W1 */
4748c2ecf20Sopenharmony_ci	u64    addr:49;
4758c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
4768c2ecf20Sopenharmony_ci	u64    size:16;
4778c2ecf20Sopenharmony_ci	u64    rsvd0:42;
4788c2ecf20Sopenharmony_ci	u64    ld_type:2;
4798c2ecf20Sopenharmony_ci	u64    subdesc_type:4; /* W0 */
4808c2ecf20Sopenharmony_ci
4818c2ecf20Sopenharmony_ci	u64    addr:49;
4828c2ecf20Sopenharmony_ci	u64    rsvd1:15; /* W1 */
4838c2ecf20Sopenharmony_ci#endif
4848c2ecf20Sopenharmony_ci};
4858c2ecf20Sopenharmony_ci
4868c2ecf20Sopenharmony_ci/* SQ immediate subdescriptor */
4878c2ecf20Sopenharmony_cistruct sq_imm_subdesc {
4888c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
4898c2ecf20Sopenharmony_ci	u64    subdesc_type:4; /* W0 */
4908c2ecf20Sopenharmony_ci	u64    rsvd0:46;
4918c2ecf20Sopenharmony_ci	u64    len:14;
4928c2ecf20Sopenharmony_ci
4938c2ecf20Sopenharmony_ci	u64    data:64; /* W1 */
4948c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
4958c2ecf20Sopenharmony_ci	u64    len:14;
4968c2ecf20Sopenharmony_ci	u64    rsvd0:46;
4978c2ecf20Sopenharmony_ci	u64    subdesc_type:4; /* W0 */
4988c2ecf20Sopenharmony_ci
4998c2ecf20Sopenharmony_ci	u64    data:64; /* W1 */
5008c2ecf20Sopenharmony_ci#endif
5018c2ecf20Sopenharmony_ci};
5028c2ecf20Sopenharmony_ci
5038c2ecf20Sopenharmony_cistruct sq_mem_subdesc {
5048c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
5058c2ecf20Sopenharmony_ci	u64    subdesc_type:4; /* W0 */
5068c2ecf20Sopenharmony_ci	u64    mem_alg:4;
5078c2ecf20Sopenharmony_ci	u64    mem_dsz:2;
5088c2ecf20Sopenharmony_ci	u64    wmem:1;
5098c2ecf20Sopenharmony_ci	u64    rsvd0:21;
5108c2ecf20Sopenharmony_ci	u64    offset:32;
5118c2ecf20Sopenharmony_ci
5128c2ecf20Sopenharmony_ci	u64    rsvd1:15; /* W1 */
5138c2ecf20Sopenharmony_ci	u64    addr:49;
5148c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
5158c2ecf20Sopenharmony_ci	u64    offset:32;
5168c2ecf20Sopenharmony_ci	u64    rsvd0:21;
5178c2ecf20Sopenharmony_ci	u64    wmem:1;
5188c2ecf20Sopenharmony_ci	u64    mem_dsz:2;
5198c2ecf20Sopenharmony_ci	u64    mem_alg:4;
5208c2ecf20Sopenharmony_ci	u64    subdesc_type:4; /* W0 */
5218c2ecf20Sopenharmony_ci
5228c2ecf20Sopenharmony_ci	u64    addr:49;
5238c2ecf20Sopenharmony_ci	u64    rsvd1:15; /* W1 */
5248c2ecf20Sopenharmony_ci#endif
5258c2ecf20Sopenharmony_ci};
5268c2ecf20Sopenharmony_ci
5278c2ecf20Sopenharmony_cistruct sq_hdr_subdesc {
5288c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
5298c2ecf20Sopenharmony_ci	u64    subdesc_type:4;
5308c2ecf20Sopenharmony_ci	u64    tso:1;
5318c2ecf20Sopenharmony_ci	u64    post_cqe:1; /* Post CQE on no error also */
5328c2ecf20Sopenharmony_ci	u64    dont_send:1;
5338c2ecf20Sopenharmony_ci	u64    tstmp:1;
5348c2ecf20Sopenharmony_ci	u64    subdesc_cnt:8;
5358c2ecf20Sopenharmony_ci	u64    csum_l4:2;
5368c2ecf20Sopenharmony_ci	u64    csum_l3:1;
5378c2ecf20Sopenharmony_ci	u64    csum_inner_l4:2;
5388c2ecf20Sopenharmony_ci	u64    csum_inner_l3:1;
5398c2ecf20Sopenharmony_ci	u64    rsvd0:2;
5408c2ecf20Sopenharmony_ci	u64    l4_offset:8;
5418c2ecf20Sopenharmony_ci	u64    l3_offset:8;
5428c2ecf20Sopenharmony_ci	u64    rsvd1:4;
5438c2ecf20Sopenharmony_ci	u64    tot_len:20; /* W0 */
5448c2ecf20Sopenharmony_ci
5458c2ecf20Sopenharmony_ci	u64    rsvd2:24;
5468c2ecf20Sopenharmony_ci	u64    inner_l4_offset:8;
5478c2ecf20Sopenharmony_ci	u64    inner_l3_offset:8;
5488c2ecf20Sopenharmony_ci	u64    tso_start:8;
5498c2ecf20Sopenharmony_ci	u64    rsvd3:2;
5508c2ecf20Sopenharmony_ci	u64    tso_max_paysize:14; /* W1 */
5518c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
5528c2ecf20Sopenharmony_ci	u64    tot_len:20;
5538c2ecf20Sopenharmony_ci	u64    rsvd1:4;
5548c2ecf20Sopenharmony_ci	u64    l3_offset:8;
5558c2ecf20Sopenharmony_ci	u64    l4_offset:8;
5568c2ecf20Sopenharmony_ci	u64    rsvd0:2;
5578c2ecf20Sopenharmony_ci	u64    csum_inner_l3:1;
5588c2ecf20Sopenharmony_ci	u64    csum_inner_l4:2;
5598c2ecf20Sopenharmony_ci	u64    csum_l3:1;
5608c2ecf20Sopenharmony_ci	u64    csum_l4:2;
5618c2ecf20Sopenharmony_ci	u64    subdesc_cnt:8;
5628c2ecf20Sopenharmony_ci	u64    tstmp:1;
5638c2ecf20Sopenharmony_ci	u64    dont_send:1;
5648c2ecf20Sopenharmony_ci	u64    post_cqe:1; /* Post CQE on no error also */
5658c2ecf20Sopenharmony_ci	u64    tso:1;
5668c2ecf20Sopenharmony_ci	u64    subdesc_type:4; /* W0 */
5678c2ecf20Sopenharmony_ci
5688c2ecf20Sopenharmony_ci	u64    tso_max_paysize:14;
5698c2ecf20Sopenharmony_ci	u64    rsvd3:2;
5708c2ecf20Sopenharmony_ci	u64    tso_start:8;
5718c2ecf20Sopenharmony_ci	u64    inner_l3_offset:8;
5728c2ecf20Sopenharmony_ci	u64    inner_l4_offset:8;
5738c2ecf20Sopenharmony_ci	u64    rsvd2:24; /* W1 */
5748c2ecf20Sopenharmony_ci#endif
5758c2ecf20Sopenharmony_ci};
5768c2ecf20Sopenharmony_ci
5778c2ecf20Sopenharmony_ci/* Queue config register formats */
5788c2ecf20Sopenharmony_cistruct rq_cfg {
5798c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
5808c2ecf20Sopenharmony_ci	u64 reserved_2_63:62;
5818c2ecf20Sopenharmony_ci	u64 ena:1;
5828c2ecf20Sopenharmony_ci	u64 tcp_ena:1;
5838c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
5848c2ecf20Sopenharmony_ci	u64 tcp_ena:1;
5858c2ecf20Sopenharmony_ci	u64 ena:1;
5868c2ecf20Sopenharmony_ci	u64 reserved_2_63:62;
5878c2ecf20Sopenharmony_ci#endif
5888c2ecf20Sopenharmony_ci};
5898c2ecf20Sopenharmony_ci
5908c2ecf20Sopenharmony_cistruct cq_cfg {
5918c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
5928c2ecf20Sopenharmony_ci	u64 reserved_43_63:21;
5938c2ecf20Sopenharmony_ci	u64 ena:1;
5948c2ecf20Sopenharmony_ci	u64 reset:1;
5958c2ecf20Sopenharmony_ci	u64 caching:1;
5968c2ecf20Sopenharmony_ci	u64 reserved_35_39:5;
5978c2ecf20Sopenharmony_ci	u64 qsize:3;
5988c2ecf20Sopenharmony_ci	u64 reserved_25_31:7;
5998c2ecf20Sopenharmony_ci	u64 avg_con:9;
6008c2ecf20Sopenharmony_ci	u64 reserved_0_15:16;
6018c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
6028c2ecf20Sopenharmony_ci	u64 reserved_0_15:16;
6038c2ecf20Sopenharmony_ci	u64 avg_con:9;
6048c2ecf20Sopenharmony_ci	u64 reserved_25_31:7;
6058c2ecf20Sopenharmony_ci	u64 qsize:3;
6068c2ecf20Sopenharmony_ci	u64 reserved_35_39:5;
6078c2ecf20Sopenharmony_ci	u64 caching:1;
6088c2ecf20Sopenharmony_ci	u64 reset:1;
6098c2ecf20Sopenharmony_ci	u64 ena:1;
6108c2ecf20Sopenharmony_ci	u64 reserved_43_63:21;
6118c2ecf20Sopenharmony_ci#endif
6128c2ecf20Sopenharmony_ci};
6138c2ecf20Sopenharmony_ci
6148c2ecf20Sopenharmony_cistruct sq_cfg {
6158c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
6168c2ecf20Sopenharmony_ci	u64 reserved_32_63:32;
6178c2ecf20Sopenharmony_ci	u64 cq_limit:8;
6188c2ecf20Sopenharmony_ci	u64 reserved_20_23:4;
6198c2ecf20Sopenharmony_ci	u64 ena:1;
6208c2ecf20Sopenharmony_ci	u64 reserved_18_18:1;
6218c2ecf20Sopenharmony_ci	u64 reset:1;
6228c2ecf20Sopenharmony_ci	u64 ldwb:1;
6238c2ecf20Sopenharmony_ci	u64 reserved_11_15:5;
6248c2ecf20Sopenharmony_ci	u64 qsize:3;
6258c2ecf20Sopenharmony_ci	u64 reserved_3_7:5;
6268c2ecf20Sopenharmony_ci	u64 tstmp_bgx_intf:3;
6278c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
6288c2ecf20Sopenharmony_ci	u64 tstmp_bgx_intf:3;
6298c2ecf20Sopenharmony_ci	u64 reserved_3_7:5;
6308c2ecf20Sopenharmony_ci	u64 qsize:3;
6318c2ecf20Sopenharmony_ci	u64 reserved_11_15:5;
6328c2ecf20Sopenharmony_ci	u64 ldwb:1;
6338c2ecf20Sopenharmony_ci	u64 reset:1;
6348c2ecf20Sopenharmony_ci	u64 reserved_18_18:1;
6358c2ecf20Sopenharmony_ci	u64 ena:1;
6368c2ecf20Sopenharmony_ci	u64 reserved_20_23:4;
6378c2ecf20Sopenharmony_ci	u64 cq_limit:8;
6388c2ecf20Sopenharmony_ci	u64 reserved_32_63:32;
6398c2ecf20Sopenharmony_ci#endif
6408c2ecf20Sopenharmony_ci};
6418c2ecf20Sopenharmony_ci
6428c2ecf20Sopenharmony_cistruct rbdr_cfg {
6438c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
6448c2ecf20Sopenharmony_ci	u64 reserved_45_63:19;
6458c2ecf20Sopenharmony_ci	u64 ena:1;
6468c2ecf20Sopenharmony_ci	u64 reset:1;
6478c2ecf20Sopenharmony_ci	u64 ldwb:1;
6488c2ecf20Sopenharmony_ci	u64 reserved_36_41:6;
6498c2ecf20Sopenharmony_ci	u64 qsize:4;
6508c2ecf20Sopenharmony_ci	u64 reserved_25_31:7;
6518c2ecf20Sopenharmony_ci	u64 avg_con:9;
6528c2ecf20Sopenharmony_ci	u64 reserved_12_15:4;
6538c2ecf20Sopenharmony_ci	u64 lines:12;
6548c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
6558c2ecf20Sopenharmony_ci	u64 lines:12;
6568c2ecf20Sopenharmony_ci	u64 reserved_12_15:4;
6578c2ecf20Sopenharmony_ci	u64 avg_con:9;
6588c2ecf20Sopenharmony_ci	u64 reserved_25_31:7;
6598c2ecf20Sopenharmony_ci	u64 qsize:4;
6608c2ecf20Sopenharmony_ci	u64 reserved_36_41:6;
6618c2ecf20Sopenharmony_ci	u64 ldwb:1;
6628c2ecf20Sopenharmony_ci	u64 reset:1;
6638c2ecf20Sopenharmony_ci	u64 ena: 1;
6648c2ecf20Sopenharmony_ci	u64 reserved_45_63:19;
6658c2ecf20Sopenharmony_ci#endif
6668c2ecf20Sopenharmony_ci};
6678c2ecf20Sopenharmony_ci
6688c2ecf20Sopenharmony_cistruct qs_cfg {
6698c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN_BITFIELD)
6708c2ecf20Sopenharmony_ci	u64 reserved_32_63:32;
6718c2ecf20Sopenharmony_ci	u64 ena:1;
6728c2ecf20Sopenharmony_ci	u64 reserved_27_30:4;
6738c2ecf20Sopenharmony_ci	u64 sq_ins_ena:1;
6748c2ecf20Sopenharmony_ci	u64 sq_ins_pos:6;
6758c2ecf20Sopenharmony_ci	u64 lock_ena:1;
6768c2ecf20Sopenharmony_ci	u64 lock_viol_cqe_ena:1;
6778c2ecf20Sopenharmony_ci	u64 send_tstmp_ena:1;
6788c2ecf20Sopenharmony_ci	u64 be:1;
6798c2ecf20Sopenharmony_ci	u64 reserved_7_15:9;
6808c2ecf20Sopenharmony_ci	u64 vnic:7;
6818c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN_BITFIELD)
6828c2ecf20Sopenharmony_ci	u64 vnic:7;
6838c2ecf20Sopenharmony_ci	u64 reserved_7_15:9;
6848c2ecf20Sopenharmony_ci	u64 be:1;
6858c2ecf20Sopenharmony_ci	u64 send_tstmp_ena:1;
6868c2ecf20Sopenharmony_ci	u64 lock_viol_cqe_ena:1;
6878c2ecf20Sopenharmony_ci	u64 lock_ena:1;
6888c2ecf20Sopenharmony_ci	u64 sq_ins_pos:6;
6898c2ecf20Sopenharmony_ci	u64 sq_ins_ena:1;
6908c2ecf20Sopenharmony_ci	u64 reserved_27_30:4;
6918c2ecf20Sopenharmony_ci	u64 ena:1;
6928c2ecf20Sopenharmony_ci	u64 reserved_32_63:32;
6938c2ecf20Sopenharmony_ci#endif
6948c2ecf20Sopenharmony_ci};
6958c2ecf20Sopenharmony_ci
6968c2ecf20Sopenharmony_ci#endif /* Q_STRUCT_H */
697