gve: add rx_critical_low_bufs ethtool statistic
Commit b65352a1bac6 ("gve: fix Rx queue stall on alloc failure") added a
starvation recovery timer to the DQO Rx path to prevent permanent queue
stalls under severe memory pressure.
Existing allocation failure counters (such as rx_buf_alloc_fail and
netdev queue alloc_fail) count every individual failed buffer allocation
and do not distinguish transient, recoverable failures from severe
buffer exhaustion where fewer than GVE_RX_BUF_THRESH_DQO (32) buffers
remain available to hardware and starvation recovery is required.
Add a new "rx_critical_low_bufs" ethtool statistic for the DQO Rx path
in gve_rx_post_buffers_dqo(). The counter increments on each refill
attempt that leaves fewer than GVE_RX_BUF_THRESH_DQO buffers available
to hardware and arms or reschedules the starvation recovery timer via
mod_timer(). It is exposed both per-queue (rx_critical_low_bufs[%u]) and
as an interface-wide aggregate (rx_critical_low_bufs).
Signed-off-by: Eddie Phillips <eddiephillips@google.com>
Signed-off-by: Jordan Rhee <jordanrhee@google.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
Reviewed-by: Joe Damato <joe@dama.to>
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20261124223009.331936-1-joshwash@google.com
Signed-off-by: Willem de Bruijn <willemb@google.com>
3 files changed