DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/netvsc: report correct stats values
@ 2022-03-23  4:28 longli
  2022-03-23  8:40 ` David Marchand
  2022-03-23 14:58 ` Stephen Hemminger
  0 siblings, 2 replies; 3+ messages in thread
From: longli @ 2022-03-23  4:28 UTC (permalink / raw)
  To: dev, Stephen Hemminger; +Cc: Long Li

From: Long Li <longli@microsoft.com>

The netvsc should add to the values from the VF and report the sum.

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/netvsc/hn_ethdev.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 9b8d2f770a..53e8cc675c 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -800,8 +800,8 @@ static int hn_dev_stats_get(struct rte_eth_dev *dev,
 		stats->oerrors += txq->stats.errors;
 
 		if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
-			stats->q_opackets[i] = txq->stats.packets;
-			stats->q_obytes[i] = txq->stats.bytes;
+			stats->q_opackets[i] += txq->stats.packets;
+			stats->q_obytes[i] += txq->stats.bytes;
 		}
 	}
 
@@ -817,12 +817,12 @@ static int hn_dev_stats_get(struct rte_eth_dev *dev,
 		stats->imissed += rxq->stats.ring_full;
 
 		if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
-			stats->q_ipackets[i] = rxq->stats.packets;
-			stats->q_ibytes[i] = rxq->stats.bytes;
+			stats->q_ipackets[i] += rxq->stats.packets;
+			stats->q_ibytes[i] += rxq->stats.bytes;
 		}
 	}
 
-	stats->rx_nombuf = dev->data->rx_mbuf_alloc_failed;
+	stats->rx_nombuf += dev->data->rx_mbuf_alloc_failed;
 	return 0;
 }
 
-- 
2.32.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/netvsc: report correct stats values
  2022-03-23  4:28 [PATCH] net/netvsc: report correct stats values longli
@ 2022-03-23  8:40 ` David Marchand
  2022-03-23 14:58 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: David Marchand @ 2022-03-23  8:40 UTC (permalink / raw)
  To: longli; +Cc: dev, Stephen Hemminger, Long Li

On Wed, Mar 23, 2022 at 5:28 AM <longli@linuxonhyperv.com> wrote:
>
> From: Long Li <longli@microsoft.com>
>
> The netvsc should add to the values from the VF and report the sum.

We need a Fixes: tag.

>
> Signed-off-by: Long Li <longli@microsoft.com>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/netvsc: report correct stats values
  2022-03-23  4:28 [PATCH] net/netvsc: report correct stats values longli
  2022-03-23  8:40 ` David Marchand
@ 2022-03-23 14:58 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2022-03-23 14:58 UTC (permalink / raw)
  To: longli; +Cc: dev, Stephen Hemminger, Long Li

On Tue, 22 Mar 2022 21:28:25 -0700
longli@linuxonhyperv.com wrote:

> From: Long Li <longli@microsoft.com>
> 
> The netvsc should add to the values from the VF and report the sum.
> 
> Signed-off-by: Long Li <longli@microsoft.com>
> ---

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-23 14:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23  4:28 [PATCH] net/netvsc: report correct stats values longli
2022-03-23  8:40 ` David Marchand
2022-03-23 14:58 ` Stephen Hemminger

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).