From: Yuya Kusakabe <yuya.kusakabe@gmail.com>
To: David Ahern <dsahern@kernel.org>, netdev@vger.kernel.org
Cc: Andrea Mayer <andrea.mayer@uniroma2.it>,
Andrea Mayer <andrea@common-net.org>,
Yuya Kusakabe <yuya.kusakabe@gmail.com>
Subject: [PATCH RFC iproute2-next 1/2] uapi: sync lwtunnel.h and add seg6_mobile.h
Date: Fri, 10 Jul 2026 21:18:18 +0900 [thread overview]
Message-ID: <20260710-seg6-mobile-end-map-v1-1-970275f3d80b@gmail.com> (raw)
In-Reply-To: <20260710-seg6-mobile-end-map-v1-0-970275f3d80b@gmail.com>
Signed-off-by: Yuya Kusakabe <yuya.kusakabe@gmail.com>
---
include/uapi/linux/lwtunnel.h | 1 +
include/uapi/linux/seg6_mobile.h | 58 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+)
diff --git a/include/uapi/linux/lwtunnel.h b/include/uapi/linux/lwtunnel.h
index 9d22961be619..b5adca10a9f1 100644
--- a/include/uapi/linux/lwtunnel.h
+++ b/include/uapi/linux/lwtunnel.h
@@ -16,6 +16,7 @@ enum lwtunnel_encap_types {
LWTUNNEL_ENCAP_RPL,
LWTUNNEL_ENCAP_IOAM6,
LWTUNNEL_ENCAP_XFRM,
+ LWTUNNEL_ENCAP_SEG6_MOBILE,
__LWTUNNEL_ENCAP_MAX,
};
diff --git a/include/uapi/linux/seg6_mobile.h b/include/uapi/linux/seg6_mobile.h
new file mode 100644
index 000000000000..b99eabe9a2a1
--- /dev/null
+++ b/include/uapi/linux/seg6_mobile.h
@@ -0,0 +1,58 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+ * SRv6 Mobile User Plane implementation
+ */
+#ifndef _LINUX_SEG6_MOBILE_H
+#define _LINUX_SEG6_MOBILE_H
+
+enum {
+ SEG6_MOBILE_UNSPEC,
+ SEG6_MOBILE_ACTION,
+ SEG6_MOBILE_NH6,
+ SEG6_MOBILE_COUNTERS,
+ __SEG6_MOBILE_MAX,
+};
+
+#define SEG6_MOBILE_MAX (__SEG6_MOBILE_MAX - 1)
+
+enum {
+ SEG6_MOBILE_ACTION_UNSPEC = 0,
+ /* swap IPv6 DA with the next SID, leave SRH untouched */
+ SEG6_MOBILE_ACTION_END_MAP = 1,
+
+ __SEG6_MOBILE_ACTION_MAX,
+};
+
+#define SEG6_MOBILE_ACTION_MAX (__SEG6_MOBILE_ACTION_MAX - 1)
+
+/* SRv6 Mobile Behavior counters are encoded as netlink attributes
+ * guaranteeing the correct alignment.
+ * Each counter is identified by a different attribute type (i.e.
+ * SEG6_MOBILE_CNT_PACKETS).
+ *
+ * - SEG6_MOBILE_CNT_PACKETS: identifies a counter that counts the number
+ * of packets that have been CORRECTLY processed by an SRv6 Behavior
+ * instance (i.e., packets that generate errors or are dropped are NOT
+ * counted).
+ *
+ * - SEG6_MOBILE_CNT_BYTES: identifies a counter that counts the total
+ * amount of traffic in bytes of all packets that have been CORRECTLY
+ * processed by an SRv6 Behavior instance (i.e., packets that generate
+ * errors or are dropped are NOT counted).
+ *
+ * - SEG6_MOBILE_CNT_ERRORS: identifies a counter that counts the number
+ * of packets that have NOT been properly processed by an SRv6 Behavior
+ * instance (i.e., packets that generate errors or are dropped).
+ */
+enum {
+ SEG6_MOBILE_CNT_UNSPEC,
+ SEG6_MOBILE_CNT_PACKETS,
+ SEG6_MOBILE_CNT_BYTES,
+ SEG6_MOBILE_CNT_ERRORS,
+ SEG6_MOBILE_CNT_PAD, /* pad for 64 bits values */
+ __SEG6_MOBILE_CNT_MAX,
+};
+
+#define SEG6_MOBILE_CNT_MAX (__SEG6_MOBILE_CNT_MAX - 1)
+
+#endif /* _LINUX_SEG6_MOBILE_H */
--
2.50.1
next prev parent reply other threads:[~2026-07-10 12:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 12:18 [PATCH RFC iproute2-next 0/2] seg6: add support for the SRv6 End.MAP behavior Yuya Kusakabe
2026-07-10 12:18 ` Yuya Kusakabe [this message]
2026-07-10 12:18 ` [PATCH RFC iproute2-next 2/2] seg6: add support for the End.MAP behavior under seg6mobile encap Yuya Kusakabe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260710-seg6-mobile-end-map-v1-1-970275f3d80b@gmail.com \
--to=yuya.kusakabe@gmail.com \
--cc=andrea.mayer@uniroma2.it \
--cc=andrea@common-net.org \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox