🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #18206

Re: [PATCH net-next v3 5/5] selftests: seg6: add PSP flavor testing for SRv6 End.X

#18206
From: Hangbin Liu
Date: Wed, 18 Nov 2026 00:51
40 lines
10440 bytes
On Tue, Nov 17, 2026 at 04:48:12PM +0800, Hangbin Liu wrote:
> > > I didn't add `host_srv6_end_flv_consumed_srh_tests()` for End.X because
> > > the extra policy insertion does not work with the End.X policy. The packet
> > > resolves the destination via the next hop directly, rather than doing a
> > > re-lookup in table 90.
> > 
> > The ingress router can insert the extra SRH instead, on the first SID
> > of the Policy. As in the End tests, an End SID of the base setup can
> > then consume it. This way, we can add these tests for End.X too. What
> > do you think?
> 
> For the End.X Policy (i.a) testing, we have SID List=fcff:3::a,fcff:4::af1,fcff:2::af1,cafe::2.
> And we configured the next hop policy for the SID on each rt. e.g
> 
> On rt3: fcff:3::000a table 90 encap seg6local action End.X nh6 fcf0:0:3:4::4
> On rt4: fcff:4::0af1 table 90 encap seg6local action End.X nh6 fcf0:0:2:4::2 flavors psp
> on rt2: fcff:2::0af1 table 90 encap seg6local action End.X nh6 cafe::2 flavors psp
> 
> When the packet arrive on rt4, it's dst is set to fcff:2::af1. And the new
> insert policy (fcff:2::0af1 table 90 encap seg6 mode inline segs fcff:3::000e dev dum0)
> doesn't works as the End.X policy will goto next hop fcf0:0:2:4::2 directly
> instead of looking at fcff:2::af1 on table 90.
> 

hmm, Not sure if you mean to add a ip rule for the ingress route? e.g.
  # ip rule add from cafe::1 to fcff:4::af1 lookup 100
  # ip route add fcff:4::af1 table 100 encap seg6 mode inline segs fcff:3::000e, dev dum0

Then on rt3, we got
   IPv6 DA=fcff:3::e | extra SRH, SL=1 | Policy's SRH, SL=2 | Payload
after action End, rt3 send
   IPv6 DA=fcff:4::af1 | extra SRH, SL=0 | Policy's SRH, SL=2 | Payload

But here the fcff:4::af1 will hit the ip rule and do encap again, which will
be a loop.

Do I missed something?

Hangbin
Technical Details
Message-ID: <avz2hH9T_5OOuHbi@fedora>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365744-linux-kernel-netdev=dewy.ru
References: <20261112-srv6_flavors_endx-v3-0-c9177bbbd965@kylinos.cn> <20261112-srv6_flavors_endx-v3-5-c9177bbbd965@kylinos.cn> <20261117035021.e724668d726ecce54e091288@uniroma2.it> <avwUzLyWxZl9cBIX@fedora>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365744-linux-kernel-netdev=dewy.ru
From: hangbin.liu@linux.dev (Hangbin Liu)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v3 5/5] selftests: seg6: add PSP flavor testing
 for SRv6 End.X
Date: Wed, 18 Nov 2026 08:51:16 +0800
Organization: Usenet Network
Message-ID: <avz2hH9T_5OOuHbi@fedora>
References: <20261112-srv6_flavors_endx-v3-0-c9177bbbd965@kylinos.cn>
 <20261112-srv6_flavors_endx-v3-5-c9177bbbd965@kylinos.cn>
 <20261117035021.e724668d726ecce54e091288@uniroma2.it>
 <avwUzLyWxZl9cBIX@fedora>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="2466122"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Fsx99YYkMYEN5NpCUZa/vdL+kkg= sha256:4xxDV4HUFYVqXapv0U0ZT0XZNCyR4sBnufnQuTZHSO4=
	sha1:jX5QfFQJ5N1uwEOeox9j7BPOnzQ= sha256:UiBmd+gxIdtEbyX5otW/lp3N3chyMoLMz31mQN3JSVo=
Content-Disposition: inline
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 62D281150AA; Wed, 18 Nov 2026 03:52:02 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-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=pass (1024-bit key)
	header.d=linux.dev
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 rBToufFAcnNe;
	Wed, 18 Nov 2026 03:51:57 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-365744-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id CC18E11503B; Wed, 18 Nov 2026 03:51:48 +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 C0747463CE; Wed, 18 Nov 2026 00:51:46 +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=1794963103;
	b=ZeoTSNbnEWeAdFaAyjbJZRvVJbExF0alGvykCzQPG4z9zJVtripOCW6VRY6HVpuSyG/e
	 Nhb7O5BeGjfysUzGwIBZvvf6c8Oz1iIVGJDT9ZBCy0uXuXq0J59coEb6+2BJP3ggqauCf
	 e/qyEwkbxbz79RtADGiV7kNpKCb7k5sOBtg9YuJEvbqfSzod6vxJiLDtNyrVwxnWciYx1
	 ew+cYGpLb7PvKB5o++19a4aVtvzNbP3u4nverkvQvCtoFzL1IvwZY0RZAJoybgMCsB00P
	 j7mF1qWvRF7K16ol7MWbkg/7RETv9dX5hFgxn2nFLJrmoDCd6PAiOT4fDSNXCFL3eZA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794963103;
	h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature:
	 X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:
	 Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=+h9Sc4b2ra6u3kHXZEe7fr/dhg1Q14nueP4OB65HOrs=;
	b=wbuaW2Iygk72OgwbuNivgqvJi91oLaMqDvVq/p+4i8gAhVidprPihkDoG5QDlE9uSyzp
	 u+OMHekzNW0L8rFjUZps4y8lC+V9HyrzzfjvKZl4ApqVg6nVyQdZ0NmS1rXyNsQPGVtRh
	 uhtYoBquH42t/mhx9siKMDwNmZI706Bvywjk3U9EX5KLohJtGpPp8Ocx9UpFgK4UOUaQF
	 1STvtQ/xBW/2sCdITjxCFP9vvDXbRbd+5Tps+cEsZqLmuiOQYZhdsPNS5bw4gUtWsufwN
	 4CgECKuhULrkZX/5QJIUwO7EDrokz41bGsX5ac1P63Sx8zTyHv6CoKUD3eTI9w+LoXg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=DRaub8EV;
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	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 AFE8F606A88A;
	Wed, 18 Nov 2026 00:51:43 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=DRaub8EV
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.216
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794963092;
	b=34g89Nkelhp3fL2aHfSREi4rM90Bq/90XkGWac5rFEU43qhz/2kzAw2ftd0L30lWDGHJ
	 kNfWSoGxEmxq5v8V5Qw3Dryk+T/K/BmJDVhORanF4RnFSRoBVTUd+nM2mpD9xVB5gQ1Qc
	 p4vqgthncScIR7+Jd6J0Hoxq/EW2Sp6GtZOJIwU4RDD1NfHzT6GGfheyWXGBRV3u3h61a
	 oMFXCo13JGpBCJ6X+P8APrcKJNbYxIR198mcEB3zfq+b8s+YLejyqySQrnhRqqEdqYgB6
	 Y4yESzfDWPUnQ8aNL+gruLRgeU60h2TrZ05eSsanQzI60sdqncp8WWrh2QGJi7QRP6Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794963092;
	h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received:
	 X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID:
	 References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=+h9Sc4b2ra6u3kHXZEe7fr/dhg1Q14nueP4OB65HOrs=;
	b=b6mqRpEyFXwQCmwWHuxVd3tj5uWpNmiTzKTfi3T4brjhiYw/oAkLQ2AcSttoBIBiB1vp
	 5YXZmKkpHgpl4fCf3au3VeOl7tT3F07cHNeTc8A4rfC+zBMx4KXr5+Ndg828shAetBX9A
	 hJVn/Otsq+7I4Zg9bx8vHHtDvxVyrNutrmBbub6cxX+woBs33PcBzIkMRn5wZoWBOqxmL
	 VXC1OcgqXhAVdi0EgJf01+qIcosIMzz7aKxYasfg/hlbmOLqTjmy0ZuStpnnqaa+kHXK4
	 7v5Fj5UzPCJNQMlEUeP6Oh8JbdHRT2/kJem5SzkUIh/Fo25RD5TwlcRnB9OvGt6129Q==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=DRaub8EV;
	arc=none smtp.remote-ip=91.218.175.216
X-Received: from mta0.migadu.com (out-216.mta0.migadu.com [91.218.175.216])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC07E606A31C
	for <netdev@vger.kernel.org>; Wed, 18 Nov 2026 00:51:31 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BC07E606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
X-Envelope-To: netdev@vger.kernel.org
X-DKIM-Signature: a=rsa-sha256; bh=35j3KAfDSmKSKABohtx1cPJcLRuq+RzcWD81Hn4b4RQ=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1794963089; v=1; x=1795567889;
 b=DRaub8EVxyz+fRnfzet//xzx3JvxSjKRGDwmj8Pub2pD0PIIyBaaS9lLF2KDctG53VsfsH5s
 p/7KieQMj1TNXTyCEIF/t+ShEmzSPXqmWNZjh+rH/8VUirds/MTpnGWdllg9gKQm1UdjjHdEMbv
 1ChiNauMGzApRwJuLtcMSVyk=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by mta11.migadu.com with ESMTPS id 1f790bf25116b760;
	Wed, 18 Nov 2026 00:51:29 +0000
X-Mizu-Trace-ID: 1f790bf25116b760
X-Migadu-Flow: FLOW_OUT
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>,
	Justin Iurman <justin.iurman@gmail.com>,
	Andrea Mayer <andrea@common-net.org>
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-In-Reply-To: <avwUzLyWxZl9cBIX@fedora>