selftest/tcp-ao: Work on namespace-ified sysctl_optmem_max
authorDmitry Safonov <dima@arista.com>
Fri, 22 Dec 2023 01:59:07 +0000 (01:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jan 2024 13:27:48 +0000 (13:27 +0000)
commit80057b2080a8f80b93c6f7b474909ccda8a21b09
treec63a5de03c933e43be5ec7073e4a3a20a126a67e
parent72cd9f8d5a9925fb8ccedaf9b42ccf5fc955a716
selftest/tcp-ao: Work on namespace-ified sysctl_optmem_max

Since commit f5769faeec36 ("net: Namespace-ify sysctl_optmem_max")
optmem_max is per-netns, so need of switching to root namespace.
It seems trivial to keep the old logic working, so going to keep it for
a while (at least, until kernel with netns-optmem_max will be release).

Currently, there is a test that checks that optmem_max limit applies to
TCP-AO keys and a little benchmark that measures linked-list TCP-AO keys
scaling, those are fixed by this.

Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/tcp_ao/lib/setup.c