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 restore the MTUs of the endpoints already resized when a later one fails. Notifiers can veto the shrink so the request can fail and the restore is best effort. v6: Address the comments from Simon Horman about the minimum mtu calculation in Patch 3 and coding style update in rmnet_vnd_update_dev_mtu in Patch 5. Also reword the commit text in Patch 5 to explicitly call out the impact of restoring MTU. v5: Split v4 into multiple patches for easier review as mentioned by Jakub Kicinski. https://lore.kernel.org/all/2026…@oss.qualcomm.com/ v4: https://lore.kernel.org/all/2026…@oss.qualcomm.com/ v3: https://lore.kernel.org/all/2026…@oss.qualcomm.com/ v2: https://lore.kernel.org/all/2026…@oss.qualcomm.com/ 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 | 108 +++++++++++++----- .../net/ethernet/qualcomm/rmnet/rmnet_vnd.h | 4 +- 4 files changed, 132 insertions(+), 58 deletions(-)
-- 2.34.1