diff options
author | Catherine Sullivan <csully@google.com> | 2021-10-11 18:36:50 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-12 01:25:36 +0300 |
commit | 1b4d1c9bab091ac6e20a3ff80c30c5cefe192bf4 (patch) | |
tree | 4f81bb9f70ade132fa77d5a5dd63fb360b810126 /drivers/net | |
parent | ea5d3455adf1f3d47130604e6d353b23c3ee4a50 (diff) | |
download | linux-1b4d1c9bab091ac6e20a3ff80c30c5cefe192bf4.tar.xz |
gve: Track RX buffer allocation failures
The rx_buf_alloc_fail counter wasn't getting updated.
Fixes: 433e274b8f7b0 ("gve: Add stats for gve.")
Signed-off-by: Catherine Sullivan <csully@google.com>
Signed-off-by: Jeroen de Borst <jeroendb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/google/gve/gve_rx.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/google/gve/gve_rx.c b/drivers/net/ethernet/google/gve/gve_rx.c index 98ba981cd534..95bc4d8a1811 100644 --- a/drivers/net/ethernet/google/gve/gve_rx.c +++ b/drivers/net/ethernet/google/gve/gve_rx.c @@ -532,8 +532,13 @@ static bool gve_rx_refill_buffers(struct gve_priv *priv, struct gve_rx_ring *rx) gve_rx_free_buffer(dev, page_info, data_slot); page_info->page = NULL; - if (gve_rx_alloc_buffer(priv, dev, page_info, data_slot)) + if (gve_rx_alloc_buffer(priv, dev, page_info, + data_slot)) { + u64_stats_update_begin(&rx->statss); + rx->rx_buf_alloc_fail++; + u64_stats_update_end(&rx->statss); break; + } } } fill_cnt++; |