Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: mirror_gre_bridge_1q_lag: Enslave port to bridge before other configurations

Using mlxsw driver, the configurations are offloaded just in case that
there is a physical port which is enslaved to the virtual device
(e.g., to a bridge). In 'mirror_gre_bridge_1q_lag' test, the bridge gets an
address and route before there are ports in the bridge. It means that these
configurations are not offloaded.

Till now the test passes with mlxsw driver even that the RIF of the
bridge is not in the hardware, because the ARP packets are trapped in
layer 2 and also mirrored, so there is no real need of the RIF in hardware.
The previous patch changed the traps 'ARP_REQUEST' and 'ARP_RESPONSE' to
be done at layer 3 instead of layer 2. With this change the ARP packets are
not trapped during the test, as the RIF is not in the hardware because of
the order of configurations.

Reorder the configurations to make them to be offloaded, then the test will
pass with the change of the traps.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Amit Cohen and committed by
David S. Miller
e386a527 4ec2feb2

+4 -3
+4 -3
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh
··· 141 141 ip link set dev $swp4 up 142 142 143 143 ip link add name br1 type bridge vlan_filtering 1 144 - ip link set dev br1 up 145 - __addr_add_del br1 add 192.0.2.129/32 146 - ip -4 route add 192.0.2.130/32 dev br1 147 144 148 145 team_create lag loadbalance $swp3 $swp4 149 146 ip link set dev lag master br1 147 + 148 + ip link set dev br1 up 149 + __addr_add_del br1 add 192.0.2.129/32 150 + ip -4 route add 192.0.2.130/32 dev br1 150 151 } 151 152 152 153 switch_destroy()