Patch "selftests: net: fix rps_default_mask with >32 CPUs" has been added to the 6.6-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: net: fix rps_default_mask with >32 CPUs

to the 6.6-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-net-fix-rps_default_mask-with-32-cpus.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 06ca639fba800dcbdc8d7762501231c341aaf82f
Author: Jakub Kicinski <kuba@xxxxxxxxxx>
Date:   Mon Jan 22 11:58:15 2024 -0800

    selftests: net: fix rps_default_mask with >32 CPUs
    
    [ Upstream commit 0719b5338a0cbe80d1637a5fb03d8141b5bfc7a1 ]
    
    If there is more than 32 cpus the bitmask will start to contain
    commas, leading to:
    
    ./rps_default_mask.sh: line 36: [: 00000000,00000000: integer expression expected
    
    Remove the commas, bash doesn't interpret leading zeroes as oct
    so that should be good enough. Switch to bash, Simon reports that
    not all shells support this type of substitution.
    
    Fixes: c12e0d5f267d ("self-tests: introduce self-tests for RPS default mask")
    Reviewed-by: Simon Horman <horms@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240122195815.638997-1-kuba@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/net/rps_default_mask.sh b/tools/testing/selftests/net/rps_default_mask.sh
index a26c5624429f..4287a8529890 100755
--- a/tools/testing/selftests/net/rps_default_mask.sh
+++ b/tools/testing/selftests/net/rps_default_mask.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
 readonly ksft_skip=4
@@ -33,6 +33,10 @@ chk_rps() {
 
 	rps_mask=$($cmd /sys/class/net/$dev_name/queues/rx-0/rps_cpus)
 	printf "%-60s" "$msg"
+
+	# In case there is more than 32 CPUs we need to remove commas from masks
+	rps_mask=${rps_mask//,}
+	expected_rps_mask=${expected_rps_mask//,}
 	if [ $rps_mask -eq $expected_rps_mask ]; then
 		echo "[ ok ]"
 	else




[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