[ACT][PATCH 1/1] UBUNTU: SAUCE: ubuntu_kernel_selftests: Bump optmem_max for net bench tests
Andrei Gherzan
andrei.gherzan at canonical.com
Fri Feb 3 18:14:04 UTC 2023
BugLink: https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1960907
One of the reasons why a zerocopy send operation could fail with ENOBUF
is when the optmem limit is reached[1]. The default value is currently
set at 20480 which is insufficient for edge cases especially around
benchmarking tests.
This change proposes an optmem_max increase to 2048000. It fixes for
example "sendmesg: No buffer space available" sporadic errors in
udpgso_bench_tx/udpgso_bench.sh
[1] https://www.kernel.org/doc/html/latest/networking/msg_zerocopy.html#transmission
Signed-off-by: Andrei Gherzan <andrei.gherzan at canonical.com>
---
ubuntu_kernel_selftests/ubuntu_kernel_selftests.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py b/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py
index 5d87f82e..6335abac 100644
--- a/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py
+++ b/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py
@@ -216,8 +216,16 @@ class ubuntu_kernel_selftests(test.test):
if test_name.endswith('-build'):
os.chdir(self.srcdir)
if "net" in test_name:
- cmd = "sh -c 'echo 1 > /proc/sys/net/ipv4/conf/all/accept_local'"
- utils.system(cmd)
+ cmds = []
+ cmds.append("sh -c 'echo 1 > /proc/sys/net/ipv4/conf/all/accept_local'")
+ # The net benchmarching tests (e.g. udpgso) can fail when
+ # optmem limit is reached.
+ # https://www.kernel.org/doc/html/latest/networking/msg_zerocopy.html#transmission
+ # LP #1960907
+ cmds.append("sh -c 'echo 2048000 > /proc/sys/net/core/optmem_max'")
+ for cmd in cmds:
+ utils.system(cmd)
+
if self.kv >= 415:
# net selftests use a module built by bpf selftests, bpf is available since bionic kernel
if self.kv == 506:
--
2.34.1
More information about the kernel-team
mailing list