Patch "selftests/net: udpgso_bench_tx: fix dst ip argument" has been added to the 5.15-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: udpgso_bench_tx: fix dst ip argument

to the 5.15-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-udpgso_bench_tx-fix-dst-ip-argument.patch
and it can be found in the queue-5.15 subdirectory.

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



commit f15cb0802fd81ce5167c38990348abadd17fd45c
Author: wujianguo <wujianguo@xxxxxxxxxxxxxxx>
Date:   Wed Dec 29 18:58:10 2021 +0800

    selftests/net: udpgso_bench_tx: fix dst ip argument
    
    [ Upstream commit 9c1952aeaa98b3cfc49e2a79cb2c7d6a674213e9 ]
    
    udpgso_bench_tx call setup_sockaddr() for dest address before
    parsing all arguments, if we specify "-p ${dst_port}" after "-D ${dst_ip}",
    then ${dst_port} will be ignored, and using default cfg_port 8000.
    
    This will cause test case "multiple GRO socks" failed in udpgro.sh.
    
    Setup sockaddr after parsing all arguments.
    
    Fixes: 3a687bef148d ("selftests: udp gso benchmark")
    Signed-off-by: Jianguo Wu <wujianguo@xxxxxxxxxxxxxxx>
    Reviewed-by: Willem de Bruijn <willemb@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/ff620d9f-5b52-06ab-5286-44b945453002@xxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/net/udpgso_bench_tx.c b/tools/testing/selftests/net/udpgso_bench_tx.c
index 17512a43885e7..f1fdaa2702913 100644
--- a/tools/testing/selftests/net/udpgso_bench_tx.c
+++ b/tools/testing/selftests/net/udpgso_bench_tx.c
@@ -419,6 +419,7 @@ static void usage(const char *filepath)
 
 static void parse_opts(int argc, char **argv)
 {
+	const char *bind_addr = NULL;
 	int max_len, hdrlen;
 	int c;
 
@@ -446,7 +447,7 @@ static void parse_opts(int argc, char **argv)
 			cfg_cpu = strtol(optarg, NULL, 0);
 			break;
 		case 'D':
-			setup_sockaddr(cfg_family, optarg, &cfg_dst_addr);
+			bind_addr = optarg;
 			break;
 		case 'l':
 			cfg_runtime_ms = strtoul(optarg, NULL, 10) * 1000;
@@ -492,6 +493,11 @@ static void parse_opts(int argc, char **argv)
 		}
 	}
 
+	if (!bind_addr)
+		bind_addr = cfg_family == PF_INET6 ? "::" : "0.0.0.0";
+
+	setup_sockaddr(cfg_family, bind_addr, &cfg_dst_addr);
+
 	if (optind != argc)
 		usage(argv[0]);
 



[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