* [PATCH net-next] selftests: net: speed up pmtu.sh by avoiding unnecessary cleanup
@ 2025-09-06 21:45 Jakub Kicinski
2025-09-09 9:24 ` Simon Horman
2025-09-09 23:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2025-09-06 21:45 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, shuah,
linux-kselftest, Jakub Kicinski
The pmtu test takes nearly an hour when run on a debug kernel
(10min on a normal kernel, so the debug slow down is quite significant).
NIPA tries to ensure all results are delivered by a certain deadline
so this prevents it from retrying the test in case of a flake.
Looks like one of the slowest operations in the test is calling out
to ./openvswitch/ovs-dpctl.py to remove potential leftover OvS interfaces.
Check whether the interfaces exist in the first place in sysfs,
since it can be done directly in bash it is very fast.
This should save us around 20-30% of the test runtime.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
tools/testing/selftests/net/pmtu.sh | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
index 88e914c4eef9..a3323c21f001 100755
--- a/tools/testing/selftests/net/pmtu.sh
+++ b/tools/testing/selftests/net/pmtu.sh
@@ -1089,10 +1089,11 @@ cleanup() {
cleanup_all_ns
- ip link del veth_A-C 2>/dev/null
- ip link del veth_A-R1 2>/dev/null
- cleanup_del_ovs_internal
- cleanup_del_ovs_vswitchd
+ [ -e "/sys/class/net/veth_A-C" ] && ip link del veth_A-C
+ [ -e "/sys/class/net/veth_A-R1" ] && ip link del veth_A-R1
+ [ -e "/sys/class/net/ovs_br0" ] && cleanup_del_ovs_internal
+ [ -e "/sys/class/net/ovs_br0" ] && cleanup_del_ovs_vswitchd
+
rm -f "$tmpoutfile"
}
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next] selftests: net: speed up pmtu.sh by avoiding unnecessary cleanup
2025-09-06 21:45 [PATCH net-next] selftests: net: speed up pmtu.sh by avoiding unnecessary cleanup Jakub Kicinski
@ 2025-09-09 9:24 ` Simon Horman
2025-09-09 23:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-09-09 9:24 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, shuah,
linux-kselftest
On Sat, Sep 06, 2025 at 02:45:35PM -0700, Jakub Kicinski wrote:
> The pmtu test takes nearly an hour when run on a debug kernel
> (10min on a normal kernel, so the debug slow down is quite significant).
> NIPA tries to ensure all results are delivered by a certain deadline
> so this prevents it from retrying the test in case of a flake.
>
> Looks like one of the slowest operations in the test is calling out
> to ./openvswitch/ovs-dpctl.py to remove potential leftover OvS interfaces.
> Check whether the interfaces exist in the first place in sysfs,
> since it can be done directly in bash it is very fast.
>
> This should save us around 20-30% of the test runtime.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
It would be interesting to know why this is so slow.
But I agree that avoiding unnecessary work is a good approach
if it is slow. And that appears to be the case.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] selftests: net: speed up pmtu.sh by avoiding unnecessary cleanup
2025-09-06 21:45 [PATCH net-next] selftests: net: speed up pmtu.sh by avoiding unnecessary cleanup Jakub Kicinski
2025-09-09 9:24 ` Simon Horman
@ 2025-09-09 23:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-09 23:30 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, shuah,
linux-kselftest
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sat, 6 Sep 2025 14:45:35 -0700 you wrote:
> The pmtu test takes nearly an hour when run on a debug kernel
> (10min on a normal kernel, so the debug slow down is quite significant).
> NIPA tries to ensure all results are delivered by a certain deadline
> so this prevents it from retrying the test in case of a flake.
>
> Looks like one of the slowest operations in the test is calling out
> to ./openvswitch/ovs-dpctl.py to remove potential leftover OvS interfaces.
> Check whether the interfaces exist in the first place in sysfs,
> since it can be done directly in bash it is very fast.
>
> [...]
Here is the summary with links:
- [net-next] selftests: net: speed up pmtu.sh by avoiding unnecessary cleanup
https://git.kernel.org/netdev/net-next/c/1c0353a6df82
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-09 23:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-06 21:45 [PATCH net-next] selftests: net: speed up pmtu.sh by avoiding unnecessary cleanup Jakub Kicinski
2025-09-09 9:24 ` Simon Horman
2025-09-09 23:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).