netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gve: Fix RX_BUFFERS_POSTED stat to report per-queue fill_cnt
@ 2025-05-27 13:08 Alok Tiwari
  2025-05-27 23:46 ` Harshitha Ramamurthy
  2025-05-29  9:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Alok Tiwari @ 2025-05-27 13:08 UTC (permalink / raw)
  To: ziweixiao, joshwash, willemb, pkaligineedi, pabeni, kuba,
	jeroendb, hramamurthy, andrew+netdev, davem, edumazet, netdev
  Cc: alok.a.tiwari, linux-kernel, darren.kenny

Previously, the RX_BUFFERS_POSTED stat incorrectly reported the
fill_cnt from RX queue 0 for all queues, resulting in inaccurate
per-queue statistics.
Fix this by correctly indexing priv->rx[idx].fill_cnt for each RX queue.

Fixes: 24aeb56f2d38 ("gve: Add Gvnic stats AQ command and ethtool show/set-priv-flags.")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
 drivers/net/ethernet/google/gve/gve_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index c3791cf23c87..d561d45021a5 100644
--- a/drivers/net/ethernet/google/gve/gve_main.c
+++ b/drivers/net/ethernet/google/gve/gve_main.c
@@ -2153,7 +2153,7 @@ void gve_handle_report_stats(struct gve_priv *priv)
 			};
 			stats[stats_idx++] = (struct stats) {
 				.stat_name = cpu_to_be32(RX_BUFFERS_POSTED),
-				.value = cpu_to_be64(priv->rx[0].fill_cnt),
+				.value = cpu_to_be64(priv->rx[idx].fill_cnt),
 				.queue_id = cpu_to_be32(idx),
 			};
 		}
-- 
2.47.1


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

* Re: [PATCH] gve: Fix RX_BUFFERS_POSTED stat to report per-queue fill_cnt
  2025-05-27 13:08 [PATCH] gve: Fix RX_BUFFERS_POSTED stat to report per-queue fill_cnt Alok Tiwari
@ 2025-05-27 23:46 ` Harshitha Ramamurthy
  2025-05-29  9:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Harshitha Ramamurthy @ 2025-05-27 23:46 UTC (permalink / raw)
  To: Alok Tiwari
  Cc: ziweixiao, joshwash, willemb, pkaligineedi, pabeni, kuba,
	jeroendb, andrew+netdev, davem, edumazet, netdev, linux-kernel,
	darren.kenny

On Tue, May 27, 2025 at 6:08 AM Alok Tiwari <alok.a.tiwari@oracle.com> wrote:
>
> Previously, the RX_BUFFERS_POSTED stat incorrectly reported the
> fill_cnt from RX queue 0 for all queues, resulting in inaccurate
> per-queue statistics.
> Fix this by correctly indexing priv->rx[idx].fill_cnt for each RX queue.
>
> Fixes: 24aeb56f2d38 ("gve: Add Gvnic stats AQ command and ethtool show/set-priv-flags.")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
>  drivers/net/ethernet/google/gve/gve_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch looks okay, but it needs to be prefixed with [PATCH net] since
it's a fix.

Thanks,
Harshitha
>
> diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
> index c3791cf23c87..d561d45021a5 100644
> --- a/drivers/net/ethernet/google/gve/gve_main.c
> +++ b/drivers/net/ethernet/google/gve/gve_main.c
> @@ -2153,7 +2153,7 @@ void gve_handle_report_stats(struct gve_priv *priv)
>                         };
>                         stats[stats_idx++] = (struct stats) {
>                                 .stat_name = cpu_to_be32(RX_BUFFERS_POSTED),
> -                               .value = cpu_to_be64(priv->rx[0].fill_cnt),
> +                               .value = cpu_to_be64(priv->rx[idx].fill_cnt),
>                                 .queue_id = cpu_to_be32(idx),
>                         };
>                 }
> --
> 2.47.1
>

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

* Re: [PATCH] gve: Fix RX_BUFFERS_POSTED stat to report per-queue fill_cnt
  2025-05-27 13:08 [PATCH] gve: Fix RX_BUFFERS_POSTED stat to report per-queue fill_cnt Alok Tiwari
  2025-05-27 23:46 ` Harshitha Ramamurthy
@ 2025-05-29  9:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-29  9:10 UTC (permalink / raw)
  To: ALOK TIWARI
  Cc: ziweixiao, joshwash, willemb, pkaligineedi, pabeni, kuba,
	jeroendb, hramamurthy, andrew+netdev, davem, edumazet, netdev,
	linux-kernel, darren.kenny

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 27 May 2025 06:08:16 -0700 you wrote:
> Previously, the RX_BUFFERS_POSTED stat incorrectly reported the
> fill_cnt from RX queue 0 for all queues, resulting in inaccurate
> per-queue statistics.
> Fix this by correctly indexing priv->rx[idx].fill_cnt for each RX queue.
> 
> Fixes: 24aeb56f2d38 ("gve: Add Gvnic stats AQ command and ethtool show/set-priv-flags.")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> 
> [...]

Here is the summary with links:
  - gve: Fix RX_BUFFERS_POSTED stat to report per-queue fill_cnt
    https://git.kernel.org/netdev/net/c/f41a94aade12

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-05-29  9:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-27 13:08 [PATCH] gve: Fix RX_BUFFERS_POSTED stat to report per-queue fill_cnt Alok Tiwari
2025-05-27 23:46 ` Harshitha Ramamurthy
2025-05-29  9:10 ` patchwork-bot+netdevbpf

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