Patch "selftests: mlxsw: vxlan_flooding: Prevent flooding of unwanted packets" has been added to the 5.17-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests: mlxsw: vxlan_flooding: Prevent flooding of unwanted packets

to the 5.17-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-mlxsw-vxlan_flooding-prevent-flooding-of-u.patch
and it can be found in the queue-5.17 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7d11fb13734cff78a4a670bdbb3e20abcfab3708
Author: Ido Schimmel <idosch@xxxxxxxxxx>
Date:   Tue Apr 19 16:51:54 2022 +0300

    selftests: mlxsw: vxlan_flooding: Prevent flooding of unwanted packets
    
    [ Upstream commit 044011fdf162c5dd61c02841930c8f438a9adadb ]
    
    The test verifies that packets are correctly flooded by the bridge and
    the VXLAN device by matching on the encapsulated packets at the other
    end. However, if packets other than those generated by the test also
    ingress the bridge (e.g., MLD packets), they will be flooded as well and
    interfere with the expected count.
    
    Make the test more robust by making sure that only the packets generated
    by the test can ingress the bridge. Drop all the rest using tc filters
    on the egress of 'br0' and 'h1'.
    
    In the software data path, the problem can be solved by matching on the
    inner destination MAC or dropping unwanted packets at the egress of the
    VXLAN device, but this is not currently supported by mlxsw.
    
    Fixes: 94d302deae25 ("selftests: mlxsw: Add a test for VxLAN flooding")
    Signed-off-by: Ido Schimmel <idosch@xxxxxxxxxx>
    Reviewed-by: Amit Cohen <amcohen@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/drivers/net/mlxsw/vxlan_flooding.sh b/tools/testing/selftests/drivers/net/mlxsw/vxlan_flooding.sh
index fedcb7b35af9..af5ea50ed5c0 100755
--- a/tools/testing/selftests/drivers/net/mlxsw/vxlan_flooding.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/vxlan_flooding.sh
@@ -172,6 +172,17 @@ flooding_filters_add()
 	local lsb
 	local i
 
+	# Prevent unwanted packets from entering the bridge and interfering
+	# with the test.
+	tc qdisc add dev br0 clsact
+	tc filter add dev br0 egress protocol all pref 1 handle 1 \
+		matchall skip_hw action drop
+	tc qdisc add dev $h1 clsact
+	tc filter add dev $h1 egress protocol all pref 1 handle 1 \
+		flower skip_hw dst_mac de:ad:be:ef:13:37 action pass
+	tc filter add dev $h1 egress protocol all pref 2 handle 2 \
+		matchall skip_hw action drop
+
 	tc qdisc add dev $rp2 clsact
 
 	for i in $(eval echo {1..$num_remotes}); do
@@ -194,6 +205,12 @@ flooding_filters_del()
 	done
 
 	tc qdisc del dev $rp2 clsact
+
+	tc filter del dev $h1 egress protocol all pref 2 handle 2 matchall
+	tc filter del dev $h1 egress protocol all pref 1 handle 1 flower
+	tc qdisc del dev $h1 clsact
+	tc filter del dev br0 egress protocol all pref 1 handle 1 matchall
+	tc qdisc del dev br0 clsact
 }
 
 flooding_check_packets()



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux