diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-08-17 13:36:59 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-08-20 15:17:58 -0700 |
commit | 555e5531635a7c5dba663d06cea240362624dfde (patch) | |
tree | e10938dbf810b76036b0935cc2ca8239d6cfbdb8 /net/unix/af_unix.c | |
parent | 797653865b982d53ecca517dd2b0ffb8bd967022 (diff) |
selftests: net/forwarding: spawn sh inside vrf to speed up ping loop
Looking at timestamped output of netdev CI reveals that
most of the time in forwarding tests for custom route
hashing is spent on a single case, namely the test which
uses ping (mausezahn does not support flow labels).
On a non-debug kernel we spend 714 of 730 total test
runtime (97%) on this test case. While having flow label
support in a traffic gen tool / mausezahn would be best,
we can significantly speed up the loop by putting ip vrf exec
outside of the iteration.
In a test of 1000 pings using a normal loop takes 50 seconds
to finish. While using:
ip vrf exec $vrf sh -c "$loop-body"
takes 12 seconds (1/4 of the time).
Some of the slowness is likely due to our inefficient virtualization
setup, but even on my laptop running "ip link help" 16k times takes
25-30 seconds, so I think it's worth optimizing even for fastest
setups.
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://patch.msgid.link/20240817203659.712085-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions