diff mbox

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

Message ID 1433329147-2840-6-git-send-email-tomaszx.kulasek@intel.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Tomasz Kulasek June 3, 2015, 10:59 a.m. UTC
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@intel.com>
---
 drivers/net/ring/rte_eth_ring.c |   11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox

Patch

diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 6d2182f..07695c3 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,