Thread (4 messages) flat view 4 messages, 2 authors, 11d ago

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

From: Laurent Vivier <hidden>
Date: 2026-07-30 07:31:04
Also in: linux-usb, lkml, stable

On 7/30/26 02:52, Jakub Kicinski wrote:
On Mon, 27 Jul 2026 09:23:04 +0200 Laurent Vivier wrote:
quoted
-		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 ?
So you mean like my v1?

Thanks,
Laurent
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help