From: Intel Date: Wed, 18 Sep 2013 10:00:00 +0000 (+0200) Subject: ethdev: reset unsupported stats X-Git-Tag: spdx-start~11148 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=02331c16ec0ba;p=dpdk.git ethdev: reset unsupported stats Initialize statistics structure to 0 before passing it to the PMD. This way, the unsupported fields will be 0. Signed-off-by: Intel --- diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 7bbc66e559..fbe2286895 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -964,6 +964,7 @@ rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats) return; } dev = &rte_eth_devices[port_id]; + memset(stats, 0, sizeof(*stats)); FUNC_PTR_OR_RET(*dev->dev_ops->stats_get); (*dev->dev_ops->stats_get)(dev, stats);