[dpdk-dev] [PATCH v2 5/8] ring: queue stats mapping set dummy implementation

Tomasz Kulasek tomaszx.kulasek at intel.com
Fri Jun 19 16:13:17 CEST 2015


Per queue statistics are already implemented for ring device, but with static
mapping (stat_idx == queue_id).

This fix is required, if you want to use ring device in test application and is
used only to point that per queue statistics are provided for this device.

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek at intel.com>
---
 drivers/net/ring/rte_eth_ring.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index d7e7d9c..975bba7 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -335,6 +335,16 @@ eth_rss_hash_conf_get(struct rte_eth_dev *dev,
 	return 0;
 }
 
+static int
+eth_queue_stats_mapping_set(__rte_unused struct rte_eth_dev *dev,
+		__rte_unused uint16_t queue_id,
+		__rte_unused uint8_t stat_idx,
+		__rte_unused uint8_t is_rx)
+{
+	/* Do nothing, just return ok */
+	return 0;
+}
+
 static const struct eth_dev_ops ops = {
 	.dev_start = eth_dev_start,
 	.dev_stop = eth_dev_stop,
@@ -347,6 +357,7 @@ static const struct eth_dev_ops ops = {
 	.rx_queue_release = eth_queue_release,
 	.tx_queue_release = eth_queue_release,
 	.link_update = eth_link_update,
+	.queue_stats_mapping_set = eth_queue_stats_mapping_set,
 	.stats_get = eth_stats_get,
 	.stats_reset = eth_stats_reset,
 	.mac_addr_remove = eth_mac_addr_remove,
-- 
1.7.9.5



More information about the dev mailing list