]> git.itanic.dy.fi Git - linux-stable/commitdiff
selftests: bonding: do not set port down before adding to bond
authorHangbin Liu <liuhangbin@gmail.com>
Thu, 17 Aug 2023 08:24:59 +0000 (16:24 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 22 Aug 2023 02:05:42 +0000 (19:05 -0700)
Before adding a port to bond, it need to be set down first. In the
lacpdu test the author set the port down specifically. But commit
a4abfa627c38 ("net: rtnetlink: Enslave device before bringing it up")
changed the operation order, the kernel will set the port down _after_
adding to bond. So all the ports will be down at last and the test failed.

In fact, the veth interfaces are already inactive when added. This
means there's no need to set them down again before adding to the bond.
Let's just remove the link down operation.

Fixes: a4abfa627c38 ("net: rtnetlink: Enslave device before bringing it up")
Reported-by: Zhengchao Shao <shaozhengchao@huawei.com>
Closes: https://lore.kernel.org/netdev/a0ef07c7-91b0-94bd-240d-944a330fcabd@huawei.com/
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20230817082459.1685972-1-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/bonding/bond-break-lacpdu-tx.sh

index 47ab90596acb2096f2b70863b0835a109c524b8b..6358df5752f9078660607ab0a81b82de47ed932a 100755 (executable)
@@ -57,8 +57,8 @@ ip link add name veth2-bond type veth peer name veth2-end
 
 # add ports
 ip link set fbond master fab-br0
-ip link set veth1-bond down master fbond
-ip link set veth2-bond down master fbond
+ip link set veth1-bond master fbond
+ip link set veth2-bond master fbond
 
 # bring up
 ip link set veth1-end up