From nobody Mon Apr 6 10:45:06 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 15A923612FC; Thu, 19 Mar 2026 10:47:23 +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=1773917246; cv=none; b=RS8q2liBmaXLNr/5eDRHjyRsfgeDTwHKvxbc1ymg6k90uKRg9iwkfNWIofxtDYsNaCV5P3kAiAT4L3uNoXSV7Xb9d5ZkungSACuMbzO/M9xK4LBfPGOJrO8i9wGt6YWDAOS/rQC9UO7TISNywb8XEE06aJt/StUuegig+sGImjs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773917246; c=relaxed/simple; bh=502L+b8VhHD2hfOY+Vac3X+4b9aG5ol0a3NFHml8MFI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A11uIg3w9O7XiqPg6gFtN8K0q5vud8DtgACwTEui8XSinaXYCqSyYThBQ/nFENfTIXfXckLd5mNDnzRRxOK+5keyeAIglmvWqL1/E57IbtMY8mSE9RBOYxKO5UPjdX8m3SSSqiUz1vlIE36gZJbEBx8poQi/KJRNVvuiXB3BcCU= 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=HtvSqplF; 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="HtvSqplF" 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=HtvSqplFc5SG NRMSHm5Ik8EwERo1Z7T80yMviqQ0ixLPoDBpiwD+Q/Lqe7P0atT+Zp6Lt4OFy4JJQcdkgkNfS61a3 K4i9JbGJfb8ysOu+2V7h6+0d484PnbH4sm2cCqOmNzOmJWbm1OiZ72cL/N3hFmoVsDiOf4gWZ6pAi Csv0+xU3yPCtxrkUtQjArJZtMqh1dOwj4jozXGVFYFIyjmav9K9pr6qNW4C8bwCNK21kg7AtEQkGD bnbgCTV46qQhWAePJRbxZcJPzqV30BWupNxMrJ+6c6w6q2XkO8s78ZCMbrfunh1out1wptTuSBQU5 yTfYO1Wb4u8WjkLfJgNhdw==; 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 1w3AdD-007bwN-08; Thu, 19 Mar 2026 11:31:26 +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 62JAVSRh146136 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 19 Mar 2026 10:31:28 GMT Received: (from root@localhost) by dev004.aci.vzint.dev (8.16.1/8.16.1/Submit) id 62JAVRcE146135; Thu, 19 Mar 2026 10:31:27 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 v5 1/4] selftests: net: run reuseport in an isolated netns Date: Thu, 19 Mar 2026 10:31:20 +0000 Message-ID: <20260319103123.146112-2-aleksey.oladko@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260319103123.146112-1-aleksey.oladko@virtuozzo.com> References: <20260319103123.146112-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 Mon Apr 6 10:45:06 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 A84723C4555; Thu, 19 Mar 2026 10:47:18 +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=1773917242; cv=none; b=crfCsKv9FI7fMSheN4tsfH8Vj2aSl+V4CW2ORzUNiGne+xJbUIO1U0Ag5cL/jTPj8pIETxmB3BB7CvT3XoUyaQ2Mw+3O80kJnHBQ4p2L5vCSIY2wJfDtHVsNUJzs+yxfbGkao6K1SZH6DHtIXP6Av+QVzzO6ebCluiEXACst4O4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773917242; c=relaxed/simple; bh=DqhTRr8CaIg0WOOkVXziM7LkJ185oCccscWNtuTlliQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LQ2U9hMk6NywZwWycBK29AvCXSaZEi9TsfodjmrkN43qa1YYdvc0kDZxVuxb7ozMqnNzGOkpNxUVn6XlvJ9ivARxyS8Zpk9mHLMDsboAfokdoyOsBXZ8ehjyZnsm/tweCp67h6jd2aUzxK2GFgJ9Fndaxt18bMW9b+lhouI/1jQ= 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=SDQcj09z; 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="SDQcj09z" 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=SDQcj09zXqDJ k4bEtMa2LE6YAHGV4YAXnmQ5lLU2PeqIOm28/RsZOKiOGXtKkSzBReWipgmKkDN+tevL8VopeSSaw SiRquE31F1SWjhw7duXvW2Cn4nStyegafF7ELvKjdfxpU5R64izzCB2qv1jpEDZToTL4vTta6Vy+i DUwQVj7dzS5VwtuekSYxhfv7fSkSGMY3SSDfR0n5sjiqpNuZUnibbU37jYCQrhqXUDGid2RCSZlGj 1qIE0OiW08cWVjr8+AK+6oXYnkq4ggwOY7R9lHCG4GH4dqqg/g/MNuxSMuqMlmf+4Venni63c6Ijn 7vQn3PCOatt6MasKc369Eg==; 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 1w3AdE-007bwS-1I; Thu, 19 Mar 2026 11:31:28 +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 62JAVT4p146140 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 19 Mar 2026 10:31:29 GMT Received: (from root@localhost) by dev004.aci.vzint.dev (8.16.1/8.16.1/Submit) id 62JAVTfG146139; Thu, 19 Mar 2026 10:31:29 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 v5 2/4] selftests: net: rename pmtu.sh to pmtu-test.sh Date: Thu, 19 Mar 2026 10:31:21 +0000 Message-ID: <20260319103123.146112-3-aleksey.oladko@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260319103123.146112-1-aleksey.oladko@virtuozzo.com> References: <20260319103123.146112-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 Mon Apr 6 10:45:06 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 002423612FC; Thu, 19 Mar 2026 10:47:13 +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=1773917236; cv=none; b=WJaFc3nFGIPw0bNfo2lojsnRD5fHSa+BTidSt+6RC1xJnPVzK9+XapTPOO9XFNO4gFPQR4k86XPzedMqX9XAtO2LnKjHLJvgiwYhw/ujSN3XTxTlcAAz6fkeyss5dqrqvS086uhNNnvc+r6pHcOG4nlw9gFij02uMl1ACIXYQgI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773917236; c=relaxed/simple; bh=r1R0k+yX9Ms7pIHEWvGqPr7hU9BrJYZBEPB0TBiT+Co=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TGAJ7inB2XrSG5+lGRSqWfz6vFo2fXFd2HC4dmKgI1Ng2TZhWQGx+s+4dYIyOsAe3/pYGS6H+EPjEVSMRmums2a59XN128oC2+lb0MTIaJUaoBDek6DsS3U4fr8orGWTvcOTWastox9T8aSiPECpFssiyWLRCaDS6nKdPnqzmVg= 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=wthqMr6O; 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="wthqMr6O" 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=wthqMr6OvGD/ p22Cuncp6fy25Wp57ABvQ2EsXQEqmf5xSsvUYLYOJ2IRBEg1jlmxO6x7FGObMlmtudM+JjAHqvwuN qTWOwT061m8CQe1yodhFtstHa+pAHo4jkqOoEKXUpFdeY3yltfWt38L3401Dj1mdN/+K6Xyjw2Hch HjkZgS6PrdwASxuSLd+u8PxuY2rQre5FBtSpj9YY+/ZnoXCkors5hR84exwATm52IZ6GiIJRJ0gdK 85gkGA10HqcdGJ0u0V8XDgX0KQf122zHvYLUW2v/TomFiwZvGVkxPS/3VsZ1jeNvyOBWG+NhS0d0Q M4dQ1JvbnCVgDlWDq4fH4A==; 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 1w3AdF-007bwg-22; Thu, 19 Mar 2026 11:31:29 +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 62JAVUDs146144 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 19 Mar 2026 10:31:30 GMT Received: (from root@localhost) by dev004.aci.vzint.dev (8.16.1/8.16.1/Submit) id 62JAVU4v146143; Thu, 19 Mar 2026 10:31:30 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 v5 3/4] selftests: net: run pmtu.sh in netns to avoid host firewall interference Date: Thu, 19 Mar 2026 10:31:22 +0000 Message-ID: <20260319103123.146112-4-aleksey.oladko@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260319103123.146112-1-aleksey.oladko@virtuozzo.com> References: <20260319103123.146112-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 Mon Apr 6 10:45:06 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 8A46F3C3BF7; Thu, 19 Mar 2026 10:47:07 +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=1773917229; cv=none; b=Ku8EWvqpXxll0YFdeuDp2d3VVZpdPcWZ0G0nL1R2zoKdt6G+D6OiJnV6+o5koAe4/DyoNTV0K5YwTTk940dMPZ73I3gSmDjSCuYRcpX/NKcm8I86UVIubENPtseblWU3aT7yS5gt3nii6jG11KhZb/CV+Xp0uqlF9+vlGNKxkOE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773917229; c=relaxed/simple; bh=fAwcoqurxOiP2mlKpuJQinVz/GPCAjW6iExhrTuyN0c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SIXIU+skwkTmNuyKxxlk5ubQ8Mk8apuHjYjoz17oFSdwO0tcFjMQwUoYIXjkdbKD44att8XcezlEq2zOAk5nhCS6cLYFPVLhvgvFJDmgx0mEe6rQaz+uwlIvvLEkoVMoxmU3Un0mv8ikuQRyewR91/2z+tbKRULbnQCY1oHfRlk= 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=VxO7fPvb; 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="VxO7fPvb" 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=VxO7fPvbSpR2 lhJvIYwo0lloUnvTP0ZZev4MqvlQ9MEIfDBjRZFT9Nl6h4CZ3eAYq0PBoxum/pPEB2/hvwPc5qbEg JQzHfmf/0E+YmHMkyfP15UKM4/iirChjTvv+0Sl2OzzQlTbPO3SizKjZAEooXPC7owpc97x8fewVS zxQXpjugvC/rG2wF4VsDksuEhvM9wpR9frzvlYZDZ5B9f0qEtn0Lv0W2v/WBM4Fxf9BhDbP7LIhSM eAxzEaldhzHodDKzthC5AHJdj1vhBYsDwCJElbig2ZGxIE7lRoL2eYd3NMafqFGGY5Fj4/9/wTYS5 aBQVQBVjI4HUw0hpUUn9UA==; 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 1w3AdG-007bwq-3C; Thu, 19 Mar 2026 11:31:30 +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 62JAVVoA146148 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 19 Mar 2026 10:31:32 GMT Received: (from root@localhost) by dev004.aci.vzint.dev (8.16.1/8.16.1/Submit) id 62JAVVTt146147; Thu, 19 Mar 2026 10:31:31 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 v5 4/4] selftests: net: io_uring_zerocopy: enable io_uring for the test Date: Thu, 19 Mar 2026 10:31:23 +0000 Message-ID: <20260319103123.146112-5-aleksey.oladko@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260319103123.146112-1-aleksey.oladko@virtuozzo.com> References: <20260319103123.146112-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