* [PATCH net] selftests: bonding: do not set port down when adding to bond
@ 2023-12-23 12:59 Hangbin Liu
2023-12-23 22:54 ` Benjamin Poirier
2024-01-02 14:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Hangbin Liu @ 2023-12-23 12:59 UTC (permalink / raw)
To: netdev; +Cc: Benjamin Poirier, Jay Vosburgh, David Miller, 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")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
.../drivers/net/bonding/bond-arp-interval-causes-panic.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh b/tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh
index 4917dbb35a44..5667febee328 100755
--- a/tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh
+++ b/tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh
@@ -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
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] selftests: bonding: do not set port down when adding to bond
2023-12-23 12:59 [PATCH net] selftests: bonding: do not set port down when adding to bond Hangbin Liu
@ 2023-12-23 22:54 ` Benjamin Poirier
2024-01-02 14:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Poirier @ 2023-12-23 22:54 UTC (permalink / raw)
To: Hangbin Liu; +Cc: netdev, Jay Vosburgh, David Miller
On 2023-12-23 20:59 +0800, Hangbin Liu 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.
>
> Fixes: 2ffd57327ff1 ("selftests: bonding: cause oops in bond_rr_gen_slave_id")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---
Tested-by: Benjamin Poirier <benjamin.poirier@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] selftests: bonding: do not set port down when adding to bond
2023-12-23 12:59 [PATCH net] selftests: bonding: do not set port down when adding to bond Hangbin Liu
2023-12-23 22:54 ` Benjamin Poirier
@ 2024-01-02 14:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-01-02 14:20 UTC (permalink / raw)
To: Hangbin Liu; +Cc: netdev, bpoirier, jay.vosburgh, davem
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
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!
--
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:[~2024-01-02 14:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-23 12:59 [PATCH net] selftests: bonding: do not set port down when adding to bond Hangbin Liu
2023-12-23 22:54 ` Benjamin Poirier
2024-01-02 14:20 ` 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).