From 9c7aa7977ab566a628fcd5f4bd742ff737da02cf Mon Sep 17 00:00:00 2001 From: Sai Sunku Date: Thu, 30 Jan 2025 05:38:00 +0000 Subject: [PATCH] [v1.22.x] util: Add fabric argument to pingpong test Signed-off-by: Sai Sunku (cherry picked from commit 67932605d4a58cea495b50504d57eaa73543256e) --- util/pingpong.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util/pingpong.c b/util/pingpong.c index f8af6943320..9b2fe4a5988 100644 --- a/util/pingpong.c +++ b/util/pingpong.c @@ -2002,6 +2002,7 @@ static void pp_pingpong_usage(struct ct_pingpong *ct, char *name, char *desc) "destination control port number (client: 47592)"); fprintf(stderr, " %-20s %s\n", "-d ", "domain name"); + fprintf(stderr, " %-20s %s\n", "-f ", "fabric name"); fprintf(stderr, " %-20s %s\n", "-s ", "source address associated with domain name"); fprintf(stderr, " %-20s %s\n", "-p ", @@ -2041,6 +2042,11 @@ static void pp_parse_opts(struct ct_pingpong *ct, int op, char *optarg) ct->hints->fabric_attr->prov_name = strdup(optarg); break; + /* Fabric */ + case 'f': + ct->hints->fabric_attr->name = strdup(optarg); + break; + /* Endpoint */ case 'e': if (!strncasecmp("msg", optarg, 3) && (strlen(optarg) == 3)) { @@ -2327,7 +2333,7 @@ int main(int argc, char **argv) ofi_osd_init(); - while ((op = getopt(argc, argv, "hvd:p:e:I:S:s:B:P:cm:6")) != -1) { + while ((op = getopt(argc, argv, "hvd:p:f:e:I:S:s:B:P:cm:6")) != -1) { switch (op) { default: pp_parse_opts(&ct, op, optarg);