From nobody Fri Sep 25 23:51:06 2026 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94D43440A0A for ; Mon, 7 Sep 2026 10:06:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.188.122 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788775599; cv=none; b=d5FgrSEMzksIBWUSclO70Ah3N9YxJ10mEJsoW/JO+DWVM8vbfSPU3Wym2FJg1sifv8PnNBf0qSgMMhv8FuM64GKCLRuLYVKE8F3563tkFpEe0rGC0mBScx+6glF4esrc5tX1vIv3m/zZa1ZUFK4WUE6PCKmUEUGDjrgPreQ67iQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788775599; c=relaxed/simple; bh=cfZlsUNL1tYXf3StIFp8xyHHzkshbzsXgfZAOQaTPHk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=i8Zrqbu6p6cH6Iip8XiiP4pWyua7eK/n6vMx0zaPgaClKDG72EsifBi+ey+fO1PfZ9bt6hIsisIfVm2kXSQ6kbQzoJr4IwicC0sHCppv+1lrdR0JHQblQYayFInOE4kC1XJzcoss4rxr5rynHLvODPNIHk0Gf3NYftoGqNDTR0I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=canonical.com; spf=pass smtp.mailfrom=canonical.com; dkim=pass (4096-bit key) header.d=canonical.com header.i=@canonical.com header.b=EsWx4Qy7; arc=none smtp.client-ip=185.125.188.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=canonical.com header.i=@canonical.com header.b="EsWx4Qy7" Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id EA8333F28F for ; Mon, 7 Sep 2026 10:06:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20251003; t=1788775593; bh=dRV5mMHnpzRbNcgwfhh0JIyTTCV6Vk7ZoBlXJcHwHHk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EsWx4Qy7wLOIpR+FOd1YtEeCeqv2cICHe0YuX/q5Met9vFX/E2H0WQI8dCqdMoWqg izUzfZ6I9j4DGTlLh7Bze2SENnnGhT089ABN3g12J4eFZJxBq/T0Exr3GiiaYC1mep th8I6jHgVTHUWFcWSp0xKhQjQA+uLoNepCT2k+48ZYgPuoozjG0RPb+2pRJ0vfm7l2 V1U1kLww1ZxC/1mBWZFrJXnDsso1y8ZMgb/WnCEOjU62CEXFe8/lvlGhOtS6gyKkmO gHr/Hy7PV8SoAN2+S54SryVG1cUcQD0CEoq7WzxLAuN29reB5NACcXOFgqQAdTCvCB djH7r8IFWjf5WYm4fqx4YgdBKuS4hh/BeGEraja2IXgb1OqF6Nt05uHXkjCvp0AvOJ T0AMIuHYgI6oQ46wNgW+497EHZaDBq8ANpvxk5BokOy4sphc6kQGqJKgSf3YDJzhKR NOh1m7M1rxhubcz3upYoZKKAOwMzG5QPp5UZJ9/HItN1pI8oV9c3L+srKpDu/TdDRc MYko0zdlbnsARwCKvrwk4CwTLN3b97AfGK7d5w/Cee1mRB6ruSsDu50vDyKweIcRsz T2CNnNoS3OJpKm5kHpjj653eIx3jKs6dpUZj9LInsj0l8Gvu5v5Xra7FWmf4RXc4KN uqlNbGmjcmJsURhK3Rx4AWyQ= Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-4858f06e142so1477803f8f.0 for ; Mon, 07 Sep 2026 03:06:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788775593; x=1789380393; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=dRV5mMHnpzRbNcgwfhh0JIyTTCV6Vk7ZoBlXJcHwHHk=; b=c+VNQg8ov1sPN3rVDlCb/8FS+1YYv2EqoeH6uHnarWXjPN7TqTN6WZfEQy6qN2tnfm Q5yg7d7s06NGLsETWv+dI8HNk1D2ZAMIbCVni50uRy0z19udyzZiZ4y6ThhWyFTkQdHe 3lkyeDeQkBdnwI1KcAJImmuHmULpDM6qewdasr/sGrp3nqFKZNnCdqcQmC+ZfWmwU8HZ V5tDhwNDAVZSKu265q3Kf0wUdVLyP2AVDVp7DbKo180kx0dcdoxKC7maojpVo7m15saD g2NKwuxU07JOe8Rvb1fWpgR+4l9FsD2x3YJxjtI7KpwnNxuCQENeNKwxNX6Ur/C4kt42 O6Lg== X-Forwarded-Encrypted: i=1; AKwUvByUJP9bpIoDkXJ4uFJrmwsqc4xqr8UCBGr0D8TBEcWzLl9P2zMqP7sXlwso5+Qt3D8KWjwd0lOr9+BNGAY=@vger.kernel.org X-Gm-Message-State: AFuF++n7qK11N0m+NYGHXnvshXMkaFyerklr6ir0ahOm3iD42vwVrQ1h 7uh1Mwuwshog8G0r/7+TzY39uwP7BYxUqxKLGZZ37U+uMheOyYQyvhMJjyjGu67aZ2S60D6tgEP 5WjymKRD0cMo5FVopRFN9kwQ/XMzPU9VZDjRWvQqGCfv2wjl/WjS2avIgmVUNkOiNLum2M9O1rv 76TUlcCw== X-Gm-Gg: AYBFou33zxv+oMUOEmyPaEMQX4nokqcKU25HjGcvg4rYofnB8X5NomyVYEBrj0bKKAZ 0M7ROjWJrcQNDiVT59T3b51m+Q9hE0CTsHWwhRFIS5L+LU/yZJmcufAEaENDbTn96Ri9a2mh6Mo IXp0YG5jVBQvRxBzR5Docb3YZe7vjml8Yelb458Cvyz+rsYp4WbI9fSbpBLrLmB1y73FwsfDtWA lCiz1OIgXuBTVIrtiTLZyIHY3FWRbCYn1hPVg3uE10wk6cRVhB1bkAebu7MANhmTAy1xNnH9pun DkCH5exRagPorgzGL73OHQiklg2WrPcx0rIBnsPxBkpH4lLXxqY3+9+T0fDYugrfBgi8Cp8Fg24 5V2/R/VaLnU65ayusmIvKXsFU98gcEN731fwQtLphMPTikf+ZwelifUeFOdkOG06HFkmm8w== X-Received: by 2002:a05:6000:388:b0:485:8c75:48fb with SMTP id ffacd0b85a97d-4858c75598cmr17163976f8f.50.1788775593455; Mon, 07 Sep 2026 03:06:33 -0700 (PDT) X-Received: by 2002:a05:6000:388:b0:485:8c75:48fb with SMTP id ffacd0b85a97d-4858c75598cmr17163935f8f.50.1788775592991; Mon, 07 Sep 2026 03:06:32 -0700 (PDT) Received: from localhost (93-40-94-241.ip38.fastwebnet.it. [93.40.94.241]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-485881353e8sm27574871f8f.1.2026.09.07.03.06.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Sep 2026 03:06:32 -0700 (PDT) From: Alessio Faina To: Andrea Mayer Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Simon Horman , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v3] selftests/net: skip srv6_end_dt[4/6]_l3vpn_test.sh if vrftable not available Date: Mon, 7 Sep 2026 12:06:31 +0200 Message-ID: <20260907100631.1923148-1-alessio.faina@canonical.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In case iproute2 is older than version 5.11.0, released ~Feb 23, 2021, the vrftable support is not available and the tests contained in the following 2 test files - srv6_end_dt4_l3vpn_test.sh - srv6_end_dt6_l3vpn_test.sh are failing in some kernel backports. This is the result of one of those tests in an unsupported environment: ########################################################################## TEST SECTION: SRv6 VPN connectivity test among hosts in the same tenant ########################################################################## TEST: Hosts connectivity: hs-t100-1 -> hs-t100-2 (tenant 100) [FAIL] TEST: Hosts connectivity: hs-t100-2 -> hs-t100-1 (tenant 100) [FAIL] TEST: Hosts connectivity: hs-t200-3 -> hs-t200-4 (tenant 200) [FAIL] TEST: Hosts connectivity: hs-t200-4 -> hs-t200-3 (tenant 200) [FAIL] The test installs a route with the vrftable feature; if this feature is not available, the approach taken is to skip the test rather than failing it. Signed-off-by: Alessio Faina Reviewed-by: Andrea Mayer --- v3: - Fix Commit message and mail subject v2: https://patchwork.kernel.org/project/netdevbpf/patch/20260903103545.132= 5276-1-alessio.faina@canonical.com/ - remove dx[4/6] tests - test if vrftable is available in the installed iproute2 application v1: https://patchwork.kernel.org/project/netdevbpf/patch/20260824091537.230= 5107-1-alessio.faina@canonical.com/ - initial approach by testing DT[4/6] and DX[4/6] - test if DT4/DT6 are available in iproute2 ./tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh | 21 +++++++++++= ++++++++ ./tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh | 21 +++++++++++= ++++++++ 2 files changed, 42 insertions(+) diff --git a/tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh b/tools= /testing/selftests/net/srv6_end_dt4_l3vpn_test.sh index a649dba3cb77..037e5fe1da2a 100755 --- a/tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh +++ b/tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh @@ -469,12 +469,33 @@ if [ ! -x "$(command -v ip)" ]; then exit $ksft_skip fi =20 +test_vrftable_supp_or_ksft_skip() +{ + local nsname + + setup_ns nsname + ip netns exec "${nsname}" sh -c "echo 1 > /proc/sys/net/vrf/strict_mode" + ip -netns "${nsname}" link add vrf-100 type vrf table 100 + ip -netns "${nsname}" link set vrf-100 up + + if ! ip -netns "${nsname}" -6 route add fc00::1/128 \ + encap seg6local action End.DT4 vrftable 100 dev vrf-100 2>/dev/null; th= en + cleanup_ns "${nsname}" + echo "SKIP: SRv6 End.DT4 vrftable not supported" + exit "${ksft_skip}" + fi + + cleanup_ns "${nsname}" +} + modprobe vrf &>/dev/null if [ ! -e /proc/sys/net/vrf/strict_mode ]; then echo "SKIP: vrf sysctl does not exist" exit $ksft_skip fi =20 +test_vrftable_supp_or_ksft_skip + cleanup &>/dev/null =20 setup diff --git a/tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh b/tools= /testing/selftests/net/srv6_end_dt6_l3vpn_test.sh index e408406d8489..9a29e0d6c912 100755 --- a/tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh +++ b/tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh @@ -479,12 +479,33 @@ if [ ! -x "$(command -v ip)" ]; then exit $ksft_skip fi =20 +test_vrftable_supp_or_ksft_skip() +{ + local nsname + + setup_ns nsname + ip netns exec "${nsname}" sh -c "echo 1 > /proc/sys/net/vrf/strict_mode" + ip -netns "${nsname}" link add vrf-100 type vrf table 100 + ip -netns "${nsname}" link set vrf-100 up + + if ! ip -netns "${nsname}" -6 route add fc00::1/128 \ + encap seg6local action End.DT6 vrftable 100 dev vrf-100 2>/dev/null; th= en + cleanup_ns "${nsname}" + echo "SKIP: SRv6 End.DT6 vrftable not supported" + exit "${ksft_skip}" + fi + + cleanup_ns "${nsname}" +} + modprobe vrf &>/dev/null if [ ! -e /proc/sys/net/vrf/strict_mode ]; then echo "SKIP: vrf sysctl does not exist" exit $ksft_skip fi =20 +test_vrftable_supp_or_ksft_skip + cleanup &>/dev/null =20 setup --=20 2.43.0