[PATCH net v5 0/5] net: qualcomm: rmnet: Update MTU handling during format changes

From: Subash Abhinov Kasiviswanathan

Date: Tue Nov 17 2026 - 01:09:25 EST


This patch series addresses the code review comments raised by Sashiko
as part of the rmnet coalescing series. Changes were tested on QEMU only
and not on real hardware.

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, which can leave
a rmnet device with an MTU larger than the real device can carry, fail
creation of the first device, or leave a failed request half applied.

Patch 1 accounts for the V5 egress checksum header in the headroom, so
devices using V5 checksum offload no longer get an MTU that is too
large.
Patch 2 applies IFLA_RMNET_FLAGS before sizing the first device in
rmnet newlink, so the MTU matches the data format which is actually
used.
Patch 3 fixes the unsigned underflow when the real device MTU is below
the headroom and clamps the computed MTU to RMNET_MAX_PACKET_SIZE so
that a jumbo real device no longer makes the creation of the first
device fail.
Patch 4 computes the new data format locally and publishes the format
and any mux id change only after the MTUs have been updated, so the
data path never sees a format whose headers do not fit the MTUs. rmnet
newlink now also resizes existing devices and the real error is returned
instead of -1.
Patch 5 resizes endpoints with dev_set_mtu() so that MTU notifiers and
link notifications run, and restores the endpoints already resized when
a later one fails.

v5: v4 fixed all of these in a single patch. It was too large to review
comfortably, so this version splits it into a five patch series. The
resulting code is identical to v4 and there are no functional changes.
v4: https://lore.kernel.org/all/20261108075727.2031331-1-subash.a.kasiviswanathan@xxxxxxxxxxxxxxxx/
v3: https://lore.kernel.org/all/20261009084351.317632-2-subash.a.kasiviswanathan@xxxxxxxxxxxxxxxx/
v2: https://lore.kernel.org/all/20261008005543.2630828-2-subash.a.kasiviswanathan@xxxxxxxxxxxxxxxx/

Assisted-by: LLM

Subash Abhinov Kasiviswanathan (5):
net: qualcomm: rmnet: Account for V5 checksum header in headroom
net: qualcomm: rmnet: Size the first device from the requested data
format
net: qualcomm: rmnet: Fix MTU underflow and clamp to the maximum
packet size
net: qualcomm: rmnet: Publish data format and mux_id only after the
MTU update
net: qualcomm: rmnet: Resize endpoints with dev_set_mtu() and restore
on failure

.../ethernet/qualcomm/rmnet/rmnet_config.c | 77 +++++++-----
.../ethernet/qualcomm/rmnet/rmnet_config.h | 1 +
.../net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 110 +++++++++++++-----
.../net/ethernet/qualcomm/rmnet/rmnet_vnd.h | 4 +-
4 files changed, 133 insertions(+), 59 deletions(-)

--
2.34.1