git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d15808a
)
ethdev: reset unsupported stats
author
Intel
<intel.com>
Wed, 18 Sep 2013 10:00:00 +0000
(12:00 +0200)
committer
Thomas Monjalon
<thomas.monjalon@6wind.com>
Wed, 9 Oct 2013 14:14:52 +0000
(16:14 +0200)
Initialize statistics structure to 0 before passing it to the PMD.
This way, the unsupported fields will be 0.
Signed-off-by: Intel
lib/librte_ether/rte_ethdev.c
patch
|
blob
|
history
diff --git
a/lib/librte_ether/rte_ethdev.c
b/lib/librte_ether/rte_ethdev.c
index
7bbc66e
..
fbe2286
100644
(file)
--- 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);