summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorIgor Romanov <igor.romanov@oktetlabs.ru>2019-09-06 15:34:54 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-07 15:00:54 +0200
commit9970a9ad07db7745ca6bc441819b287940ae86ea (patch)
treec4d3d08989557d9d0d3a9dac5480c9f17f0673ca /app
parentda328f7f115a459a64fd7005d4acc1ec9e1ba8bd (diff)
downloaddpdk-9970a9ad07db7745ca6bc441819b287940ae86ea.zip
dpdk-9970a9ad07db7745ca6bc441819b287940ae86ea.tar.gz
dpdk-9970a9ad07db7745ca6bc441819b287940ae86ea.tar.xz
ethdev: make stats and xstats reset callbacks return int
Change return value of the callbacks from void to int. Make implementations across all drivers return negative errno values in case of error conditions. Both callbacks are updated together because a large number of drivers assign the same function to both callbacks. Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'app')
-rw-r--r--app/test/virtual_pmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c
index b34df41..79156cb 100644
--- a/app/test/virtual_pmd.c
+++ b/app/test/virtual_pmd.c
@@ -197,7 +197,7 @@ virtual_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
return 0;
}
-static void
+static int
virtual_ethdev_stats_reset(struct rte_eth_dev *dev)
{
struct virtual_ethdev_private *dev_private = dev->data->dev_private;
@@ -208,6 +208,8 @@ virtual_ethdev_stats_reset(struct rte_eth_dev *dev)
/* Reset internal statistics */
memset(&dev_private->eth_stats, 0, sizeof(dev_private->eth_stats));
+
+ return 0;
}
static int