[PATCH] net/gve: Update max_rx_pktlen to be based on MTU
Stephen Hemminger
stephen at networkplumber.org
Mon Oct 16 23:20:10 CEST 2023
On Mon, 16 Oct 2023 13:59:48 -0700
Joshua Washington <joshwash at google.com> wrote:
> Before this patch, max_rx_pktlen was always set to UINT16_MAX. This, in
> conjunction with the MTU fix, causes problems with testpmd, as setting the
> packet length with the --max-pkt-len flag causes the MTU to be set
> higher than possible due to underflow.
>
> As an example, setting --max-pkt-len=1460 (the default MTU on Google
> Cloud VMs) causes testpmd to set the following:
> mtu = 1460 - eth_overhead,
>
> where eth_overhead = dev->max_rx_pktlen - dev->max_mtu = 65535 - 1460.
>
> Thus, mtu = 1460 - 65535 + 1460 = 2921 due to underflow.
>
> Signed-off-by: Joshua Washington <joshwash at google.com>
This seems wrong and is not what other drivers do.
Other drivers give the absolute maximum in the dev_info so that
application can size accordingly.
More information about the dev
mailing list