Skip to content

Commit a758dc4

Browse files
pmachatakuba-moo
authored andcommitted
selftests: mlxsw: extack: Disable IPv6 autogen on bridges
In a future patch, mlxsw will start adding RIFs to uppers of front panel port netdevices, if they have an IP address. At the time that the front panel port is enslaved to the bridge (this holds for all bridges used here), the bridge MAC address does not have the same prefix as other interfaces in the system. On Nvidia Spectrum-1 machines all the RIFs have to have the same 38-bit MAC address prefix. Since the bridge does not obey this limitation, the RIF cannot be created, and the enslavement attempt is vetoed on the grounds of the configuration not being offloadable. The selftest itself however checks whether a different vetoed aspect of the configuration provides an extack. The IP address or the RIF are irrelevant. Fix by disabling automatic IPv6 address generation for the HW-offloaded bridges in this selftest, thus exempting them from mlxsw router attention. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Danielle Ratson <danieller@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 8cfdd30 commit a758dc4

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

  • tools/testing/selftests/drivers/net/mlxsw

tools/testing/selftests/drivers/net/mlxsw/extack.sh

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ netdev_pre_up_test()
3535
{
3636
RET=0
3737

38-
ip link add name br1 up type bridge vlan_filtering 0 mcast_snooping 0
38+
ip link add name br1 type bridge vlan_filtering 0 mcast_snooping 0
39+
ip link set dev br1 addrgenmode none
40+
ip link set dev br1 up
3941
ip link add name vx1 up type vxlan id 1000 \
4042
local 192.0.2.17 remote 192.0.2.18 \
4143
dstport 4789 nolearning noudpcsum tos inherit ttl 100
@@ -46,7 +48,9 @@ netdev_pre_up_test()
4648
ip link set dev $swp1 master br1
4749
check_err $?
4850

49-
ip link add name br2 up type bridge vlan_filtering 0 mcast_snooping 0
51+
ip link add name br2 type bridge vlan_filtering 0 mcast_snooping 0
52+
ip link set dev br2 addrgenmode none
53+
ip link set dev br2 up
5054
ip link add name vx2 up type vxlan id 2000 \
5155
local 192.0.2.17 remote 192.0.2.18 \
5256
dstport 4789 nolearning noudpcsum tos inherit ttl 100
@@ -81,7 +85,9 @@ vxlan_vlan_add_test()
8185
{
8286
RET=0
8387

84-
ip link add name br1 up type bridge vlan_filtering 1 mcast_snooping 0
88+
ip link add name br1 type bridge vlan_filtering 1 mcast_snooping 0
89+
ip link set dev br1 addrgenmode none
90+
ip link set dev br1 up
8591

8692
# Unsupported configuration: mlxsw demands VXLAN with "noudpcsum".
8793
ip link add name vx1 up type vxlan id 1000 \
@@ -117,7 +123,9 @@ vxlan_bridge_create_test()
117123
dstport 4789 tos inherit ttl 100
118124

119125
# Test with VLAN-aware bridge.
120-
ip link add name br1 up type bridge vlan_filtering 1 mcast_snooping 0
126+
ip link add name br1 type bridge vlan_filtering 1 mcast_snooping 0
127+
ip link set dev br1 addrgenmode none
128+
ip link set dev br1 up
121129

122130
ip link set dev vx1 master br1
123131

@@ -142,8 +150,12 @@ bridge_create_test()
142150
{
143151
RET=0
144152

145-
ip link add name br1 up type bridge vlan_filtering 1
146-
ip link add name br2 up type bridge vlan_filtering 1
153+
ip link add name br1 type bridge vlan_filtering 1
154+
ip link set dev br1 addrgenmode none
155+
ip link set dev br1 up
156+
ip link add name br2 type bridge vlan_filtering 1
157+
ip link set dev br2 addrgenmode none
158+
ip link set dev br2 up
147159

148160
ip link set dev $swp1 master br1
149161
check_err $?

0 commit comments

Comments
 (0)