On Thu, 22 Oct 2026 17:28:18 -0400
Ryan Wolfe <[email protected]> wrote:

> rte_eth_dev_configure() sets the MTU from rxmode.mtu without calling
> mtu_set, and keeps Rx queues that are already set up. Stopping the port
> and reconfiguring it with a larger MTU, or without
> RTE_ETH_RX_OFFLOAD_SCATTER, therefore skipped both the MTU change check
> and the Rx queue setup check. gve also never gave the device that MTU.
> 
> Even with the MTU programmed, a GQI device does not limit what it
> receives to it: on a network with a larger MTU it still delivers
> bigger frames, chained over several Rx buffers. So the configuration
> checks alone cannot keep chained mbufs from an application that did
> not enable scatter.
> 
> Move the configuration check into gve_rx_check_scatter() and call it
> from gve_dev_start() as well as gve_dev_mtu_set(), program the
> configured MTU into the device at start, and have the GQI Rx path drop
> a frame that spans more than one buffer, counted in the Rx errors,
> when the port has not enabled scatter. A dropped descriptor's mbuf is
> now freed, since the refill replaces it.
> 
> Fixes: cffdca824388 ("net/gve: refuse an MTU that needs Rx scatter when it is 
> off")
> 
> Reported-by: Stephen Hemminger <[email protected]>
> Signed-off-by: Ryan Wolfe <[email protected]>
> ---

Looks good applied to next-net

Reply via email to