From nobody Thu Apr 9 10:33:17 2026 Received: from relay.virtuozzo.com (relay.virtuozzo.com [130.117.225.111]) (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 277E83D34BE; Mon, 9 Mar 2026 15:20:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=130.117.225.111 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773069640; cv=none; b=c7Hb6LkFsTP9LlSGRg3kPLwE9/vNQ8TWfqYIVCYZKzPa9kn9mkssCWujogy/1WibYzPkASD/UqFUHqoVhTncgIZoK7up7CFZTJP3VB//JhcePxSxanqytS9hqa2osBoBHVrZZPbOxHk6gKQA/8MMNJO13ql9d2b1MoEhoTdPhHg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773069640; c=relaxed/simple; bh=NipXyq8Olunpd4nLlWBIUAlNUcuzVjyuhISS0mQU4mU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m62IzFfkcpaHtj7Ll5E7ZFK6XL4bXyqxwi71LO5IsIvkqoggc9aXT9t8eLPkHlXkzz7DdhCE84BPJRTL2AvaD6T+s1qRmJ8ELsqZd7KQIAHzIsDH4zzthH9koXS6YdNlxyUrXSrlbU3LeX1c5zAHvUXz3veKoM1xd4VEigZ5868= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=virtuozzo.com; spf=pass smtp.mailfrom=virtuozzo.com; dkim=pass (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b=KBJf2MHW; arc=none smtp.client-ip=130.117.225.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=virtuozzo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="KBJf2MHW" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=IpUU4MbJSN8PkPmUt1IzIbg/Bcu1M7gnSljEdtG9dlo=; b=KBJf2MHW9U+O n6hLcOlgSybHJY3wYHsWcBTEqbzV2ktazTZkn3wfZ1GiwY9pAI5C252b5NMhnSMtC+SIOMiZ7ZKZa 2QzKbAHF4c/4yiBMTDYjwjPsansN0IgXLFmFPESf1zrvJYbNhFrSmocANc23esUg0jGwtR3/NAo/w 6kuBeR1l63tpfakY1CjjenxlAynqeSninSLMe6BMGOw5xhg9nhLQQ5T+Uk67roYZhc1yn4I0HVn03 Tei8Bh2PrhkH8R4sZqz29HgtBh3/a/23WvVaDTdvgKsNyoH6WqAP2MCmNDA78cPielSKXDpbY97iT iK1b35KAjbZouzyXgu+zyA==; Received: from [130.117.225.5] (helo=dev004.aci.vzint.dev) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vzcNT-006Tev-26; Mon, 09 Mar 2026 16:20:10 +0100 Received: from dev004.aci.vzint.dev (localhost [127.0.0.1]) by dev004.aci.vzint.dev (8.16.1/8.16.1) with ESMTPS id 629FKI05565241 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 9 Mar 2026 15:20:18 GMT Received: (from root@localhost) by dev004.aci.vzint.dev (8.16.1/8.16.1/Submit) id 629FKHsZ565240; Mon, 9 Mar 2026 15:20:17 GMT From: Aleksei Oladko To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan , Aaron Conole , Ilya Maximets , Eelco Chaudron , Stefano Brivio Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, dev@openvswitch.org, Aleksei Oladko Subject: [PATCH net v4 1/5] selftests: net: make ovs-dpctl.py fail when pyroute2 is unsupported Date: Mon, 9 Mar 2026 15:20:09 +0000 Message-ID: <20260309152013.565216-2-aleksey.oladko@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260309152013.565216-1-aleksey.oladko@virtuozzo.com> References: <20260309152013.565216-1-aleksey.oladko@virtuozzo.com> 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" The pmtu.sh kselftest configures OVS using ovs-dpctl.py and falls back to ovs-vsctl only when ovs-dpctl.py fails. However, ovs-dpctl.py exits with a success status when the installed pyroute2 package version is lower than 0.6, even though the OVS datapath is not configured. As a result, pmtu.sh assumes that the setup was successful and continues running the test, which later fails due to the missing OVS configuration. Fix the exit code handling in ovs-dpctl.py so that pmtu.sh can detect that the setup did not complete successfully and fall back to ovs-vsctl. Fixes: 962e8a01eab9 ("selftests: openvswitch: Add version check for pyroute= 2") Signed-off-by: Aleksei Oladko Reviewed-by: Aaron Conole --- tools/testing/selftests/net/openvswitch/ovs-dpctl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py b/tools/t= esting/selftests/net/openvswitch/ovs-dpctl.py index b521e0dea506..848f61fdcee0 100644 --- a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py +++ b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py @@ -2583,7 +2583,7 @@ def main(argv): prverscheck =3D pyroute2.__version__.split(".") if int(prverscheck[0]) =3D=3D 0 and int(prverscheck[1]) < 6: print("Need to upgrade the python pyroute2 package to >=3D 0.6.") - sys.exit(0) + sys.exit(1) =20 parser =3D argparse.ArgumentParser() parser.add_argument( --=20 2.43.0 From nobody Thu Apr 9 10:33:17 2026 Received: from relay.virtuozzo.com (relay.virtuozzo.com [130.117.225.111]) (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 36EBA3D9054; Mon, 9 Mar 2026 15:20:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=130.117.225.111 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773069640; cv=none; b=Mfq7eKI5cuayNgVd0me6uazLj3mL3TT3l0tsspr24U4INzPi2TucBPR6hSDiCrOWVZqiC3DbfT2o/mNtnsndsFSr6G3iFUZo7XjkfhhzAylLIf1zwphN1EyEbM1VcQ6ZgNATpYmgDxNdKu/xbDwwPFljLsAyf7NrFfKK7EdfRJM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773069640; c=relaxed/simple; bh=502L+b8VhHD2hfOY+Vac3X+4b9aG5ol0a3NFHml8MFI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d73MTLiJNd9F40e5rQZc5vDaN1+lUBrlOjDF64y8T4ASubpEWYUWP0v4mc3L+lR77DIXbD1xhK6NFoVJV8pMS+AAcO5BRQVV/F+qmSDNLQb+tvm8pT8rLYp0KDlzd2lWd+spilRqUza1Pf/bYvrF41EcAKJNzeQyoRtmRU0avok= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=virtuozzo.com; spf=pass smtp.mailfrom=virtuozzo.com; dkim=pass (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b=H4asFpyc; arc=none smtp.client-ip=130.117.225.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=virtuozzo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="H4asFpyc" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=fyEvluQLxxf9rIozH/IQMufNdNJaWDqtGJ1Dq84TKXo=; b=H4asFpyc/Kml 7quIJVCl7mjr8LPgrTjfdEJ4vdFB/6e2VHhUeANvysMCiX0/4mKIoF1IvWAeVG4/58kh0rx61EJg5 O8a0/DkhCYyTJHdlL2LyDSbb2tV7wpsMGvwXoFfYHUpHytL1VD2Rp6x9jAAc1ih2vvaVwaNT5faTS D8bCKXH/wFqC/5pY3DkS+FlPGBJDgBuKVNGhXz4Rkx8bjid/zai5PeMigkTvPiV5KK64gtV2Fix6C BVmcl5x6LQkCi/8VHlCfYRzf6W2NYjkSFQheNUb/TRvYfOycNu54Lu6WTCyPfn/yY5zB31eFYrxhW mesDrlTuRCK6vwQ8a/zF9w==; Received: from [130.117.225.5] (helo=dev004.aci.vzint.dev) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vzcNV-006Tex-00; Mon, 09 Mar 2026 16:20:12 +0100 Received: from dev004.aci.vzint.dev (localhost [127.0.0.1]) by dev004.aci.vzint.dev (8.16.1/8.16.1) with ESMTPS id 629FKJrT565245 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 9 Mar 2026 15:20:19 GMT Received: (from root@localhost) by dev004.aci.vzint.dev (8.16.1/8.16.1/Submit) id 629FKJnr565244; Mon, 9 Mar 2026 15:20:19 GMT From: Aleksei Oladko To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan , Aaron Conole , Ilya Maximets , Eelco Chaudron , Stefano Brivio Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, dev@openvswitch.org, Aleksei Oladko Subject: [PATCH net v4 2/5] selftests: net: run reuseport in an isolated netns Date: Mon, 9 Mar 2026 15:20:10 +0000 Message-ID: <20260309152013.565216-3-aleksey.oladko@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260309152013.565216-1-aleksey.oladko@virtuozzo.com> References: <20260309152013.565216-1-aleksey.oladko@virtuozzo.com> 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" The reuseport_* tests (bpf, bpf_cpu, bpf_numa, dualstack) currently use a fixed port range. This can cause intermittent test failures when the ports are already in use by other services: failed to bind receive socket: Address already in use To avoid conflicts, run these tests in separate network namespaces using unshare. Each test now has its own isolated network stack, preventing port collisions with the host services. Signed-off-by: Aleksei Oladko --- tools/testing/selftests/net/reuseport_bpf.c | 11 +++++++++++ tools/testing/selftests/net/reuseport_bpf_cpu.c | 10 ++++++++++ tools/testing/selftests/net/reuseport_bpf_numa.c | 10 ++++++++++ tools/testing/selftests/net/reuseport_dualstack.c | 11 +++++++++++ 4 files changed, 42 insertions(+) diff --git a/tools/testing/selftests/net/reuseport_bpf.c b/tools/testing/se= lftests/net/reuseport_bpf.c index b6634d6da3d6..12e48b97b862 100644 --- a/tools/testing/selftests/net/reuseport_bpf.c +++ b/tools/testing/selftests/net/reuseport_bpf.c @@ -23,6 +23,7 @@ #include #include #include +#include =20 #include "kselftest.h" =20 @@ -455,8 +456,18 @@ static __attribute__((destructor)) void main_dtor(void) setrlimit(RLIMIT_MEMLOCK, &rlim_old); } =20 +static void setup_netns(void) +{ + if (unshare(CLONE_NEWNET)) + error(1, errno, "failed to unshare netns"); + if (system("ip link set lo up")) + error(1, 0, "failed to bring up lo interface in netns"); +} + int main(void) { + setup_netns(); + fprintf(stderr, "---- IPv4 UDP ----\n"); /* NOTE: UDP socket lookups traverse a different code path when there * are > 10 sockets in a group. Run the bpf test through both paths. diff --git a/tools/testing/selftests/net/reuseport_bpf_cpu.c b/tools/testin= g/selftests/net/reuseport_bpf_cpu.c index 2d646174729f..ddfe92f6597a 100644 --- a/tools/testing/selftests/net/reuseport_bpf_cpu.c +++ b/tools/testing/selftests/net/reuseport_bpf_cpu.c @@ -228,10 +228,20 @@ static void test(int *rcv_fd, int len, int family, in= t proto) close(rcv_fd[cpu]); } =20 +static void setup_netns(void) +{ + if (unshare(CLONE_NEWNET)) + error(1, errno, "failed to unshare netns"); + if (system("ip link set lo up")) + error(1, 0, "failed to bring up lo interface in netns"); +} + int main(void) { int *rcv_fd, cpus; =20 + setup_netns(); + cpus =3D sysconf(_SC_NPROCESSORS_ONLN); if (cpus <=3D 0) error(1, errno, "failed counting cpus"); diff --git a/tools/testing/selftests/net/reuseport_bpf_numa.c b/tools/testi= ng/selftests/net/reuseport_bpf_numa.c index 2ffd957ffb15..8ec52fc5ef41 100644 --- a/tools/testing/selftests/net/reuseport_bpf_numa.c +++ b/tools/testing/selftests/net/reuseport_bpf_numa.c @@ -230,10 +230,20 @@ static void test(int *rcv_fd, int len, int family, in= t proto) close(rcv_fd[node]); } =20 +static void setup_netns(void) +{ + if (unshare(CLONE_NEWNET)) + error(1, errno, "failed to unshare netns"); + if (system("ip link set lo up")) + error(1, 0, "failed to bring up lo interface in netns"); +} + int main(void) { int *rcv_fd, nodes; =20 + setup_netns(); + if (numa_available() < 0) ksft_exit_skip("no numa api support\n"); =20 diff --git a/tools/testing/selftests/net/reuseport_dualstack.c b/tools/test= ing/selftests/net/reuseport_dualstack.c index fb7a59ed759e..0eaf739d0c85 100644 --- a/tools/testing/selftests/net/reuseport_dualstack.c +++ b/tools/testing/selftests/net/reuseport_dualstack.c @@ -25,6 +25,7 @@ #include #include #include +#include =20 static const int PORT =3D 8888; =20 @@ -156,10 +157,20 @@ static void test(int *rcv_fds, int count, int proto) close(epfd); } =20 +static void setup_netns(void) +{ + if (unshare(CLONE_NEWNET)) + error(1, errno, "failed to unshare netns"); + if (system("ip link set lo up")) + error(1, 0, "failed to bring up lo interface in netns"); +} + int main(void) { int rcv_fds[32], i; =20 + setup_netns(); + fprintf(stderr, "---- UDP IPv4 created before IPv6 ----\n"); build_rcv_fd(AF_INET, SOCK_DGRAM, rcv_fds, 5); build_rcv_fd(AF_INET6, SOCK_DGRAM, &(rcv_fds[5]), 5); --=20 2.43.0 From nobody Thu Apr 9 10:33:17 2026 Received: from relay.virtuozzo.com (relay.virtuozzo.com [130.117.225.111]) (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 36E263D903D; Mon, 9 Mar 2026 15:20:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=130.117.225.111 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773069639; cv=none; b=s0BLimiTMC+LmggQ6knVQpdJdkFV6v5hQkJEfXNN2pH3vbegG1c6QA/4gVXhV2YKWFI7frvFLujCvW6QFBB0utUo4c1+BYaT0iVA/AoME+dk6rSnVM/r8Y9LEIRJ5kBUBK9xqwPbmTYdHuSxdiEdUJUfcG4wSMPclYwa7v8qndQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773069639; c=relaxed/simple; bh=DqhTRr8CaIg0WOOkVXziM7LkJ185oCccscWNtuTlliQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=C2dtoUlVcVH6LEm4KLUIeSMOtyftAG2yzlL70qMrv1JBz06mD+gSAuLwWT4YeexO2uzSjFVVyU/4sVyad/IhIjq4oSWeS7HqFiBI5BPxvFhvnPEqKJTcSOIk7K/mmoyVy9EEORInK7w+RkqrvDyiKrfYLqF+vKTd++Tlz+3CG+s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=virtuozzo.com; spf=pass smtp.mailfrom=virtuozzo.com; dkim=pass (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b=lzaUvGkH; arc=none smtp.client-ip=130.117.225.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=virtuozzo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="lzaUvGkH" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=6UKsTiQKnFSM9Hj1ADDF9mPcImxzZ8Cs+q/b207zLVk=; b=lzaUvGkHwIlx 3YhsYfmd/9qscl1jiMZqll0fW8WYuSjIkMUEGYsUHz+cg+iiS+YwyYjir9Uh2qcci9Ecgx3Db0UkI Av7cLm+LsBpasPX7inZLBl306nW9V2XRHNDIadTS4Ol4aS+n5QRPFxVRRQZOco+oDt4L9Zf1qDle3 nvs6CFU5oKUd0TKaxss5hFeHTaA2I1OR+jBQhnqy/cl4mnGDeOzrYGrTKdNbDKPo17xaPrhN2ZisV F/3nwlm04V9Vq8PZQ9iCJM1OUSv3DVeLPr54Ehfl50OAjUcfLpUKgnUI1s+svvxv8ChhLI20/KwbR GoL4WgA0xlr4m1Ef5d/HYg==; Received: from [130.117.225.5] (helo=dev004.aci.vzint.dev) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vzcNW-006Tez-0e; Mon, 09 Mar 2026 16:20:13 +0100 Received: from dev004.aci.vzint.dev (localhost [127.0.0.1]) by dev004.aci.vzint.dev (8.16.1/8.16.1) with ESMTPS id 629FKKIR565249 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 9 Mar 2026 15:20:20 GMT Received: (from root@localhost) by dev004.aci.vzint.dev (8.16.1/8.16.1/Submit) id 629FKKb6565248; Mon, 9 Mar 2026 15:20:20 GMT From: Aleksei Oladko To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan , Aaron Conole , Ilya Maximets , Eelco Chaudron , Stefano Brivio Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, dev@openvswitch.org, Aleksei Oladko Subject: [PATCH net v4 3/5] selftests: net: rename pmtu.sh to pmtu-test.sh Date: Mon, 9 Mar 2026 15:20:11 +0000 Message-ID: <20260309152013.565216-4-aleksey.oladko@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260309152013.565216-1-aleksey.oladko@virtuozzo.com> References: <20260309152013.565216-1-aleksey.oladko@virtuozzo.com> 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" Rename the pmtu.sh test script to pmtu-test.sh. No functional changes are made, only the file name is updated. Signed-off-by: Aleksei Oladko --- tools/testing/selftests/net/Makefile | 2 +- tools/testing/selftests/net/{pmtu.sh =3D> pmtu-test.sh} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tools/testing/selftests/net/{pmtu.sh =3D> pmtu-test.sh} (100%) diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests= /net/Makefile index 605c54c0e8a3..8fa6ef771757 100644 --- a/tools/testing/selftests/net/Makefile +++ b/tools/testing/selftests/net/Makefile @@ -63,7 +63,7 @@ TEST_PROGS :=3D \ netns-name.sh \ netns-sysctl.sh \ nl_netdev.py \ - pmtu.sh \ + pmtu-test.sh \ psock_snd.sh \ reuseaddr_ports_exhausted.sh \ reuseport_addr_any.sh \ diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/= net/pmtu-test.sh similarity index 100% rename from tools/testing/selftests/net/pmtu.sh rename to tools/testing/selftests/net/pmtu-test.sh --=20 2.43.0 From nobody Thu Apr 9 10:33:17 2026 Received: from relay.virtuozzo.com (relay.virtuozzo.com [130.117.225.111]) (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 36FBD3D9055; Mon, 9 Mar 2026 15:20:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=130.117.225.111 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773069639; cv=none; b=kYcQxYKb4/v5nX/t4mInJm04neHB7gD+zNhtvC6vvSnrtlOOBHi/LPXpXqQqZwApF6VclzBM0v9ntowb5lropx4ttQOeb8f4IN13RL8SGrkkmk+jukM5+6QqWtx9GE7IeDASGYO8jAJNIyTP7nwunJloQlVz0eao5X6trW8wHnw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773069639; c=relaxed/simple; bh=r1R0k+yX9Ms7pIHEWvGqPr7hU9BrJYZBEPB0TBiT+Co=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lLSeu6bTbgQ5LSWGNiiWIpF/EzVUW4L812PjCWNF7HiIUh5onKIR0eNR35BGnbbeoZQ7GskHcBg0hhzmVA1c9PGmB01cYPSJWD330bznrhdW+5efQm6PgLZu2Pv6NclvgEpE21W806wOdc7FMC2aq7YmKhpSvQW/zkNmJTdYC8M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=virtuozzo.com; spf=pass smtp.mailfrom=virtuozzo.com; dkim=pass (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b=GifeNRD1; arc=none smtp.client-ip=130.117.225.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=virtuozzo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="GifeNRD1" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=Vr7al+iWN+e4tYvS2CbIZPEqTcbsm+V8cnInmH15LVQ=; b=GifeNRD1Q1T8 l9ffQIoyLHST0QKW6NZ364fGyV2nyUxDnjMHNEtwy8co9gtCKy/VgoDRFDenF4zk2yyGMS8hP7Gho kroW/RGODzYJPWqH79FYAPUxMnIkCnFBzFxxwMfvZS+U+n2sQ28K+Y9JzYbmjGKpeHY7ljyWBlVJe eiaIuFOUKznhAcuFnw9gqErLotfb6MicUzlI/tzHDBNO2GV7rFA550JGqofiVTuetDkkVFvC4FFoe 9CLRDmfNaI9ycuXcuvgYqJ847ulB2IKhfEqM0blcnc51MEUAU9idv/kLxhyXNoGDSU01eh/J0hCPZ O2hsX/2gLxpHmSlOQS40rQ==; Received: from [130.117.225.5] (helo=dev004.aci.vzint.dev) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vzcNX-006Tf9-1Z; Mon, 09 Mar 2026 16:20:14 +0100 Received: from dev004.aci.vzint.dev (localhost [127.0.0.1]) by dev004.aci.vzint.dev (8.16.1/8.16.1) with ESMTPS id 629FKMSZ565253 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 9 Mar 2026 15:20:22 GMT Received: (from root@localhost) by dev004.aci.vzint.dev (8.16.1/8.16.1/Submit) id 629FKLF8565252; Mon, 9 Mar 2026 15:20:21 GMT From: Aleksei Oladko To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan , Aaron Conole , Ilya Maximets , Eelco Chaudron , Stefano Brivio Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, dev@openvswitch.org, Konstantin Khorenko , Aleksei Oladko Subject: [PATCH net v4 4/5] selftests: net: run pmtu.sh in netns to avoid host firewall interference Date: Mon, 9 Mar 2026 15:20:12 +0000 Message-ID: <20260309152013.565216-5-aleksey.oladko@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260309152013.565216-1-aleksey.oladko@virtuozzo.com> References: <20260309152013.565216-1-aleksey.oladko@virtuozzo.com> 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" From: Konstantin Khorenko The pmtu.sh kselftest sets up a multi-namespace test topology where the host network itself is part of the test setup. Test packets originating from the created namespace are expected to reach test interface created in the host. When firewall rules are present on the host, this traffic may be blocked, causing the test to fail. Run the test in an isolated network namespace to avoid interference from host firewall rules. Signed-off-by: Konstantin Khorenko Signed-off-by: Aleksei Oladko --- tools/testing/selftests/net/Makefile | 3 ++- tools/testing/selftests/net/pmtu-test.sh | 4 ++-- tools/testing/selftests/net/pmtu.sh | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100755 tools/testing/selftests/net/pmtu.sh diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests= /net/Makefile index 8fa6ef771757..09bcfd2db593 100644 --- a/tools/testing/selftests/net/Makefile +++ b/tools/testing/selftests/net/Makefile @@ -63,7 +63,7 @@ TEST_PROGS :=3D \ netns-name.sh \ netns-sysctl.sh \ nl_netdev.py \ - pmtu-test.sh \ + pmtu.sh \ psock_snd.sh \ reuseaddr_ports_exhausted.sh \ reuseport_addr_any.sh \ @@ -190,6 +190,7 @@ TEST_FILES :=3D \ fcnal-test.sh \ in_netns.sh \ lib.sh \ + pmtu-test.sh \ settings \ # end of TEST_FILES =20 diff --git a/tools/testing/selftests/net/pmtu-test.sh b/tools/testing/selft= ests/net/pmtu-test.sh index a3323c21f001..2ba6bc0252f0 100755 --- a/tools/testing/selftests/net/pmtu-test.sh +++ b/tools/testing/selftests/net/pmtu-test.sh @@ -976,7 +976,7 @@ setup_ovs_bridge() { run_cmd ip link set ovs_br0 up =20 run_cmd ${ns_c} ip link add veth_C-A type veth peer name veth_A-C - run_cmd ${ns_c} ip link set veth_A-C netns 1 + run_cmd ${ns_c} ip link set veth_A-C netns $$ =20 run_cmd ip link set veth_A-C up run_cmd ${ns_c} ip link set veth_C-A up @@ -985,7 +985,7 @@ setup_ovs_bridge() { setup_ovs_add_if veth_A-C =20 # Move veth_A-R1 to init - run_cmd ${ns_a} ip link set veth_A-R1 netns 1 + run_cmd ${ns_a} ip link set veth_A-R1 netns $$ run_cmd ip addr add ${prefix4}.${a_r1}.1/${veth4_mask} dev veth_A-R1 run_cmd ip addr add ${prefix6}:${a_r1}::1/${veth6_mask} dev veth_A-R1 run_cmd ip link set veth_A-R1 up diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/= net/pmtu.sh new file mode 100755 index 000000000000..1805fa44a2de --- /dev/null +++ b/tools/testing/selftests/net/pmtu.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +./in_netns.sh ./pmtu-test.sh "$@" --=20 2.43.0 From nobody Thu Apr 9 10:33:17 2026 Received: from relay.virtuozzo.com (relay.virtuozzo.com [130.117.225.111]) (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 397973D7D6B; Mon, 9 Mar 2026 15:20:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=130.117.225.111 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773069639; cv=none; b=DISPbdWy57MQUOjwexUYG9uYdJmuhpJPOO7rjai9pPs0s1c8ytBqUXBJRifNDwwifWlRxMsvuThtMOnCfAsrijer6wsARTOgpo9ZG4iOeW8S8QqiUWBeF8B30J7BLWJVFMl6oPunD+naLFV/95D6aBM0uXcliKrPOBm8MH8VQfs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773069639; c=relaxed/simple; bh=fAwcoqurxOiP2mlKpuJQinVz/GPCAjW6iExhrTuyN0c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oeapVOBLU0mf/BdAo0LHl4OixrhSdyLTtE4Cd+1wmnHENzkzQTKL748XT/jUeJ0CYnSZxHXQs1/C8qeTdWqWLZmiMiVMCisYyxJY94ffJm+cibYWm7PubR8khyLxATknE2dvemsRK6cfZ2sj3nDr9nsMCbqmXO/UwPStu/DhQoM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=virtuozzo.com; spf=pass smtp.mailfrom=virtuozzo.com; dkim=pass (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b=KCqC08FQ; arc=none smtp.client-ip=130.117.225.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=virtuozzo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="KCqC08FQ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=bW5DtRsamE95vGAdJSFvHf3U93xrRQ4W2Xdb4GAprTM=; b=KCqC08FQ+h5q nBO4+/+g/ETq3ohSG0JmPV13Wqpbtj2b5WJ0J6hbWXkEEP+qw1cl+Z2Ru02gmd/f+KiA7XVcjP2oM bvEdcL+qgsGl8816mr2gZnGoEtiaTzrDuoZoQZo52DMKBaDi5mpJiQmUBfH8R9MZllTBG+vmxtc8p i4rfRMFWSEJSobxKi/KD78jGUR8MYf6sQzA0k+tH2Db97SIaCSHS/S99dv97dZuF/Y56x0oe4OJWK Ix75BMBNysvA7OWQY2txk5jl4xdoIvJ3bJcSLyiagbvsZIt7u7D6pAeUKPdwr0WImAtlI+TOOAIQQ TaygLYPKYv8JUXBpP1Pv3Q==; Received: from [130.117.225.5] (helo=dev004.aci.vzint.dev) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vzcNY-006TfL-2i; Mon, 09 Mar 2026 16:20:16 +0100 Received: from dev004.aci.vzint.dev (localhost [127.0.0.1]) by dev004.aci.vzint.dev (8.16.1/8.16.1) with ESMTPS id 629FKNpU565258 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 9 Mar 2026 15:20:23 GMT Received: (from root@localhost) by dev004.aci.vzint.dev (8.16.1/8.16.1/Submit) id 629FKNbj565256; Mon, 9 Mar 2026 15:20:23 GMT From: Aleksei Oladko To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan , Aaron Conole , Ilya Maximets , Eelco Chaudron , Stefano Brivio Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, dev@openvswitch.org, Aleksei Oladko , Konstantin Khorenko Subject: [PATCH net v4 5/5] selftests: net: io_uring_zerocopy: enable io_uring for the test Date: Mon, 9 Mar 2026 15:20:13 +0000 Message-ID: <20260309152013.565216-6-aleksey.oladko@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260309152013.565216-1-aleksey.oladko@virtuozzo.com> References: <20260309152013.565216-1-aleksey.oladko@virtuozzo.com> 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" The io_uring_zerocopy.sh kselftest assumes that io_uring support is enabled on the host system. When io_uring is disabled via the kernel.io_uring_disabled sysctl, the test fails. Explicitly enable io_uring for the test by setting kernel.io_uring_disabled=3D0. Save the original value of kernel.io_uring_disabled before changing it and restore it in cleanup handler to ensure the system state is restored regardless of test outcome. Signed-off-by: Aleksei Oladko Signed-off-by: Konstantin Khorenko --- tools/testing/selftests/net/io_uring_zerocopy_tx.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/testing/selftests/net/io_uring_zerocopy_tx.sh b/tools/te= sting/selftests/net/io_uring_zerocopy_tx.sh index 123439545013..8c3647de9b4c 100755 --- a/tools/testing/selftests/net/io_uring_zerocopy_tx.sh +++ b/tools/testing/selftests/net/io_uring_zerocopy_tx.sh @@ -77,9 +77,13 @@ esac =20 # Start of state changes: install cleanup handler =20 +old_io_uring_disabled=3D0 cleanup() { ip netns del "${NS2}" ip netns del "${NS1}" + if [ "$old_io_uring_disabled" -ne 0 ]; then + sysctl -w -q kernel.io_uring_disabled=3D"$old_io_uring_disabled" 2>/dev/= null || true + fi } =20 trap cleanup EXIT @@ -122,5 +126,10 @@ do_test() { wait } =20 +old_io_uring_disabled=3D$(sysctl -n kernel.io_uring_disabled 2>/dev/null |= | echo "0") +if [ "$old_io_uring_disabled" -ne 0 ]; then + sysctl -w -q kernel.io_uring_disabled=3D0 +fi + do_test "${EXTRA_ARGS}" echo ok --=20 2.43.0