[PATCH net-next v2 0/3] ipv4/ipv6: Cache pmtu on all paths of a multipath route

From: Vladimir Vdovin

Date: Tue Nov 10 2026 - 05:51:10 EST


IPv6 counterpart of commit 7d3f3b4367f3 ("net: ipv4: Cache pmtu for
all packet paths if multipath enabled"), deferred back then:
https://lore.kernel.org/netdev/ad29493c-9e48-4a94-b327-e47af3a9d137@xxxxxxxxxx/

Patch 1 keeps the IPv4 fan-out from raising a pmtu a path already has,
patch 2 creates or updates the PMTU exception on every path of an IPv6
multipath route, patch 3 adds the IPv6 variant of the pmtu.sh multipath
test and multipath tests with paths of different MTU for both families.
The IPv6 tests fail without patch 2.

Changes in v2, after the Sashiko review of v1:
- Update the PMTU exception a path already has instead of replacing
it, so a lower pmtu or a gateway learned from a redirect on another
path is kept. The pmtu is now propagated to the other paths on every
Packet Too Big, not only on the first one, when the looked up dst is
still a plain route and not a cached exception yet.
- Don't walk the siblings of a fib6_info that is no longer in the
tree: after NLM_F_REPLACE the old route and its siblings are freed
with the sibling list still linked.
- Describe the real mechanism in the commit message: ip6_update_pmtu()
looks the destination up without the protocol and ports of the
offending packet, so the multipath hash may pick another path than
the one that packet took.
- New patch 1: the same "a cached pmtu never goes up" rule for the IPv4
fan-out in update_or_create_fnhe().
- Add selftests with a different MTU behind each router, so a second,
lower Packet Too Big is covered as well.
- Rebased on net-next.
v1: https://lore.kernel.org/netdev/20261017210508.71849-1-deliran@xxxxxxxxxx/

Vladimir Vdovin (3):
ipv4: Don't raise a cached pmtu from another path's Packet Too Big
ipv6: Cache pmtu for all paths of a multipath route
selftests: net: pmtu: Add IPv6 and asymmetric multipath tests

net/ipv4/route.c | 8 +
net/ipv6/route.c | 124 ++++++++-----
tools/testing/selftests/net/pmtu.sh | 276 ++++++++++++++++++++++++----
3 files changed, 328 insertions(+), 80 deletions(-)


base-commit: d26955e57475434b59d43ba372b2a50d33d5e0ed
--
2.56.0