From nobody Fri Apr 3 01:35:19 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 916CD2877C3; Sat, 21 Mar 2026 21:59:32 +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=1774130374; cv=none; b=qn5tU0FhgKMtNI9v3BdwUoBZ0REpC0poXHOhzvAcJ/A0bP+IwnUgsqbY5oPbYdFhvnoldHO1VqomA0DxRhxscvoLoE2bpgQjIQ2ppf4xq8+UU1RkQURwyk7pj0T7F/e+EPGY5a3d5+T7XkpYn+a0CHe6LBxaXy9n7q48gBuiFrc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774130374; c=relaxed/simple; bh=502L+b8VhHD2hfOY+Vac3X+4b9aG5ol0a3NFHml8MFI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=X3WIawQWU5so0F8rPUzijW8nMKUT54ifaZgRkVSxGzEhxGplfQQiSL35P0kezVN+bCpn//lbAwY8t++PaeC+swQPxyJlg81zrj/rY9QY97mFY4YNqqvZQ7fZag45OfuS0bM9NbCAJU1XS2SVbTXtYlRBCjOe+sBDl+vrnvpbrbU= 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=eoCvyqrD; 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="eoCvyqrD" 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=eoCvyqrDQYB0 Vmlvgxhwe8wNBT3wZZyIBvuIWnKuMc4nYVsa2ZGuE+2ubh3Q+n0dpR39xXCfQPV1Ap9qVRLWwc0LT IXmdsAZcZKqd5UzGORFLm4FkDJ1sIAsPK7A/0hjFaGRs7+JEFZC16f7XnE4f7u2+LGwFo1cxk+xjj Nyx/eCj49wHXANFkn6+gpJ0p1e4Easudbvcei4rDjxlgO8lbJQw2wK5Gj0k7ZIvMF9MWGrpXJ5G8P 97q3hJGvmAujXTPX+2CIegW6EVxn5fnLGMRZAPYRMFtw/BNsdQz8WBSVW16ba9hfBaYr70PVEd1kv U0yoKHILbsz68wdn1MVhUQ==; 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 1w44Jo-001iAk-3B; Sat, 21 Mar 2026 22:59:08 +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 62LLxD6V175488 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 21 Mar 2026 21:59:13 GMT Received: (from root@localhost) by dev004.aci.vzint.dev (8.16.1/8.16.1/Submit) id 62LLxDv9175487; Sat, 21 Mar 2026 21:59:13 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-next v6 1/4] selftests: net: run reuseport in an isolated netns Date: Sat, 21 Mar 2026 21:59:05 +0000 Message-ID: <20260321215908.175465-2-aleksey.oladko@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260321215908.175465-1-aleksey.oladko@virtuozzo.com> References: <20260321215908.175465-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 Fri Apr 3 01:35:19 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 9165B253B42; Sat, 21 Mar 2026 21:59:32 +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=1774130374; cv=none; b=qRQFG9c6zJ9qG/hUrKu1ArF12PM3w7L4U2ZsDmh4lGvYuP+DrAdDW3Ia1SvVEpB65ed6Wo2wpt3LzvRegoxytNzObX5T9CwaNWvoB74cVHuOfk2F8jUMN71tk4srdMYyD2Hu81CZJvPh2RPJHE1zSc1xzaOAF+K9RhfGXJ3zm84= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774130374; c=relaxed/simple; bh=NYNrIM47vI2S3OfQPKB2PMvGfWBajJF++gQu1ycl6YI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XzK9VY18fIRuIO890TMk0dbX/uIwmR2O0F7ZPf+v+FgiXb38ndWJs2Xpmxq/HOZQoY+A38z4pqzcT62WsIHNP/PL1dHF+WZrDENbslU461hdHKhaEFBZ7VytkHlNvsqQeAePEPELusvajQW/L6rtPCFnM/4iUMaxmvtewB+2FQc= 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=aDx9xy7y; 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="aDx9xy7y" 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=KUlpielPZ4G3PXX4tBLiW1wz4LZTdTz/YOWsJyRcMfA=; b=aDx9xy7yZggj wimig9yHCnGq8I5HVm28RbiAIKMWd16S7/xonim9QJ61PoGOo6doyYJE+uNbf08lobi9HofCcAzMz 2eh5/5Tv+H+j/nrx4smnvGs3nBk/0YQGDX/QbigyLsW61KR4db//sAuL7v1tyTVhUDNGV+QQZvFQF AlltZeoEUlVfj0D7hQE37gh6ZXwzKHxYgUo4SkBABsxSIeaA1f9bVY6h1eI8c2dJitt/DHxMmYS1o 3slJEWwIR30NrpO9QBq9u1lAQBcs2f2UFn/kcx64EFLMM9IifZVzQrsRky5XulEjCMURr5+D2Wope 8HnMIscExouzRc8EX0y5sA==; 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 1w44Jq-001ibR-14; Sat, 21 Mar 2026 22:59: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 62LLxEh6175492 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 21 Mar 2026 21:59:15 GMT Received: (from root@localhost) by dev004.aci.vzint.dev (8.16.1/8.16.1/Submit) id 62LLxEs7175491; Sat, 21 Mar 2026 21:59:14 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-next v6 2/4] selftests: net: rename pmtu.sh to pmtu-test.sh Date: Sat, 21 Mar 2026 21:59:06 +0000 Message-ID: <20260321215908.175465-3-aleksey.oladko@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260321215908.175465-1-aleksey.oladko@virtuozzo.com> References: <20260321215908.175465-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 6bced3ed798b..f18d28775c80 100644 --- a/tools/testing/selftests/net/Makefile +++ b/tools/testing/selftests/net/Makefile @@ -66,7 +66,7 @@ TEST_PROGS :=3D \ netns-sysctl.sh \ nl_netdev.py \ nl_nlctrl.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 Fri Apr 3 01:35:19 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 2D267312819; Sat, 21 Mar 2026 21:59:33 +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=1774130374; cv=none; b=ZpaQoVR6DIW3jyOdCWzF8ex3PR5QAko9XZVrqgmhPZFRnmFSkuhQpp5fI0szuG2JKb3Rlv/sNncMsw4b7q0bb6KlvxRPOWi6XXrxmAEDsyQ8OnLqOmayVT9OHXzgG/ZbAN1PbHEtC76K3xaYhyEuT06o8OlCcS+KbvqkYnfFqog= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774130374; c=relaxed/simple; bh=h4SpN64FqvVFNc522ovC5+ZOYQUqCVKhFX8TykzZNsA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q2XwY1tkuVKX3KHLkBM7HA+6T3SObeEGuP/BVjoHOsNi0t+GhSNQQHth8xaE+4l774YP7K7BUUrmdpfWZ7aTfZMdKV5gS7ARKzro65wOVd80N8CnhYL8ux7AW0RsRv1GZkdRTFb3hFen1RzP/QAdf6kIhhCQ5LHyb3cji0txR9A= 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=MpdmNRCn; 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="MpdmNRCn" 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=g9dpOH5uNn1g7NlIWt1IfNFaEx5t1yGTMxCQaSA8U4I=; b=MpdmNRCnhe3u ws6A0c0b0MRQisZBdjuYemFrZOByYriReqRnIjvxselkrd5BDX/4Z6vZogRi3fH9bW6Z8dP/edeTc RWtM42FQlVSI/PskeZkurTqfX1NPAn2v8FAxGl9FNTToORripOiabYAttQe63jZzKR0VNB90KBmhV 11a8pAbpDcTjJ34zA0TEQsSe/xvR+t73n4AAZhgZ6FQyxqhau8epbjHY5Y2akV9jDzSfqmElTdFe0 glOPGzIXXQziYmENEK3qqnxu7HsHj1zdGMKc3OfABi1AhSuMFV4jk/KZqTFj+WrqSiD6xeTfrzKrs fdG1MWjo5ySRopNH6srdIQ==; 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 1w44Jr-001ijN-1z; Sat, 21 Mar 2026 22:59:11 +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 62LLxGZk175496 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 21 Mar 2026 21:59:16 GMT Received: (from root@localhost) by dev004.aci.vzint.dev (8.16.1/8.16.1/Submit) id 62LLxFnW175495; Sat, 21 Mar 2026 21:59:15 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-next v6 3/4] selftests: net: run pmtu.sh in netns to avoid host firewall interference Date: Sat, 21 Mar 2026 21:59:07 +0000 Message-ID: <20260321215908.175465-4-aleksey.oladko@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260321215908.175465-1-aleksey.oladko@virtuozzo.com> References: <20260321215908.175465-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 f18d28775c80..fedbe24a1e64 100644 --- a/tools/testing/selftests/net/Makefile +++ b/tools/testing/selftests/net/Makefile @@ -66,7 +66,7 @@ TEST_PROGS :=3D \ netns-sysctl.sh \ nl_netdev.py \ nl_nlctrl.py \ - pmtu-test.sh \ + pmtu.sh \ psock_snd.sh \ reuseaddr_ports_exhausted.sh \ reuseport_addr_any.sh \ @@ -194,6 +194,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 Fri Apr 3 01:35:19 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 2225530EF95; Sat, 21 Mar 2026 21:59:33 +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=1774130374; cv=none; b=GgJQTSyZlU1skUv8fZKYIBNgXfQJ5S6lhr/pycaRXEytnIbzYmbA1tV/9JqF5rYVvx83Eo3nZVUlitm4ir1qGLpfDzdya1KyxCk47geFMUzrDhRmmCpmXdhhvtU+vFcQIo50T3Hwp/g2bcnFKQjXia1hjj/YTufwGbA0/O56FUQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774130374; c=relaxed/simple; bh=fAwcoqurxOiP2mlKpuJQinVz/GPCAjW6iExhrTuyN0c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HHcYcZaKazsM3qOIBHNkMVBKFQtupOmo66YEpS8tbcFwtOxnhfm39qZvwrR6+ErgAkR3EjooYpRTQ8GSU0f3h3ukIkAxbP2K32w1JLudMbQLqhvO9fLA6+2tOHXOjscjOrrryqLAs+LFn5SOn7QJ4T8MysJAzBR186Vpo+2ZoiA= 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=Nc8YdjLt; 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="Nc8YdjLt" 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=Nc8YdjLtPx4P ZoUgrUH8FY64ykGRfJHs4IXyvyeUb1GOub3+Ju57TJBiLdlqJ0dsYiS2s7d+pbK1JAbprB4ent8wU +a3Ule8eZl4ISafrMYLPUxnE8ytQrny4wSw/kseXa9YlY93XaA5ZQSduG7bDesDDcUDd4zL5sF4du dKy4ha3Ocg4VNqIr06SDkN/Ty9dYCWyjbs97hNL4Heu2bjWmnmw4VfrG8R/N4IJWrV3DZDJcJsZwX 6+N9ImyVKZxlxm4EoE5dE2lQ87HMs7dBOxc6RG/rvwXGFkZiDZnBeyfHd1jlL0dwl/R+16QcZPjUQ etk7c/qT4lZF2Y4lgOF2xA==; 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 1w44Js-001ijX-30; Sat, 21 Mar 2026 22:59: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 62LLxHdE175500 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 21 Mar 2026 21:59:17 GMT Received: (from root@localhost) by dev004.aci.vzint.dev (8.16.1/8.16.1/Submit) id 62LLxHKn175499; Sat, 21 Mar 2026 21:59: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 , Konstantin Khorenko Subject: [PATCH net-next v6 4/4] selftests: net: io_uring_zerocopy: enable io_uring for the test Date: Sat, 21 Mar 2026 21:59:08 +0000 Message-ID: <20260321215908.175465-5-aleksey.oladko@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260321215908.175465-1-aleksey.oladko@virtuozzo.com> References: <20260321215908.175465-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