When removing a port netdev from a 802.1q bridge one needs to do a
proper cleanup, so that the interface will direct traffic to CPU
instead.
Remove a port netdev from a bridge and check that ping works.
Cc: Andrew Lunn <andrew(a)lunn.ch>
Cc: Vivien Didelot <vivien.didelot(a)savoirfairelinux.com>
Signed-off-by: Ido Schimmel <idosch(a)mellanox.com>
---
v1->v2:
* No change.
---
recipes/switchdev/l2-008-bridge_vlan1q_sanity.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/recipes/switchdev/l2-008-bridge_vlan1q_sanity.py
b/recipes/switchdev/l2-008-bridge_vlan1q_sanity.py
index 740de76..5572017 100644
--- a/recipes/switchdev/l2-008-bridge_vlan1q_sanity.py
+++ b/recipes/switchdev/l2-008-bridge_vlan1q_sanity.py
@@ -44,8 +44,10 @@ def do_task(ctl, hosts, ifaces, aliases):
m2_if1_20 = m2.create_vlan(m2_if1, 20, ip=test_ip(3, 2))
m2_if1_30 = m2.create_vlan(m2_if1, 30, ip=test_ip(4, 2))
+ sw_if1.reset(ip=test_ip(1, 3))
+
br_options = {"vlan_filtering": 1}
- sw.create_bridge(slaves=[sw_if1, sw_if2], options=br_options)
+ sw_br = sw.create_bridge(slaves=[sw_if1, sw_if2], options=br_options)
sw_if1.add_br_vlan(10)
sw_if2.add_br_vlan(10)
@@ -76,6 +78,12 @@ def do_task(ctl, hosts, ifaces, aliases):
sleep(1)
tl.ping_simple(m1_if1, m2_if1)
+ sw_br.slave_del(sw_if1.get_id())
+
+ sleep(5)
+
+ tl.ping_simple(sw_if1, m1_if1)
+
do_task(ctl, [ctl.get_host("machine1"),
ctl.get_host("machine2"),
ctl.get_host("switch")],
--
2.4.10