]> git.ipfire.org Git - thirdparty/linux.git/commit
gve: Allow ethtool to configure rx_buf_len
authorAnkit Garg <nktgrg@google.com>
Thu, 6 Nov 2025 19:27:45 +0000 (11:27 -0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 11 Nov 2025 01:36:37 +0000 (17:36 -0800)
commitd235bb213f411ace8317bcca3740a1008628ea9c
treec001367c17fe717dddef3777cda38591b85e6a9a
parent091a3b6ff2b98354270cb9278faad6d17d5aa27d
gve: Allow ethtool to configure rx_buf_len

Add support for getting and setting the RX buffer length via the
ethtool ring parameters (`ethtool -g`/`-G`). The driver restricts the
allowed buffer length to 2048 (SZ_2K) by default and allows 4096 (SZ_4K)
based on device options.

As XDP is only supported when the `rx_buf_len` is 2048, the driver now
enforces this in two places:
1.  In `gve_xdp_set`, rejecting XDP programs if the current buffer
    length is not 2048.
2.  In `gve_set_rx_buf_len_config`, rejecting buffer length changes if XDP
    is loaded and the new length is not 2048.

Signed-off-by: Ankit Garg <nktgrg@google.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Reviewed-by: Jordan Rhee <jordanrhee@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
Link: https://patch.msgid.link/20251106192746.243525-4-joshwash@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/google/gve/gve.h
drivers/net/ethernet/google/gve/gve_ethtool.c
drivers/net/ethernet/google/gve/gve_main.c