diff options
author | Jordan Kim <jrkim@google.com> | 2021-10-11 08:36:49 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-11 23:25:36 +0100 |
commit | ea5d3455adf1f3d47130604e6d353b23c3ee4a50 (patch) | |
tree | 8556808c2767ac5f9d912a01507018b4dc3a5ad7 /drivers/net | |
parent | 4edf8249bcd1c554b1a34166ca4ea5630031ecf5 (diff) | |
download | linux-stable-ea5d3455adf1f3d47130604e6d353b23c3ee4a50.tar.gz linux-stable-ea5d3455adf1f3d47130604e6d353b23c3ee4a50.tar.bz2 linux-stable-ea5d3455adf1f3d47130604e6d353b23c3ee4a50.zip |
gve: Allow pageflips on larger pages
Half pages are just used for small enough packets. This change allows
this to also apply for systems with pages larger than 4 KB.
Fixes: 02b0e0c18ba75 ("gve: Rx Buffer Recycling")
Signed-off-by: Jordan Kim <jrkim@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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/google/gve/gve_rx.c b/drivers/net/ethernet/google/gve/gve_rx.c index 41b21b527470..98ba981cd534 100644 --- a/drivers/net/ethernet/google/gve/gve_rx.c +++ b/drivers/net/ethernet/google/gve/gve_rx.c @@ -302,7 +302,7 @@ static void gve_rx_flip_buff(struct gve_rx_slot_page_info *page_info, __be64 *sl static bool gve_rx_can_flip_buffers(struct net_device *netdev) { - return PAGE_SIZE == 4096 + return PAGE_SIZE >= 4096 ? netdev->mtu + GVE_RX_PAD + ETH_HLEN <= PAGE_SIZE / 2 : false; } |