From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj2-f12.google.com (mail-pj2-f12.google.com [74.125.227.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 740344A384A for ; Wed, 16 Sep 2026 21:38:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.227.140 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789594706; cv=none; b=nrelUprV22pb6fQKuAeBP6qksq4bwCBYT+v9rYs0XowrgpXhitbz7ShoEbszjclJO9aykOYCZr9x9Yv/I09ZJPIMB8qhJvHQ9R9TkmZcSaPhraX+ZopBSMccKbyewKxbB6jyjBGFt2efpNEwWlQenvG7T8xfI8D+/Ln5QTav+PA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789594706; c=relaxed/simple; bh=1V7NAVhDtdqfQFve7uz10cEy94SG92SANc77UF7mCsE=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=e6/yGDiVi6hSIDsXV6Bki+wx7+ibUFXqB8gcPPY3Evp3fS1LvBVtpTZRt6kds/w9vLKj/9uF+GnJPE8QK52/kWphnZMmkiLXue4kAcaUlJpUoD9hGN9dqzcbRpfg/HsM7tuzpWuNMuB8rVh3sj2VwQSCPu0yXtA1z5Urg/Ow6S8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EhwYfTIs; arc=none smtp.client-ip=74.125.227.140 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EhwYfTIs" Received: by mail-pj2-f12.google.com with SMTP id 98e67ed59e1d1-398a147688bso142998a91.1 for ; Wed, 16 Sep 2026 14:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1789594697; x=1790199497; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=8b7NmZ7yoxdeKfo/UCXE/FVCiKRGZaH7RDhem89BcjA=; b=EhwYfTIsUsrUmQo3YUCeBuAc1ztxy72XlbzWnMfoTQ7V6YILnFkBKjnX8n2M8lY0Rc NOI61kKKjjcjS2XKqzmrbiuT+6X/smSukQspcjrYiqXsdJgRNDWB49oz1UyZU++y8Dbg gEPkxj5WTb1Dc7DODjwZKCyWbbUQ1n71nlj4J/cTSDKpLE3yFqs2OXZ9E2HHUE2u1Vrg NgS/BIoj07ONGhZQE+07xO8MrSn7QCNQlaMo5NvWeMABzMouGX+8QnlFlaYgUYICtIot 8m9McIDEaHiFuLCXZGBqLcR05UJKPJSOv+Q0oziGBI4r/ZeV3i8K3VEhMZ1ua7MbBwNi dHUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789594697; x=1790199497; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=8b7NmZ7yoxdeKfo/UCXE/FVCiKRGZaH7RDhem89BcjA=; b=lAoM+89jHJ+bLZ+VVNeBXcof/oxMqk/ThhZbJuM7yxnsLrrwlGYyjWyevjO/KGGCxh qM/FQpw68h6aUdSg9LKjpmgUdjzJveNtcMsviYW/Z6vmIVQ7c3S+OyRk6eY9g4PAGDC1 gHwE28LEJGV5BZ3BNHXUKHSAI6i84IYwcjJ2wT2hLondcmqusAU3q+sm/ELENKX+dp1p sc3yIIlpK+PK6cM4w0rLq1O9QtbV0uPnohLRR0GL+zDmWtZC9dxkWcvNgFi7EN2In34+ uTSPTJGdtWFQLL45wfnMFVy2jnD7XG7KjchvSPWWmQ53lnj/VR7GQxAkAQ9MyLFz6OvP c+1A== X-Forwarded-Encrypted: i=1; AKwUvBwJ2QfqNhIbA/ChaPc67OwOX4PWLdsAU32SLzsep/jZUOwE0ApkWvxFK/oHD1Pj7cGKr7desxQXhO8u+vk=@vger.kernel.org X-Gm-Message-State: AFuF++n4zCLsOfs4WSDf3e62F6Ko5DY12WD+AXitWb3PtBmfUPSfBCXL WuOaKI5gTdI6Kg0J/Tx2F5inndGtgXRS2d8hj7DhcO/MU95EtUlsvat03x6Gkqfz X-Gm-Gg: AYBFou2xQg2XedDfu5DZ5dwy2UJj6fZEStI1J3UKX/acagxkMMHKqatipVmTXliBKmx fOdx96f5mvLzm9+1IA70oetSx8uEJx5yLkMXsxTyLCeqV/0dUI6708t9ZzgMgflw54pvptbFFNK yLQGch+z6n49TXiI+LO/Na9mQ2oaZTtWeinbu81PK3su33dk41/r1IqOIhp6I44OOR/001cfTuW RIGvA4TYs8A7p5NnsfKV74Z2tI0dOqHakhmG1bN0N41jjWuw7TEwVB//0dZGWTgKAgms90cj0/x U/MrJUu5tPipBp9xTkFKZN4wTAKQRWik4VZyjzMpcFu2B3eQXcxicO1ic2Pp2tADA5t5VgbUnGA MmUJj1hnjUaestwn0NC72SfC7pxH9bmB+HuYpp+Up6sjsWYTmeglkoeJvZDKgDCHFx4m8XxQYga JwRpfcIz6esELP/J2AY/UjEIVCfy5iGGSYwTvSJGTieRuvf9+E9+ZTvbzz92hRHGKI7uE6iR8LJ VFn3YC9dQ== X-Received: by 2002:a17:90b:33c9:b0:39e:1bff:b383 with SMTP id 98e67ed59e1d1-39e1e51bdf8mr9529767a91.24.1789594697296; Wed, 16 Sep 2026 14:38:17 -0700 (PDT) Received: from [163.43.103.131] ([163.43.103.131]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-39e35d9f81asm1379913a91.3.2026.09.16.14.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2026 14:38:16 -0700 (PDT) From: Yuya Kusakabe Subject: [PATCH RFC net-next v3 0/2] seg6: add support for the SRv6 End.MAP behavior Date: Thu, 17 Sep 2026 06:38:11 +0900 Message-Id: <20260917-seg6-mobile-end-map-v3-0-9890a60ac6a7@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAEMMq2oC/22OMQ7CMAxFr4IyYxSnJSVMSEgcgBUxNKkpQTRFT YmKqt6dNAwwMH7b/z2PzFNnybPtYmQdBett62LIlgtmrqWrCWwVMxNcSL4WGXiqJTSttncCchU 05QOUISNyVLjBgsXmo6OLHRL1xI6H/Txz1IOjoWfnz4F/6huZfmbP66v1fdu90h8BUzEpC+R/l QGBg1KauKjkBvNsVzelva9M2yRDEF+G4vifISIDpVD6YlBK0r+MaZrep6G7Hh0BAAA= X-Change-ID: 20260523-seg6-mobile-end-map-9cec24191817 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@vger.kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, Yuya Kusakabe X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4019; i=yuya.kusakabe@gmail.com; h=from:subject:message-id; bh=1V7NAVhDtdqfQFve7uz10cEy94SG92SANc77UF7mCsE=; b=owEBbQKS/ZANAwAIASrX0XUqXRtNAcsmYgBqqwxELTmJz2ms0DOECTQHhPqlyRBZDfdvxB1ic F4bv24nMvmJAjMEAAEIAB0WIQTaB7usAfxNKMeqa6Yq19F1Kl0bTQUCaqsMRAAKCRAq19F1Kl0b TcUsD/9wXFp+TUEYjZXodCo3uWdvpU1kf6wfPSZIYESbrnL/oxsgwh1rp0hMeIX9z5o4/TDut3m wG9Kgog3LBoKj5Lmz/fFFsVsVM/ExSu2Y43sFqD5InkgTYmQ5TJzO05yGCbq9S0krV6ElAt8wBA D/8Ps8kfMDyfWDxYmKr8f+Swk6uYXJWRZYL1A8FAKly9vZao0H4j9T0QIABDjqnqsJ7QCuy7oQ5 VTcDxDZwFELPeQlh+rnsYZyHZJHJy9QSEByjwOdhgydTzsmYtMeFInoo1RMAgYpAm8yeeFDYhHJ cPF1KMlGMdIGtXwkDFjbZT4ec2JytFqkNsMnYas7mEfCOq0+zNG6CXNm6aW2tkWZP0LwH5tn4jx lyBQeHzzbr2MwElJwBq7537pFuImZLg3YXwwekFSSoosGEsFP2iIrG57sq4E74j6mxpQs8ZuVqC Om9IPY2WJP1SvYdQkYJxCK8w1uLF+hWgokywudmyo930QRt1KCK50ZDKF4FXU6bhMkMWL3fAJdd zguXS3+jP4tpIEFwLq+qauVa3rYe8r3MFBQSSDys30tk8MHh+xskbAeaMVxUEHGW+f5Zi2AQOWG 9oEkoVKwEHLXE/3kOINM7KznxxZPuMBd6D6wyGopXEWHSjboy6NahOGZFnq5+SEpeKej70ib1Xs sG5HD0cgijmR0Kg== X-Developer-Key: i=yuya.kusakabe@gmail.com; a=openpgp; fpr=DA07BBAC01FC4D28C7AA6BA62AD7D1752A5D1B4D 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 layout follows the discussion on the v2 thread; feedback on it from the lwtunnel maintainers is particularly welcome. Per the same discussion, netfilter hook integration, VRF support and SRv6-specific drop reasons are left out of this initial series and will be revisited separately. The LLM review of v2 flagged that seg6_hmac_validate_skb() reads the SRH from skb_transport_header(), which on this path still points at the first extension header. seg6_local.c reaches the helper the same way, so End.MAP inherits the behavior rather than introducing it; a fix, if wanted, belongs outside this series. 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 --- 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 | 701 +++++++++++++++++++++++ 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 | 400 +++++++++++++ tools/testing/selftests/net/srv6_mobile_send.c | 262 +++++++++ 13 files changed, 1457 insertions(+) --- base-commit: 87b80c2f6b05cad9f0ff9136709c62a0f59923e3 change-id: 20260523-seg6-mobile-end-map-9cec24191817 Best regards, -- Yuya Kusakabe