From: Ido Schimmel idosch@mellanox.com
In kernel 4.8, L3 support was added to the mlxsw driver. Therefore, non-bridged traffic is now directed to the switch itself only if the packet's DIP matches the interface's IP.
However, due to several pending ordering problems in the switchdev infrastructure, IP configuration is only offloaded to the device in cases where it makes sense. Since IP configuration on a LAG port doesn't make sense the operation is aborted and all the routes in the system are flushed, thereby causing the machine to become unresponsive.
Until these issues are resolved in the kernel, remove the IP address from the switch port so that when create_team() is called it won't be configured upon port being up()-ed.
Signed-off-by: Ido Schimmel idosch@mellanox.com --- recipes/switchdev/l2-006-bridge_team.py | 1 + recipes/switchdev/l2-015-bridge_team_vlan1d.py | 1 + 2 files changed, 2 insertions(+)
diff --git a/recipes/switchdev/l2-006-bridge_team.py b/recipes/switchdev/l2-006-bridge_team.py index 48b9752..5366b39 100644 --- a/recipes/switchdev/l2-006-bridge_team.py +++ b/recipes/switchdev/l2-006-bridge_team.py @@ -55,6 +55,7 @@ def do_task(ctl, hosts, ifaces, aliases): tl.ping_simple(sw_if1, m1_if1)
# Repopulate the LAGs and make sure fastpath is OK. + sw_if1.set_addresses([]) # LAG port can't have IP address. sw_lag3 = sw.create_team(slaves=[sw_if1, sw_if2], config=team_config) sw_br.slave_add(sw_lag3.get_id()) diff --git a/recipes/switchdev/l2-015-bridge_team_vlan1d.py b/recipes/switchdev/l2-015-bridge_team_vlan1d.py index 723a04a..4078b94 100644 --- a/recipes/switchdev/l2-015-bridge_team_vlan1d.py +++ b/recipes/switchdev/l2-015-bridge_team_vlan1d.py @@ -76,6 +76,7 @@ def do_task(ctl, hosts, ifaces, aliases): tl.ping_simple(sw_if1, m1_if1)
# Repopulate the LAGs and make sure fastpath is OK. + sw_if1.set_addresses([]) # LAG port can't have IP address. sw_lag3 = sw.create_team(slaves=[sw_if1, sw_if2], config=team_config) sw_br1.slave_add(sw_lag3.get_id())
From: Ido Schimmel idosch@mellanox.com
As explained in the previous commit, we currently have some ordering problems in the switchdev infrastructure. These prevent us from offloading an existing IP configuration on a bridge port once it's unbridged.
Therefore, set the IP configuration on the port only after it's removed from the bridge.
Signed-off-by: Ido Schimmel idosch@mellanox.com --- recipes/switchdev/l2-008-bridge_vlan1q_sanity.py | 5 ++--- recipes/switchdev/l2-010-bridge_vlan1d_sanity.py | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/recipes/switchdev/l2-008-bridge_vlan1q_sanity.py b/recipes/switchdev/l2-008-bridge_vlan1q_sanity.py index 555891b..d415caf 100644 --- a/recipes/switchdev/l2-008-bridge_vlan1q_sanity.py +++ b/recipes/switchdev/l2-008-bridge_vlan1q_sanity.py @@ -44,8 +44,6 @@ 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_br = sw.create_bridge(slaves=[sw_if1, sw_if2], options=br_options)
@@ -95,8 +93,9 @@ def do_task(ctl, hosts, ifaces, aliases): tl.ping_simple(m1_if1, m2_if1)
sw_br.slave_del(sw_if1.get_id()) + sw_if1.reset(ip=test_ip(1, 3))
- sleep(5) + sleep(15)
tl.ping_simple(sw_if1, m1_if1)
diff --git a/recipes/switchdev/l2-010-bridge_vlan1d_sanity.py b/recipes/switchdev/l2-010-bridge_vlan1d_sanity.py index b30f741..fc43ab3 100644 --- a/recipes/switchdev/l2-010-bridge_vlan1d_sanity.py +++ b/recipes/switchdev/l2-010-bridge_vlan1d_sanity.py @@ -34,7 +34,7 @@ def do_task(ctl, hosts, ifaces, aliases): br_options = {"vlan_filtering": 1} sw.create_bridge(slaves=[sw_if1, sw_if2], options=br_options)
- sw_if1_10 = sw.create_vlan(sw_if1, 10, ip=test_ip(2, 3)) + sw_if1_10 = sw.create_vlan(sw_if1, 10) sw_if2_10 = sw.create_vlan(sw_if2, 10) sw_br = sw.create_bridge(slaves=[sw_if1_10, sw_if2_10], options=br_options)
@@ -51,8 +51,9 @@ def do_task(ctl, hosts, ifaces, aliases): tl.ping_simple(m1_if1_30, m2_if1_30, fail_expected=True)
sw_br.slave_del(sw_if1_10.get_id()) + sw_if1_10.reset(ip=test_ip(2, 3))
- sleep(5) + sleep(15)
tl.ping_simple(sw_if1_10, m1_if1_10)
Mon, Aug 29, 2016 at 04:51:01PM CEST, idosch@idosch.org wrote:
From: Ido Schimmel idosch@mellanox.com
In kernel 4.8, L3 support was added to the mlxsw driver. Therefore, non-bridged traffic is now directed to the switch itself only if the packet's DIP matches the interface's IP.
However, due to several pending ordering problems in the switchdev infrastructure, IP configuration is only offloaded to the device in cases where it makes sense. Since IP configuration on a LAG port doesn't make sense the operation is aborted and all the routes in the system are flushed, thereby causing the machine to become unresponsive.
Until these issues are resolved in the kernel, remove the IP address from the switch port so that when create_team() is called it won't be configured upon port being up()-ed.
Signed-off-by: Ido Schimmel idosch@mellanox.com
both applied, thanks!
lnst-developers@lists.fedorahosted.org