From: Levend Sayar <levendsayar@gmail.com>
To: junfeng.guo@intel.com
Cc: dev@dpdk.org, Levend Sayar <levendsayar@gmail.com>
Subject: [PATCH] net/gve: add Rx/Tx queue statistics
Date: Sun, 19 Feb 2023 03:31:11 +0300 [thread overview]
Message-ID: <20230219003111.85508-1-levendsayar@gmail.com> (raw)
Google Virtual NIC PMD is enriched with rx/tx queue statistics info.
Signed-off-by: Levend Sayar <levendsayar@gmail.com>
---
drivers/net/gve/gve_ethdev.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c
index fef2458a16..2a6cb11da3 100644
--- a/drivers/net/gve/gve_ethdev.c
+++ b/drivers/net/gve/gve_ethdev.c
@@ -213,6 +213,7 @@ gve_dev_start(struct rte_eth_dev *dev)
}
}
+ dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
dev->data->dev_started = 1;
gve_link_update(dev, 0);
@@ -331,6 +332,9 @@ gve_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
stats->opackets += txq->packets;
stats->obytes += txq->bytes;
stats->oerrors += txq->errors;
+
+ stats->q_opackets[i] = txq->packets;
+ stats->q_obytes[i] = txq->bytes;
}
for (i = 0; i < dev->data->nb_rx_queues; i++) {
@@ -342,6 +346,10 @@ gve_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
stats->ibytes += rxq->bytes;
stats->ierrors += rxq->errors;
stats->rx_nombuf += rxq->no_mbufs;
+
+ stats->q_ipackets[i] = rxq->packets;
+ stats->q_ibytes[i] = rxq->bytes;
+ stats->q_errors[i] = rxq->errors;
}
return 0;
--
2.37.1 (Apple Git-137.1)
next reply other threads:[~2023-02-19 0:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-19 0:31 Levend Sayar [this message]
2023-02-19 20:15 ` [PATCH] net/gve: add Rx/Tx queue statistics Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230219003111.85508-1-levendsayar@gmail.com \
--to=levendsayar@gmail.com \
--cc=dev@dpdk.org \
--cc=junfeng.guo@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.