[dpdk-dev] [dpdk-dev, PATCHv6 1/6] ethdev: enhance rte_eth_(tx|rx)q_info struct

Amine Kherbouche amine.kherbouche at 6wind.com
Tue Oct 20 00:06:19 CEST 2015


Add 2 fields in struct rte_eth_(tx|rx)q_info :
- used_desc : for used queue descriptors
- free_desc : for free queue descriptors
for ability to query more information from queues.

Signed-off-by: Amine Kherbouche <amine.kherbouche at 6wind.com>
---
 lib/librte_ether/rte_ethdev.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 4d7b6f2..5fc86a0 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -874,6 +874,8 @@ struct rte_eth_rxq_info {
 	struct rte_eth_rxconf conf; /**< queue config parameters. */
 	uint8_t scattered_rx;       /**< scattered packets RX supported. */
 	uint16_t nb_desc;           /**< configured number of RXDs. */
+	uint16_t used_desc;         /**< number of used descriptors */
+	uint16_t free_desc;         /**< number of free descriptors */
 } __rte_cache_aligned;
 
 /**
@@ -883,6 +885,8 @@ struct rte_eth_rxq_info {
 struct rte_eth_txq_info {
 	struct rte_eth_txconf conf; /**< queue config parameters. */
 	uint16_t nb_desc;           /**< configured number of TXDs. */
+	uint16_t used_desc;         /**< number of used descriptors */
+	uint16_t free_desc;         /**< number of free descriptors */
 } __rte_cache_aligned;
 
 struct rte_eth_dev;
-- 
1.7.10.4



More information about the dev mailing list