mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RFC net-next v5 0/2] seg6: add support for the SRv6 End.MAP behavior
@ 2026-10-02 12:31 Yuya Kusakabe
  2026-10-02 12:31 ` [PATCH RFC net-next v5 1/2] " Yuya Kusakabe
  2026-10-02 12:31 ` [PATCH RFC net-next v5 2/2] selftests: seg6: add selftest for " Yuya Kusakabe
  0 siblings, 2 replies; 3+ messages in thread
From: Yuya Kusakabe @ 2026-10-02 12:31 UTC (permalink / raw)
  To: Andrea Mayer, Andrea Mayer, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, David Ahern,
	Ido Schimmel, Shuah Khan
  Cc: Justin Iurman, Florian Westphal, Fernando Fernandez Mancera,
	linux-kernel, netdev, linux-kselftest, Yuya Kusakabe

End.MAP is the simplest of the SRv6 Mobile User Plane (RFC 9433)
behaviors: it replaces the IPv6 destination address with the
configured mapped SID and forwards via the IPv6 FIB without consuming
the SRH.  This series is the first per-behavior rebuild of the SRv6
Mobile User Plane v2 submission [1], split one series per behavior
following upstream review.

Because End.MAP is the first behavior to land, this series also
introduces the SRv6 Mobile User Plane lwtunnel framework that the
subsequent per-behavior series plug into:

  * a new LWTUNNEL_ENCAP_SEG6_MOBILE encap type with a
    CONFIG_IPV6_SEG6_MOBILE build option,
  * net/ipv6/seg6_mobile.c, which hosts the action dispatch table,
  * include/uapi/linux/seg6_mobile.h, a dedicated SEG6_MOBILE_*
    attribute namespace, so that attributes whose semantics differ
    between the mobility behaviors and the RFC 8986 behaviors do
    not overload the SEG6_LOCAL_* table.

This is an RFC because one open question remains: whether End.MAP
should live under the new encap type, as here, or as a seg6local
action.  I picked the former for the separate attribute namespace
described above.  Following the v2 discussion, netfilter hook
integration, VRF support and SRv6-specific drop reasons are left out
of this initial series and will be revisited separately.

A matching iproute2 series adding the "seg6mobile" encap keyword
follows shortly after this posting, since the selftest needs it to
run.

[1] https://lore.kernel.org/netdev/20260505-seg6-mobile-v2-0-9e8022bdfdb6@gmail.com/

Signed-off-by: Yuya Kusakabe <yuya.kusakabe@gmail.com>
---
Changes in v5:
- Rebase on net-next and pass the SRH to seg6_hmac_validate_skb(),
  following commit f9cb4d296d81 ("seg6: fix HMAC validation when an
  extension header precedes the SRH")
- Drop with kfree_skb_reason(), reporting SKB_DROP_REASON_NOMEM when
  the skb cannot be made writable
- Forward packets whose Routing Header is not an SRH and has Segments
  Left 0 (RFC 8200), and packets whose header chain ends
  in No Next Header, instead of dropping them; extend the selftest
  to cover both
- Link to v4: https://lore.kernel.org/r/20260925-seg6-mobile-end-map-v4-0-457733c08586@gmail.com

Changes in v4:
- Fix the checkpatch line-length reports
- Link to v3: https://lore.kernel.org/r/20260917-seg6-mobile-end-map-v3-0-9890a60ac6a7@gmail.com

Changes in v3:
- Silence the shellcheck SC2154 reports for the namespace variables
  setup_ns assigns
- Fix the checkpatch alignment and __func__ reports in the selftest
  helper
- Link to v2: https://lore.kernel.org/r/20260901-seg6-mobile-end-map-v2-0-1629bfc166eb@gmail.com

Changes in v2:
- End.MAP: patch the L4 checksum also for an SRH with no segments
  left and for first fragments; selftest cases added for both.
- Use nla_parse_nested() for the nested attributes.
- Rework the selftest helper and cases; wait for counters instead of
  sampling them; add CONFIG_IPV6_SEG6_MOBILE to the selftests config.
- Rename the SEG6_MOBILE_NH6 attribute and the nh6 keyword to
  SEG6_MOBILE_MAPPED_SID/mapped_sid to match the RFC 9433 "mapped
  SID" wording and avoid clashing with the SEG6_LOCAL_NH6 nexthop
  semantics.
- Trim the Kconfig help; add Assisted-by tags.
- Link to v1: https://lore.kernel.org/r/20260710-seg6-mobile-end-map-v1-0-99be02d68143@gmail.com

---
Yuya Kusakabe (2):
      seg6: add support for the SRv6 End.MAP behavior
      selftests: seg6: add selftest for End.MAP behavior

 include/net/seg6.h                               |   8 +
 include/uapi/linux/lwtunnel.h                    |   1 +
 include/uapi/linux/seg6_mobile.h                 |  61 ++
 net/core/lwtunnel.c                              |   2 +
 net/ipv6/Kconfig                                 |  10 +
 net/ipv6/Makefile                                |   1 +
 net/ipv6/seg6.c                                  |   7 +
 net/ipv6/seg6_mobile.c                           | 723 +++++++++++++++++++++++
 tools/testing/selftests/net/.gitignore           |   1 +
 tools/testing/selftests/net/Makefile             |   2 +
 tools/testing/selftests/net/config               |   1 +
 tools/testing/selftests/net/srv6_end_map_test.sh | 456 ++++++++++++++
 tools/testing/selftests/net/srv6_mobile_send.c   | 283 +++++++++
 13 files changed, 1556 insertions(+)
---
base-commit: eb0c18404c8943356f4aa164e5db9067b79ea93c
change-id: 20260523-seg6-mobile-end-map-9cec24191817

Best regards,
--  
Yuya Kusakabe <yuya.kusakabe@gmail.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-02 12:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-02 12:31 [PATCH RFC net-next v5 0/2] seg6: add support for the SRv6 End.MAP behavior Yuya Kusakabe
2026-10-02 12:31 ` [PATCH RFC net-next v5 1/2] " Yuya Kusakabe
2026-10-02 12:31 ` [PATCH RFC net-next v5 2/2] selftests: seg6: add selftest for " Yuya Kusakabe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®