]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_ether/rte_ethdev.c
ethdev: reset unsupported stats
[dpdk.git] / lib / librte_ether / rte_ethdev.c
index 7bbc66e559ab5631854328ed408a8069b64c7c84..fbe2286895050cf5e1c7e220596d3bb577d1cf23 100644 (file)
@@ -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);