* [PATCH] net/ixgbe: Put correct id values in ixgbevf_dev_xstats_get [not found] <20170307141824.69411-1-ibarnea@cisco.com> @ 2017-03-07 14:28 ` Ido Barnea (ibarnea) 2017-03-09 16:46 ` Ferruh Yigit 0 siblings, 1 reply; 3+ messages in thread From: Ido Barnea (ibarnea) @ 2017-03-07 14:28 UTC (permalink / raw) To: dev@dpdk.org; +Cc: helin.zhang@intel.com, konstantin.ananyev@intel.com 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. Signed-off-by: Ido Barnea <ibarnea@cisco.com> --- drivers/net/ixgbe/ixgbe_ethdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 7169007..b699252 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3249,6 +3249,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); } -- 2.8.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net/ixgbe: Put correct id values in ixgbevf_dev_xstats_get 2017-03-07 14:28 ` [PATCH] net/ixgbe: Put correct id values in ixgbevf_dev_xstats_get Ido Barnea (ibarnea) @ 2017-03-09 16:46 ` Ferruh Yigit 2017-03-09 17:16 ` Ferruh Yigit 0 siblings, 1 reply; 3+ messages in thread From: Ferruh Yigit @ 2017-03-09 16:46 UTC (permalink / raw) To: Ido Barnea (ibarnea), dev@dpdk.org Cc: helin.zhang@intel.com, konstantin.ananyev@intel.com On 3/7/2017 2:28 PM, Ido Barnea (ibarnea) wrote: > 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. > > Signed-off-by: Ido Barnea <ibarnea@cisco.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/ixgbe: Put correct id values in ixgbevf_dev_xstats_get 2017-03-09 16:46 ` Ferruh Yigit @ 2017-03-09 17:16 ` Ferruh Yigit 0 siblings, 0 replies; 3+ messages in thread From: Ferruh Yigit @ 2017-03-09 17:16 UTC (permalink / raw) To: Ido Barnea (ibarnea), dev@dpdk.org Cc: helin.zhang@intel.com, konstantin.ananyev@intel.com On 3/9/2017 4:46 PM, Ferruh Yigit wrote: > On 3/7/2017 2:28 PM, Ido Barnea (ibarnea) wrote: >> 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. >> >> Signed-off-by: Ido Barnea <ibarnea@cisco.com> > > Acked-by: Ferruh Yigit <ferruh.yigit@intel.com> Applied to dpdk-next-net/master, thanks. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-09 17:16 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20170307141824.69411-1-ibarnea@cisco.com> 2017-03-07 14:28 ` [PATCH] net/ixgbe: Put correct id values in ixgbevf_dev_xstats_get Ido Barnea (ibarnea) 2017-03-09 16:46 ` Ferruh Yigit 2017-03-09 17:16 ` Ferruh Yigit
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).