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:
2a6c96b
)
net/ixgbevf: set xstats id values
author
Ido Barnea
<ibarnea@cisco.com>
Thu, 9 Mar 2017 16:59:28 +0000
(16:59 +0000)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Tue, 4 Apr 2017 13:52:52 +0000
(15:52 +0200)
Without setting the id, calling xstats_get twice with same array causes
memory corruption.
Also, if IXGBEVF_NB_XSTATS will be different than 1 in the future,
this will cause issues.
Fixes:
156712ba40d3
("ixgbevf: add extending stats")
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
drivers/net/ixgbe/ixgbe_ethdev.c
patch
|
blob
|
history
diff --git
a/drivers/net/ixgbe/ixgbe_ethdev.c
b/drivers/net/ixgbe/ixgbe_ethdev.c
index
19b971d
..
4fd22c5
100644
(file)
--- a/
drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/
drivers/net/ixgbe/ixgbe_ethdev.c
@@
-3247,6
+3247,7
@@
ixgbevf_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
/* Extended stats */
for (i = 0; i < IXGBEVF_NB_XSTATS; i++) {
+ xstats[i].id = i;
xstats[i].value = *(uint64_t *)(((char *)hw_stats) +
rte_ixgbevf_stats_strings[i].offset);
}