Skip to content

Commit 36ed81b

Browse files
Amit Cohenkuba-moo
Amit Cohen
authored andcommitted
selftests: vxlan_bridge: Test flood with unresolved FDB entry
Extend flood test to configure FDB entry with unresolved destination IP, check that packets are not sent twice. Without the previous patch which handles such scenario in mlxsw, the tests fail: $ TESTS='test_flood' ./vxlan_bridge_1d.sh Running tests with UDP port 4789 TEST: VXLAN: flood [ OK ] TEST: VXLAN: flood, unresolved FDB entry [FAIL] vx2 ns2: Expected to capture 10 packets, got 20. $ TESTS='test_flood' ./vxlan_bridge_1q.sh INFO: Running tests with UDP port 4789 TEST: VXLAN: flood vlan 10 [ OK ] TEST: VXLAN: flood vlan 20 [ OK ] TEST: VXLAN: flood vlan 10, unresolved FDB entry [FAIL] vx10 ns2: Expected to capture 10 packets, got 20. TEST: VXLAN: flood vlan 20, unresolved FDB entry [FAIL] vx20 ns2: Expected to capture 10 packets, got 20. With the previous patch, the tests pass. Signed-off-by: Amit Cohen <[email protected]> Reviewed-by: Petr Machata <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/7bc96e317531f3bf06319fb2ea447bd8666f29fa.1742224300.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 139ae87 commit 36ed81b

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,14 @@ __test_flood()
428428
test_flood()
429429
{
430430
__test_flood de:ad:be:ef:13:37 192.0.2.100 "flood"
431+
432+
# Add an entry with arbitrary destination IP. Verify that packets are
433+
# not duplicated (this can happen if hardware floods the packets, and
434+
# then traps them due to misconfiguration, so software data path repeats
435+
# flooding and resends packets).
436+
bridge fdb append dev vx1 00:00:00:00:00:00 dst 198.51.100.1 self
437+
__test_flood de:ad:be:ef:13:37 192.0.2.100 "flood, unresolved FDB entry"
438+
bridge fdb del dev vx1 00:00:00:00:00:00 dst 198.51.100.1 self
431439
}
432440

433441
vxlan_fdb_add_del()

tools/testing/selftests/net/forwarding/vxlan_bridge_1q.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,21 @@ test_flood()
539539
10 10 0 10 0
540540
__test_flood ca:fe:be:ef:13:37 198.51.100.100 20 "flood vlan 20" \
541541
10 0 10 0 10
542+
543+
# Add entries with arbitrary destination IP. Verify that packets are
544+
# not duplicated (this can happen if hardware floods the packets, and
545+
# then traps them due to misconfiguration, so software data path repeats
546+
# flooding and resends packets).
547+
bridge fdb append dev vx10 00:00:00:00:00:00 dst 203.0.113.1 self
548+
bridge fdb append dev vx20 00:00:00:00:00:00 dst 203.0.113.2 self
549+
550+
__test_flood de:ad:be:ef:13:37 192.0.2.100 10 \
551+
"flood vlan 10, unresolved FDB entry" 10 10 0 10 0
552+
__test_flood ca:fe:be:ef:13:37 198.51.100.100 20 \
553+
"flood vlan 20, unresolved FDB entry" 10 0 10 0 10
554+
555+
bridge fdb del dev vx20 00:00:00:00:00:00 dst 203.0.113.2 self
556+
bridge fdb del dev vx10 00:00:00:00:00:00 dst 203.0.113.1 self
542557
}
543558

544559
vxlan_fdb_add_del()

0 commit comments

Comments
 (0)