lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <483097a3-92ec-aedd-60d9-ab7f58b9708d@gmail.com>
Date:   Wed, 4 Dec 2019 12:03:57 -0800
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Thadeu Lima de Souza Cascardo <cascardo@...onical.com>,
        netdev@...r.kernel.org
Cc:     davem@...emloft.net, shuah@...nel.org,
        linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
        posk@...gle.com
Subject: Re: [PATCH] selftests: net: ip_defrag: increase netdev_max_backlog



On 12/4/19 11:53 AM, Thadeu Lima de Souza Cascardo wrote:
> When using fragments with size 8 and payload larger than 8000, the backlog
> might fill up and packets will be dropped, causing the test to fail. This
> happens often enough when conntrack is on during the IPv6 test.
> 
> As the larger payload in the test is 10000, using a backlog of 1250 allow
> the test to run repeatedly without failure. At least a 1000 runs were
> possible with no failures, when usually less than 50 runs were good enough
> for showing a failure.
> 
> As netdev_max_backlog is not a pernet setting, this sets the backlog to
> 1000 during exit to prevent disturbing following tests.
> 

Hmmm... I would prefer not changing a global setting like that.
This is going to be flaky since we often run tests in parallel (using different netns)

What about adding a small delay after each sent packet ?

diff --git a/tools/testing/selftests/net/ip_defrag.c b/tools/testing/selftests/net/ip_defrag.c
index c0c9ecb891e1d78585e0db95fd8783be31bc563a..24d0723d2e7e9b94c3e365ee2ee30e9445deafa8 100644
--- a/tools/testing/selftests/net/ip_defrag.c
+++ b/tools/testing/selftests/net/ip_defrag.c
@@ -198,6 +198,7 @@ static void send_fragment(int fd_raw, struct sockaddr *addr, socklen_t alen,
                error(1, 0, "send_fragment: %d vs %d", res, frag_len);
 
        frag_counter++;
+       usleep(1000);
 }
 
 static void send_udp_frags(int fd_raw, struct sockaddr *addr,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ