1 /* SPDX-License-Identifier: Apache-2.0
2 * Copyright(c) 2023 Cisco Systems, Inc.
5 #ifndef _ENA_IO_DEFS_H_
6 #define _ENA_IO_DEFS_H_
8 #include <vppinfra/clib.h>
9 #include <vppinfra/error_bootstrap.h>
10 #include <vppinfra/vector.h>
14 u16 length; /* 0 = 64K */
22 u8 first : 1; /* first descriptor in transaction */
23 u8 last : 1; /* last descriptor in transaction */
24 u8 comp_req : 1; /* should completion be posted? */
34 STATIC_ASSERT_SIZEOF (ena_rx_desc_lo_t, 8);
51 STATIC_ASSERT_SIZEOF (ena_rx_desc_t, 16);
53 #define foreach_ena_rx_cdesc_status \
61 _ (1, l4_csum_checked) \
77 #define _(b, n) u32 n : (b);
78 foreach_ena_rx_cdesc_status
83 } ena_rx_cdesc_status_t;
87 ena_rx_cdesc_status_t status;
96 STATIC_ASSERT_SIZEOF (ena_rx_cdesc_t, 16);
98 #define foreach_ena_tx_desc \
102 _ (1, _reserved0_22) \
105 _ (1, _reserved0_25) \
109 _ (2, _reserved0_29) \
110 _ (1, _reserved0_31) \
112 _ (4, l3_proto_idx) \
114 _ (2, _reserved1_5) \
116 _ (5, l4_proto_idx) \
119 _ (1, ethernet_fcs_dis) \
120 _ (1, _reserved1_16) \
121 _ (1, l4_csum_partial) \
122 _ (3, _reserved_1_18) \
123 _ (1, _reserved_1_21) \
132 #define _(b, n) u32 n : (b);
147 STATIC_ASSERT_SIZEOF (ena_tx_desc_t, 16);
151 ena_tx_desc_t desc[2];
153 } __clib_aligned (128)
154 ena_tx_llq_desc128_t;
155 STATIC_ASSERT_SIZEOF (ena_tx_llq_desc128_t, 128);
177 STATIC_ASSERT_SIZEOF (ena_tx_cdesc_t, 8);
179 #endif /* _ENA_IO_DEFS_H_ */