* [PATCH] net/ixgbe: fix per-queue stats for less queues
@ 2024-10-24 11:17 Morten Brørup
2024-10-24 15:15 ` Morten Brørup
0 siblings, 1 reply; 2+ messages in thread
From: Morten Brørup @ 2024-10-24 11:17 UTC (permalink / raw)
To: dev, Bruce Richardson; +Cc: Morten Brørup
Remove the requirement that the configured number of queues to provide
statistics for (RTE_ETHDEV_QUEUE_STAT_CNTRS) cannot be less than the
driver's max supported number of the same (IXGBE_QUEUE_STAT_COUNTERS).
Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ab37c37469..895d6e7169 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3385,7 +3385,8 @@ ixgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
stats->opackets = hw_stats->gptc;
stats->obytes = hw_stats->gotc;
- for (i = 0; i < IXGBE_QUEUE_STAT_COUNTERS; i++) {
+ for (i = 0; i < RTE_MIN(IXGBE_QUEUE_STAT_COUNTERS,
+ (typeof(IXGBE_QUEUE_STAT_COUNTERS))RTE_ETHDEV_QUEUE_STAT_CNTRS); i++) {
stats->q_ipackets[i] = hw_stats->qprc[i];
stats->q_opackets[i] = hw_stats->qptc[i];
stats->q_ibytes[i] = hw_stats->qbrc[i];
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH] net/ixgbe: fix per-queue stats for less queues
2024-10-24 11:17 [PATCH] net/ixgbe: fix per-queue stats for less queues Morten Brørup
@ 2024-10-24 15:15 ` Morten Brørup
0 siblings, 0 replies; 2+ messages in thread
From: Morten Brørup @ 2024-10-24 15:15 UTC (permalink / raw)
To: Anatoly Burakov, Vladimir Medvedkin; +Cc: dev, Bruce Richardson
Forwarding to the now official maintainers for review. :-)
Thank you for updating the MAINTAINERS file, Bruce.
PS: Please correct "fix"->"support" in the subject when merging, it was a typo.
> From: Morten Brørup [mailto:mb@smartsharesystems.com]
> Sent: Thursday, 24 October 2024 13.18
>
> Remove the requirement that the configured number of queues to provide
> statistics for (RTE_ETHDEV_QUEUE_STAT_CNTRS) cannot be less than the
> driver's max supported number of the same (IXGBE_QUEUE_STAT_COUNTERS).
>
> Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
> ---
> drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index ab37c37469..895d6e7169 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -3385,7 +3385,8 @@ ixgbe_dev_stats_get(struct rte_eth_dev *dev,
> struct rte_eth_stats *stats)
> stats->opackets = hw_stats->gptc;
> stats->obytes = hw_stats->gotc;
>
> - for (i = 0; i < IXGBE_QUEUE_STAT_COUNTERS; i++) {
> + for (i = 0; i < RTE_MIN(IXGBE_QUEUE_STAT_COUNTERS,
> +
> (typeof(IXGBE_QUEUE_STAT_COUNTERS))RTE_ETHDEV_QUEUE_STAT_CNTRS);
> i++) {
> stats->q_ipackets[i] = hw_stats->qprc[i];
> stats->q_opackets[i] = hw_stats->qptc[i];
> stats->q_ibytes[i] = hw_stats->qbrc[i];
> --
> 2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-24 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-24 11:17 [PATCH] net/ixgbe: fix per-queue stats for less queues Morten Brørup
2024-10-24 15:15 ` Morten Brørup
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).