This series adds the in-kernel data path for the SRv6 Mobile User
Plane (MUP) architecture defined in RFC 9433. SRv6 MUP integrates
GTP-U mobile traffic into an SRv6 transport domain by mapping the
5-tuple (TEID, QFI, R, U, PDU Session ID) into a single SID, allowing
operators to replace the GTP-U overlay between the gNB and the
upstream UPF with native SRv6 forwarding while keeping the radio side
unchanged.
The series implements the six MUP behaviors that an SRv6 MUP gateway
typically needs:
End.MAP (RFC 9433 Section 6.2) -- swap DA with the next SID
without consuming the SRH
End.M.GTP6.D (Section 6.3) -- IPv6/GTP-U to SRv6 headend encap
End.M.GTP6.D.Di (Section 6.4) -- drop-in mode variant of the above
(preserves the original outer DA at
SRH[0] and discards TEID/QFI)
End.M.GTP6.E (Section 6.5) -- SRv6 to IPv6/GTP-U egress encap
End.M.GTP4.E (Section 6.6) -- SRv6 to IPv4/GTP-U egress encap
H.M.GTP4.D (Section 6.7) -- IPv4/GTP-U to SRv6 headend encap
End.Limit (RFC 9433 Section 6.8) is intentionally out of scope.
All behaviors plug into the existing seg6_local lwtunnel framework, so
they are configurable through the standard "ip route ... encap
seg6local action ..." interface. No new netlink families are
introduced -- the new SEG6_LOCAL_MOBILE_* attributes extend
SEG6_LOCAL_MAX in an add-only way, and the new SEG6_LOCAL_ACTION_*
values are appended.
The egress behaviors (End.M.GTP4.E and End.M.GTP6.E) accept an
optional per-route pdu_type attribute that is the sole control
for inserting the GTP-U PDU Session Container (3GPP TS 38.415 Section
5.5.2). When pdu_type is set (dl/ul/0..15), every emitted GTP-U
packet carries the container with that PDU Type and the QFI extracted
from Args.Mob.Session. When pdu_type is unset, the egress emits
a short GTPv1-U header with no container. pdu_type must be
configured on egress routes serving 5G N3 traffic; omitting it is
intended only for LTE-only / S1-U-style deployments where no PDU
Session Container is exchanged.
The matching iproute2 patch series has been posted to iproute2-next:
https://lore.kernel.org/netdev/[email protected]/
Link: https://www.rfc-editor.org/rfc/rfc9433
Signed-off-by: Yuya Kusakabe <[email protected]>
---
Changes in v2 (all reported by netdev CI, except the End.MAP one
which was caught while reviewing v1):
- patch 1 (End.MAP): drop the explicit hop_limit decrement and
the hop_limit <= 1 ICMPv6 Time Exceeded check; ip6_forward()
on the way out already does both, so the explicit ones caused
a double decrement (verified hlim=64 -> 62 instead of 63).
Now consistent with End / End.X / End.M.GTP*.
- patch 3 (End.M.GTP6.E): add missing #include
<net/ip6_checksum.h> to fix clang / allmodconfig build.
- selftests: silence shellcheck false positives (SC2034/SC2154)
and sort TEST_PROGS entries alphabetically.
- Link to v1:
https://lore.kernel.org/netdev/[email protected]
---
Yuya Kusakabe (7):
seg6: add End.MAP behavior
seg6: add End.M.GTP4.E behavior
seg6: add End.M.GTP6.E behavior
seg6: add End.M.GTP6.D behavior
seg6: add End.M.GTP6.D.Di behavior
seg6: add H.M.GTP4.D behavior
Documentation: networking: add seg6_mobile guide
Documentation/networking/index.rst | 1 +
Documentation/networking/seg6_mobile.rst | 236 ++
include/net/dropreason-core.h | 40 +
include/uapi/linux/seg6_local.h | 17 +
net/ipv6/seg6_local.c | 2660 ++++++++++++++++++--
tools/testing/selftests/net/Makefile | 6 +
.../selftests/net/srv6_end_m_gtp4_e_test.sh | 486 ++++
.../selftests/net/srv6_end_m_gtp6_d_di_test.sh | 427 ++++
.../selftests/net/srv6_end_m_gtp6_d_test.sh | 497 ++++
.../selftests/net/srv6_end_m_gtp6_e_test.sh | 402 +++
tools/testing/selftests/net/srv6_end_map_test.sh | 103 +
.../testing/selftests/net/srv6_h_m_gtp4_d_test.sh | 487 ++++
12 files changed, 5155 insertions(+), 207 deletions(-)
---
base-commit: 98878ed91b68a3150126fccef125ee7b1bb86ab2
change-id: 20260504-seg6-mobile-f78e282e615c
Best regards,
--
Yuya Kusakabe <[email protected]>