RE: [PATCH net v4] net: qualcomm: rmnet: Update MTU handling during format changes
From: subash.a.kasiviswanathan
Date: Thu Nov 12 2026 - 15:36:52 EST
> -----Original Message-----
> From: Jakub Kicinski <kuba@xxxxxxxxxx>
> Sent: Thursday, November 12, 2026 9:33 AM
> To: Subash Abhinov Kasiviswanathan
> <subash.a.kasiviswanathan@xxxxxxxxxxxxxxxx>
> Cc: sean.tranchetti@xxxxxxxxxxxxxxxx; andrew+netdev@xxxxxxx;
> davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx; pabeni@xxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH net v4] net: qualcomm: rmnet: Update MTU handling
> during format changes
>
> On Sat, 7 Nov 2026 23:57:27 -0800 Subash Abhinov Kasiviswanathan wrote:
> > rmnet derives the MTU of its devices from the real device MTU minus
> > the headroom needed by the egress data format. Several problems exist
> > in how this is handled when the data format is set or changed:
> >
> > - The headroom only accounts for the V4 egress checksum header and
> > ignores the V5 one, so devices using V5 checksum offload get an MTU
> > that is too large for the real device.
> > - rmnet_newlink() sizes the first device from the port's data format
> > before the requested IFLA_RMNET_FLAGS have been applied, so the MTU
> > does not match the format that ends up being used.
> > - A real device MTU smaller than the headroom underflows the unsigned
> > subtraction, and a real device with a jumbo MTU makes the creation of
> > the first device fail while resizing an existing one clamps it.
> > - Existing endpoints are shrunk by writing dev->mtu directly. No MTU
> > notifiers run and userspace gets no link notification. The helper
> > also returns -1, and changelink flattens every failure into -EINVAL.
> > - rmnet_changelink() publishes the new data format before resizing the
> > endpoints and reverts it on failure, so the datapath can observe a
> > format whose headers do not fit the MTUs. A failed resize can also
> > leave some endpoints shrunk, and a mux_id change requested in the
> > same call is kept even though the call returned an error.
> >
> > Fix these by calculating the headroom from the requested data format,
>
> These should probably be 5 separate fixes in a patch series?
Sure, I'll split the patch and send it as a series.