perftest/0015-Perftest-modify-source_ip-to-bind_sounce_ip-to-fix-i.patch

53 lines
2.2 KiB
Diff
Raw Permalink Normal View History

From eb0de7de2f7ea8d216f306ad69aaa9fda73dbdb1 Mon Sep 17 00:00:00 2001
From: "Huai-En, Tseng" <huaien.tseng@shopee.com>
Date: Thu, 18 May 2023 11:31:31 +0800
Subject: [PATCH] Perftest: modify --source_ip to --bind_sounce_ip to fix init
connection establishment with specific interface
mainline inclusion
commit ba4580a6c4f16ab7791e4d809eda91d586c1f04f
category: bugfix
bugzilla: https://gitee.com/src-openeuler/perftest/issues/IBGXBU
Reference: https://github.com/linux-rdma/perftest/commit/8ff29c1603215c012a886284b7184a0280367cb4
----------------------------
When there are several network interface with different subnet address,
perftest tools will always choose default route even I add --source_ip
option to ask perftest to bind an interface.
I found that there are two options that use the same name "--source_ip".
Therefore, change --source_ip to --bind_source_ip to fix init connection
establishment with specific interface.
Signed-off-by: Guofeng Yue <yueguofeng@h-partners.com>
---
src/perftest_parameters.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/perftest_parameters.c b/src/perftest_parameters.c
index 0a18b2a..73907ca 100755
--- a/src/perftest_parameters.c
+++ b/src/perftest_parameters.c
@@ -476,7 +476,7 @@ static void usage(const char *argv0, VerbType verb, TestType tst, int connection
// please note it is a different source_ip from raw_ethernet case
if (connection_type != RawEth) {
- printf(" --source_ip ");
+ printf(" --bind_source_ip ");
printf(" Source IP of the interface used for connection establishment. By default taken from routing table.\n");
}
@@ -2386,7 +2386,7 @@ int parser(struct perftest_parameters *user_param,char *argv[], int argc)
#ifdef HAVE_HNSDV
{ .name = "congest_type", .has_arg = 1, .flag = &congest_type_flag, .val = 1},
#endif
- {.name = "source_ip", .has_arg = 1, .flag = &source_ip_flag, .val = 1},
+ {.name = "bind_source_ip", .has_arg = 1, .flag = &source_ip_flag, .val = 1},
{0}
};
c = getopt_long(argc,argv,"w:y:p:d:i:m:s:n:t:u:S:x:c:q:I:o:M:r:Q:A:l:D:f:B:T:L:E:J:j:K:k:X:W:aFegzRvhbNVCHUOZP",long_options,NULL);
--
2.25.1