diff mbox series

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

Message ID 20231223125922.3280841-1-liuhangbin@gmail.com (mailing list archive)
State Accepted
Commit 61fa2493ca76fd7bb74e13f0205274f4ab0aa696
Delegated to: Netdev Maintainers
Headers show
Series [net] selftests: bonding: do not set port down when adding to bond | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success SINGLE THREAD; Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/cc_maintainers fail 2 blamed authors not CCed: kuba@kernel.org j.vosburgh@gmail.com; 5 maintainers not CCed: andy@greyhouse.net j.vosburgh@gmail.com shuah@kernel.org kuba@kernel.org linux-kselftest@vger.kernel.org
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success net selftest script(s) already in Makefile
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 19 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Hangbin Liu Dec. 23, 2023, 12:59 p.m. UTC
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(-)

Comments

Benjamin Poirier Dec. 23, 2023, 10:54 p.m. UTC | #1
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>
patchwork-bot+netdevbpf@kernel.org Jan. 2, 2024, 2:20 p.m. UTC | #2
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!
diff mbox series

Patch

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