* [dpdk-dev] [PATCH v1] ether: fix overwriting driver-specific stats
@ 2016-07-19 11:05 Remy Horton
2016-07-21 22:15 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Remy Horton @ 2016-07-19 11:05 UTC (permalink / raw)
To: thomas.monjalon; +Cc: dev
After doing a driver callout to fill in the driver specific
parts of struct rte_eth_stats, rte_eth_stats_get() overwrites
the rx_nombuf member regardless of whether the driver itself
has assigned a value. Any driver-assigned value should take
priority.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Remy Horton <remy.horton@intel.com>
---
lib/librte_ether/rte_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 0a6e3f1..f62a9ec 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1490,8 +1490,8 @@ rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)
memset(stats, 0, sizeof(*stats));
RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_get, -ENOTSUP);
- (*dev->dev_ops->stats_get)(dev, stats);
stats->rx_nombuf = dev->data->rx_mbuf_alloc_failed;
+ (*dev->dev_ops->stats_get)(dev, stats);
return 0;
}
--
2.5.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH v1] ether: fix overwriting driver-specific stats
2016-07-19 11:05 [dpdk-dev] [PATCH v1] ether: fix overwriting driver-specific stats Remy Horton
@ 2016-07-21 22:15 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2016-07-21 22:15 UTC (permalink / raw)
To: Remy Horton; +Cc: dev
2016-07-19 12:05, Remy Horton:
> After doing a driver callout to fill in the driver specific
> parts of struct rte_eth_stats, rte_eth_stats_get() overwrites
> the rx_nombuf member regardless of whether the driver itself
> has assigned a value. Any driver-assigned value should take
> priority.
>
> Fixes: af75078fece3 ("first public release")
>
> Signed-off-by: Remy Horton <remy.horton@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-21 22:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-19 11:05 [dpdk-dev] [PATCH v1] ether: fix overwriting driver-specific stats Remy Horton
2016-07-21 22:15 ` Thomas Monjalon
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).