Skip to content

Commit

Permalink
gve: Track RX buffer allocation failures
Browse files Browse the repository at this point in the history
[ Upstream commit 1b4d1c9 ]

The rx_buf_alloc_fail counter wasn't getting updated.

Fixes: 433e274 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
catSully012 authored and gregkh committed Nov 18, 2021
1 parent fd2c903 commit 6b08451
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/ethernet/google/gve/gve_rx.c
Expand Up @@ -514,8 +514,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++;
Expand Down

0 comments on commit 6b08451

Please sign in to comment.