]> git.dujemihanovic.xyz Git - linux.git/commit
gve: Account for stopped queues when reading NIC stats
authorShailend Chand <shailend@google.com>
Wed, 1 May 2024 23:25:47 +0000 (23:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 May 2024 13:35:34 +0000 (14:35 +0100)
commitaf9bcf910b1f86244f39e15e701b2dc564b469a6
treee35c9408160bba58a32035c2ec6a2957acbf6420
parent770f52d5a0ed9ea3e3b8f04927eac520cab97935
gve: Account for stopped queues when reading NIC stats

We now account for the fact that the NIC might send us stats for a
subset of queues. Without this change, gve_get_ethtool_stats might make
an invalid access on the priv->stats_report->stats array.

Tested-by: Mina Almasry <almasrymina@google.com>
Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Signed-off-by: Shailend Chand <shailend@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/google/gve/gve_ethtool.c