selftests: mirror_gre_bridge_1q_lag: Enslave port to bridge before other configurations
authorAmit Cohen <amcohen@nvidia.com>
Thu, 16 Jun 2022 10:42:38 +0000 (13:42 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Jun 2022 09:31:33 +0000 (10:31 +0100)
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>
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh

index 28d568c..91e431c 100755 (executable)
@@ -141,12 +141,13 @@ switch_create()
        ip link set dev $swp4 up
 
        ip link add name br1 type bridge vlan_filtering 1
-       ip link set dev br1 up
-       __addr_add_del br1 add 192.0.2.129/32
-       ip -4 route add 192.0.2.130/32 dev br1
 
        team_create lag loadbalance $swp3 $swp4
        ip link set dev lag master br1
+
+       ip link set dev br1 up
+       __addr_add_del br1 add 192.0.2.129/32
+       ip -4 route add 192.0.2.130/32 dev br1
 }
 
 switch_destroy()