selftests: forwarding: vxlan_bridge_1d: Check aging while forwarding
authorIdo Schimmel <idosch@nvidia.com>
Tue, 4 Feb 2025 14:55:49 +0000 (16:55 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 6 Feb 2025 02:53:57 +0000 (18:53 -0800)
Extend the VXLAN FDB aging test case to verify that FDB entries are aged
out when they only forward traffic and not refreshed by received
traffic.

The test fails before "vxlan: Age out FDB entries based on 'updated'
time":

 # ./vxlan_bridge_1d.sh
 [...]
 TEST: VXLAN: Ageing of learned FDB entry                            [FAIL]
 [...]
 # echo $?
 1

And passes after it:

 # ./vxlan_bridge_1d.sh
 [...]
 TEST: VXLAN: Ageing of learned FDB entry                            [ OK ]
 [...]
 # echo $?
 0

Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/20250204145549.1216254-9-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh

index 3f9d50f1ef9ec73217c28fa26cbfd8f86e783fbf..180c5eca556fe04973a92d7e774855ef00c6cebd 100755 (executable)
@@ -740,6 +740,8 @@ test_learning()
 
        vxlan_flood_test $mac $dst 0 10 0
 
+       # The entry should age out when it only forwards traffic
+       $MZ $h1 -c 50 -d 1sec -p 64 -b $mac -B $dst -t icmp -q &
        sleep 60
 
        bridge fdb show brport vx1 | grep $mac | grep -q self