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

Jakub Kicinski <[email protected]>
Newsgroups org.kernel.vger.linux-usb,org.kernel.vger.linux-kernel,org.kernel.vger.netdev,org.kernel.vger.stable
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.