Skip to contentSkip to conversation

selftests: bonding: do not set port down when adding to bond

PATCH Applied Hangbin Liu 3 participants 3 messages Dec 23, 2023 – Jan 2, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: bonding: do not set port down when adding to bond

Similar to commit be809424659c ("selftests: bonding: do not set port down before adding to bond"). The bond-arp-interval-causes-panic test failed after commit a4abfa627c38 ("net: rtnetlink: Enslave device before bringing it up") as the kernel will set the port down _after_ adding to bond if setting port down specifically.

Fix it by removing the link down operation when adding to bond.

Fixes 2ffd57327ff1 ("selftests: bonding: cause oops in bond_rr_gen_slave_id")
---
 .../drivers/net/bonding/bond-arp-interval-causes-panic.sh   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh +3 -3
index 4917dbb35a44..5667febee328 100755
@@ -30,16 +30,16 @@ ip netns exec server ip addr add ${server_ip4}/24 dev eth0
 
 ip netns exec client ip link add dev bond0 down type bond mode 1 \
 	miimon 100 all_slaves_active 1
-ip netns exec client ip link set dev eth0 down master bond0
+ip netns exec client ip link set dev eth0 master bond0
 ip netns exec client ip link set dev bond0 up
 ip netns exec client ip addr add ${client_ip4}/24 dev bond0
 ip netns exec client ping -c 5 $server_ip4 >/dev/null
 
-ip netns exec client ip link set dev eth0 down nomaster
+ip netns exec client ip link set dev eth0 nomaster
 ip netns exec client ip link set dev bond0 down
 ip netns exec client ip link set dev bond0 type bond mode 0 \
 	arp_interval 1000 arp_ip_target "+${server_ip4}"
-ip netns exec client ip link set dev eth0 down master bond0
+ip netns exec client ip link set dev eth0 master bond0
 ip netns exec client ip link set dev bond0 up
 ip netns exec client ping -c 5 $server_ip4 >/dev/null
 
Signature · 1 line
2.43.0
Tested-by on v1 1/1
#1 lore raw
Quoted 11 lines · Hangbin Liu

Similar to commit be809424659c ("selftests: bonding: do not set port down before adding to bond"). The bond-arp-interval-causes-panic test failed after commit a4abfa627c38 ("net: rtnetlink: Enslave device before bringing it up") as the kernel will set the port down _after_ adding to bond if setting port down specifically.

Fix it by removing the link down operation when adding to bond.

Fixes 2ffd57327ff1 ("selftests: bonding: cause oops in bond_rr_gen_slave_id")

---

#2 lore raw
In reply to Hangbin Liu
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

Quoted 9 lines · On Sat, 23 Dec 2023 20:59:22 +0800 you wrote:

Similar to commit be809424659c ("selftests: bonding: do not set port down before adding to bond"). The bond-arp-interval-causes-panic test failed after commit a4abfa627c38 ("net: rtnetlink: Enslave device before bringing it up") as the kernel will set the port down _after_ adding to bond if setting port down specifically.

Fix it by removing the link down operation when adding to bond.

[...]

Here is the summary with links:
- [net] selftests: bonding: do not set port down when adding to bond

    https://git.kernel.org/netdev/net/c/61fa2493ca76

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html