Re: [PATCH net v2] usbnet: cap max_mtu for drivers without bind callback

From: Jakub Kicinski

Date: Wed Jul 29 2026 - 20:52:25 EST


On Mon, 27 Jul 2026 09:23:04 +0200 Laurent Vivier wrote:
> - if ((dev->driver_info->flags & FLAG_NOMAXMTU) == 0 &&
> - net->max_mtu > (dev->hard_mtu - net->hard_header_len))
> + if (dev->driver_info->flags & FLAG_NOMAXMTU)
> + net->max_mtu = ETH_MAX_MTU;
> + else
> net->max_mtu = dev->hard_mtu - net->hard_header_len;

Sashikos point out that this will causes issues for existing drivers in
both directions. Some drivers explicitly set max_mtu. So we need to move
the

net->max_mtu = ETH_MAX_MTU;

line before the call to ->bind ?
--
pw-bot: cr