On 4/6/2021 2:55 AM, Stephen Hemminger wrote:
On Tue, 6 Apr 2021 08:49:04 +0800
oulijun <ouli...@huawei.com> wrote:
/**
+ * RX/TX queue states
+ */
+#define RTE_ETH_QUEUE_STATE_STOPPED 0
+#define RTE_ETH_QUEUE_STATE_STARTED 1
+#define RTE_ETH_QUEUE_STATE_HAIRPIN 2
These could be an enum?
These values are already used to assign to
'rte_eth_dev_data->[rt]x_queue_state', which are 'uint8_t', end we can't change
them to 'enum' because of ABI concerns, so I think we can keep them as it is.
+/**
* Ethernet device RX queue information structure.
* Used to retrieve information about configured queue.
*/
@@ -1591,6 +1598,8 @@ struct rte_eth_rxq_info {
uint8_t scattered_rx; /**< scattered packets RX supported. */
There is a one byte hole here waiting to be used.
Why not use that?
+1
uint16_t nb_desc; /**< configured number of RXDs. */
uint16_t rx_buf_size; /**< hardware receive buffer size. */
+ /**< Queues state: STARTED(1) / STOPPED(0). */
+ uint8_t queue_state;
} __rte_cache_min_aligned;