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

selftests: net: mirror_gre_vlan_bridge_1q: Make an FDB entry static

The FDB roaming test installs a destination MAC address on the wrong
interface of an FDB database and tests whether the mirroring fails, because
packets are sent to the wrong port. The test by mistake installs the FDB
entry as local. This worked previously, because drivers were notified of
local FDB entries in the same way as of static entries. However that has
been fixed in the commit 6ab4c3117aec ("net: bridge: don't notify switchdev
for local FDB addresses"), and local entries are not notified anymore. As a
result, the HW is not reconfigured for the FDB roam, and mirroring keeps
working, failing the test.

To fix the issue, mark the FDB entry as static.

Fixes: 9c7c8a82442c ("selftests: forwarding: mirror_gre_vlan_bridge_1q: Add more tests")
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Petr Machata and committed by
David S. Miller
c8d0260c e40fa65c

+1 -1
+1 -1
tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
··· 271 271 272 272 while ((RET == 0)); do 273 273 bridge fdb del dev $swp3 $h3mac vlan 555 master 2>/dev/null 274 - bridge fdb add dev $swp2 $h3mac vlan 555 master 274 + bridge fdb add dev $swp2 $h3mac vlan 555 master static 275 275 sleep 1 276 276 fail_test_span_gre_dir $tundev ingress 277 277