Article View: linux.kernel.netdev
Article #27245Re: [PATCH net-next v6 6/6] selftests: seg6: add PSP flavor testing for SRv6 End.X
From: Andrea Mayer
Date: Sat, 05 Dec 2026 04:25
Date: Sat, 05 Dec 2026 04:25
79 lines
13216 bytes
13216 bytes
On Wed, 02 Dec 2026 16:46:32 +0800
Hangbin Liu <hangbin.liu@linux.dev> wrote:
Hi Hangbin,
thanks for the v6 and for taking in all the points of the v5 review.
Just one comment below:
> From: Hangbin Liu <liuhangbin@kylinos.cn>
>
> Add an End.X flavor scenario to srv6_end_flavors_test.sh that applies
> the same PSP policies as the End scenario, alone and combined with
> NEXT-C-SID, with every node bound through its adjacency (e.g. 4>2 for
> rt-4 towards rt-2, 2>h towards the host).
>
> Extend policy elements to <nodeid:op:act>, with <op> specifying the
> flavors and <act> selecting the action. Encode the adjacency in End.X
> SIDs, for example fcff:3::400a and fcbb:0:34a9:: for rt-3 toward rt-4.
>
> Add consumed-SRH coverage for End.X. Insert the extra SRH at ingress
> because End.X forwards through its configured adjacency.
>
> Install unreachable routes in table 90 on rt-3 and rt-4 for the hs-1
> to hs-2 policies (i.a) and (i.c). These routes make the next SID
> lookup fail if End.X falls back to End, while forwarding via nh6
> still succeeds. The route on rt-4 in (i.c) covers the NEXT-C-SID
> shift.
>
> Probe kernel support for End.X PSP and skip the End.X tests if the
> probe fails. Document the packet paths to each test section so the
> route taken by the traffic is clear.
>
> Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
> [snip]
> +# Set up an unreachable route on a router so that a lookup of the next SID
> +# fails under End, while End.X still forwards via its adjacency (nh6).
> +# args:
> +# $1 - router to configure
> +# $2 - adjacent router, or a NEXT-C-SID node list (e.g. "4" or "4>2,2>h")
> +# $3 - flavors <op> of the element (e.g. "psp" or "next-csid,psp")
> +setup_rt_unreachable()
> +{
> + local rt="$1"
> + local adj="$2"
> + local op_type="$3"
> [snip]
> + case "${op_type}" in
> + "psp")
> + sid="$(get_rt_sid "${adj}" "psp" "End.X" "${ENDX_PSP_FUNC}")"
> + ;;
> [snip]
> +setup_endx_flv_psp()
> +{
> [snip]
> + # (i.a) add fcff:4::2af1 unreachable on rt-3 and fcff:2::0af1 on rt-4
> + # (i.c) add fcbb:0:42a9:20a9:: unreachable on rt-3 and fcbb:0:20a9::
> + # on rt-4
> + setup_rt_unreachable 3 "4>2" "psp"
> + setup_rt_unreachable 4 "2>h" "psp"
> + setup_rt_unreachable 3 "4>2,2>h" "next-csid,psp"
> + setup_rt_unreachable 4 "2>h" "next-csid,psp"
The $2 line of the comment looks like a leftover from v5: it still
says "adjacent router" and gives "4" as an example, while $2 is now
the node ID of the next SID as the policy writes it, e.g. "4>2"
(fcff:4::2af1). "4" gives fcff:4::af1, so a new call that passes "4"
instead of "4>2" would not catch an End.X that falls back to End. The
calls above already pass "4>2" and "2>h", so the test itself is fine.
Sashiko flagged the $2 line too. Maybe something like:
# $2 - node ID of the next SID, as in the policy, or a NEXT-C-SID
# node list (e.g. "4>2" or "4>2,2>h")
Could you please fix this comment in a v7? It is a small change in the
comment, and it avoids a separate follow-up just for this. The rest of
the patch looks good to me.
Many thanks,
Andrea
Technical Details
Message-ID:
<20261205052537.7b1e603d74bc9cba165a2818@uniroma2.it>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mi.newsdeef.eu!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377831-linux-kernel-netdev=dewy.ruReferences:
<20261202-srv6_flavors_endx-v6-0-4e50b828e702@kylinos.cn> <20261202-srv6_flavors_endx-v6-6-4e50b828e702@kylinos.cn>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mi.newsdeef.eu!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377831-linux-kernel-netdev=dewy.ru
From: andrea.mayer@uniroma2.it (Andrea Mayer)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v6 6/6] selftests: seg6: add PSP flavor testing
for SRv6 End.X
Date: Sat, 5 Dec 2026 05:25:37 +0100
Organization: Usenet Network
Message-ID: <20261205052537.7b1e603d74bc9cba165a2818@uniroma2.it>
References: <20261202-srv6_flavors_endx-v6-0-4e50b828e702@kylinos.cn>
<20261202-srv6_flavors_endx-v6-6-4e50b828e702@kylinos.cn>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="2952414"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:5c1DUizZMITBkxi1Kc/D1Mf3Bfw= sha256:JRXxsuv04PcvAd0EDAvKpgzyVbYsY9Gc5wgxEYLCEaE=
sha1:994nU5ukbhwPfN73QKpX1nJu7Tg= sha256:OyPrVxDxYCbmATiBpyawpB/04iy/3zqo93XnmTUHON0=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 35FE5117D6A; Sat, 5 Dec 2026 07:26:37 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -4.398
X-Spam-Status: No, score=-4.398 tagged_above=-9999 required=6.31
tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1,
NICE_REPLY_A=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=neutral
reason="invalid (unsupported algorithm ed25519-sha256)"
header.d=uniroma2.it header.b=5OtU2kZj; dkim=pass (2048-bit key)
header.d=uniroma2.it header.b=jJ7Ru5hR
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id dyYEiSBUOPfA;
Sat, 5 Dec 2026 07:26:33 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-377831-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=uniroma2.it
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id B7901117D66; Sat, 5 Dec 2026 07:26:18 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id 1FC572481F; Sat, 5 Dec 2026 04:26:17 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1796444776;
b=le4X+Td+x6keAJWOaDnwpeUr7E4uNZL66IZbflK4r2OorCEciO4I3ncCZrbs0gktBJP2
RNjY0s5lyFv7t7Ax6L7ymvfSgtIrE8cES9Cg2RKpmo5ykF+DYqiS0WQo2qHV3X6wm17z9
ZJfzN96ICKJQpUBUiBYB7+AMKXwj10Lg/11D1mWnSY+1IFOBWVNqf95XvTqrO3q7VBzDf
3eXPTjYhcpptAAuZ3df/dmbiFpmhBSJ/INnjWYGnzZPNmrABjP/0509KtpJUlJjRbj312
84pPYKDGrDwQn0BxFaTvknFUv4glCvoGiaK916AqyzCtR3/pENTWhjPf2SXgyzsHM4A==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796444776;
h=X-Original-To:Received:DMARC-Filter:Received:Received:DKIM-Signature:
DKIM-Signature:Date:From:To:Cc:Subject:Message-Id:In-Reply-To:
References:X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:Mime-Version:
Content-Type:Content-Transfer-Encoding:X-Virus-Scanned:
X-Virus-Status;
bh=q5bLvH8Xd/oEyOii2zm+t9YHzdFu3xpni4k+WfVlRCo=;
b=Xjmn7jqAfMlI3eJ8MZWKHGTsaDW2uMDHHMGNeG5oz/LpDj+2/pVObkc/OgVuFs5hlsTN
J5SEQdtHA49RoAJ1s3buTaJ8EOV6ZjzjKOTUweMUiynRnhwKHoY8AWCFLOdSvtmPH//J+
zv2EE9+NyjGOZdHOxweWoNOMjOnQn/uScNs2rs9x7vecr+c60snTj4Ub37YmW45kpUU+h
Ti4Xq+yQGe8ZcAo8TPUUGxfqp2MI7L+u67yFcHUY6Bfq3DHFAiQU1owCVR0RFXdTOGgRx
PKPfK9SqVX1zIcvxm88sZHucGOzqJGUuoBoukAbbZiXCW+T73DGfyxWt2qJ2mm1Wepw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=uniroma2.it header.i=@uniroma2.it header.a=ed25519-sha256 header.s=ed201904 header.b=5OtU2kZj;
dkim=pass header.d=uniroma2.it header.i=@uniroma2.it header.a=rsa-sha256 header.s=rsa201904 header.b=jJ7Ru5hR;
dmarc=pass header.from=uniroma2.it;
spf=pass smtp.mailfrom=uniroma2.it;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AF3E7606A335;
Sat, 5 Dec 2026 04:26:16 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass header.d=uniroma2.it header.i=@uniroma2.it header.a=ed25519-sha256 header.s=ed201904 header.b=5OtU2kZj;
dkim=pass (2048-bit key) header.d=uniroma2.it header.i=@uniroma2.it header.a=rsa-sha256 header.s=rsa201904 header.b=jJ7Ru5hR
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=160.80.4.32
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1796444770;
b=GhcXC7PHyT6jGaog4Sy+aGjy812p1RJizQJkzcuzlX++nOIDCExW2cGKmtkyKBobHLKS
r3U/cOFIWqYWyi02N3eew8PNo3LtuFYX/STznIT62TBb+HfyErvSSfurnBvU6D2Sj7JD6
fgzCoxQRRO81OQes+8ZiTCTi5ScffP45aa8c0QnJ9wzPJ/TnEndxUUc8wa9NEIyjrAayX
JDeZG/aKSo3HIKm6ni9imhErbTte39eIKOK/1InK6HVtSvEVUX5fw0u4b3fF/OKhbDP1+
PgBEipXRgAT8RAgJHryPkkbAiu8Rmp8gNPa7li9hTkFq3mCWsXdDjTvXi2Jc7gneyzQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796444770;
h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature:Date:
From:To:Cc:Subject:Message-Id:In-Reply-To:References:X-Mailer:
Mime-Version:Content-Type:Content-Transfer-Encoding:X-Virus-Scanned:
X-Virus-Status;
bh=q5bLvH8Xd/oEyOii2zm+t9YHzdFu3xpni4k+WfVlRCo=;
b=SrHpruzxzYkrTdF7hcaV0VplEd2efhcfXATvSf+Q3yMSKfKWrdqMqXG2+nHav0jCENvo
sptURkyiVnqxD4SNhpslw0WFofjcpedMA8M3pTLQ6XqPuDFjIvCjUw/4P6Lg+SJ1cHc7b
talMRecfgVZiL4N4yigH4ot272WMn+SyxKWQh9siColVBr4Rolex4ZbXYW7PFeDQColy5
twkkLRBnrrtJzddOsgw2+AzTol1Ithxi44EsEz6z+zknTld/+ix74Q8mmW7uk1+ndqzJU
2sXL+s/0QLP1ypgY7qyny9UxJRuACiTflqWeZPqnNhjr5ew1/GsK2ARQKVr9HIOl2MA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=uniroma2.it;
spf=pass smtp.mailfrom=uniroma2.it;
dkim=pass header.d=uniroma2.it header.i=@uniroma2.it header.a=ed25519-sha256 header.s=ed201904 header.b=5OtU2kZj;
dkim=pass header.d=uniroma2.it header.i=@uniroma2.it header.a=rsa-sha256 header.s=rsa201904 header.b=jJ7Ru5hR;
arc=none smtp.remote-ip=160.80.4.32
X-Received: from smtp.uniroma2.it (smtp.uniroma2.it [160.80.4.32])
by smtp.subspace.kernel.org (Postfix) with ESMTP id EBD60606A32F;
Sat, 5 Dec 2026 04:26:09 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EBD60606A32F
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniroma2.it
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=uniroma2.it
X-Received: from smtpauth-2019-1.uniroma2.it (smtpauth.uniroma2.it [160.80.5.46])
by smtp-2015.uniroma2.it (8.14.4/8.14.4/Debian-8) with ESMTP id 6B54Pgf4009539;
Sat, 5 Dec 2026 05:25:47 +0100
X-Received: from lubuntu-18.04 (unknown [160.80.103.126])
by smtpauth-2019-1.uniroma2.it (Postfix) with ESMTPSA id 34C9F12287D;
Sat, 5 Dec 2026 05:25:38 +0100 (CET)
X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=uniroma2.it;
s=ed201904; t=1796444738; h=from:from:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:cc:mime-version:mime-version:
content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=q5bLvH8Xd/oEyOii2zm+t9YHzdFu3xpni4k+WfVlRCo=;
b=5OtU2kZjaQ780kpk45ubRx3lrz3V+o6yUxkpeOMq3eA+Omfn81LMnWBAVPcPtl+TZcZSYW
+NqnAi47sn2/0iBQ==
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uniroma2.it; s=rsa201904;
t=1796444738; h=from:from:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:cc:mime-version:mime-version:
content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=q5bLvH8Xd/oEyOii2zm+t9YHzdFu3xpni4k+WfVlRCo=;
b=jJ7Ru5hRTiIXw8t7RT5jNxsDeg0oAOxoUOUB9tmB8LlDZSjNjux2f5cPj/3WLy0LaZjYjT
FTBoBM5C4UCZo20oYJ0pUHEmSZ76Fb72BwgmzdESXltiGY4BF/v+G29pJWucRuTxIF6qbj
3JrJWL7/sE4zxAb5wuzehid0VUyAggvrE6YSgRFyDpYhGf94VsOq2vCF6V5MrWLB5OlQZp
oPgcZ69RY+SWKcrhcRsjo183ec6neQwaQiSCw9u805k1cAbNRbJrDgT3UTtdfBmz6Lz+ao
u8AnUDAgMepBk50KySVF5Z5okcmKf6clHAvOdqHkrpGrO0N3e4zH1GbKgwQgPw==
X-Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet
<edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni
<pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Shuah Khan
<shuah@kernel.org>, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
Hangbin Liu <liuhangbin@kylinos.cn>,
Stefano Salsano <stefano.salsano@uniroma2.it>,
Andrea Mayer
<andrea@common-net.org>,
Andrea Mayer <andrea.mayer@uniroma2.it>
X-In-Reply-To: <20261202-srv6_flavors_endx-v6-6-4e50b828e702@kylinos.cn>
X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-Virus-Scanned: clamav-milter 0.100.0 at smtp-2015
X-Virus-Status: Clean