You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.6 KiB

From caa228ab400b154634a7cbe48168e05cfae91881 Mon Sep 17 00:00:00 2001
From: Yossi Itigin <yosefe@mellanox.com>
Date: Wed, 30 Jun 2021 21:23:20 +0300
Subject: [PATCH] TOOLS/INFO: Update help message for context features
---
src/tools/info/ucx_info.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/tools/info/ucx_info.c b/src/tools/info/ucx_info.c
index 2354d4626..d5795d3e9 100644
--- a/src/tools/info/ucx_info.c
+++ b/src/tools/info/ucx_info.c
@@ -41,8 +41,8 @@ static void usage() {
printf(" 'r' : remote memory access\n");
printf(" 't' : tag matching \n");
printf(" 'm' : active messages \n");
- printf(" 'w' : wakeup\n");
printf(" Modifiers to use in combination with above features:\n");
+ printf(" 'w' : wakeup\n");
printf(" 'e' : error handling\n");
printf("\nOther settings:\n");
printf(" -t <name> Filter devices information using specified transport (requires -d)\n");
@@ -66,6 +66,9 @@ static void usage() {
int main(int argc, char **argv)
{
+ const uint64_t required_ucp_features = UCP_FEATURE_AMO32 |
+ UCP_FEATURE_AMO64 | UCP_FEATURE_RMA |
+ UCP_FEATURE_TAG | UCP_FEATURE_AM;
char *ip_addr = NULL;
ucs_config_print_flags_t print_flags;
ucp_ep_params_t ucp_ep_params;
@@ -153,12 +156,12 @@ int main(int argc, char **argv)
case 't':
ucp_features |= UCP_FEATURE_TAG;
break;
- case 'w':
- ucp_features |= UCP_FEATURE_WAKEUP;
- break;
case 'm':
ucp_features |= UCP_FEATURE_AM;
break;
+ case 'w':
+ ucp_features |= UCP_FEATURE_WAKEUP;
+ break;
case 'e':
ucp_ep_params.field_mask |= UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE;
ucp_ep_params.err_mode = UCP_ERR_HANDLING_MODE_PEER;
@@ -242,8 +245,9 @@ int main(int argc, char **argv)
}
if (print_opts & (PRINT_UCP_CONTEXT|PRINT_UCP_WORKER|PRINT_UCP_EP|PRINT_MEM_MAP)) {
- if (ucp_features == 0) {
- printf("Please select UCP features using -u switch: a|r|t|m|w\n");
+ if (!(ucp_features & required_ucp_features)) {
+ printf("Please select at least one of 'a','r','t','m' UCP features "
+ "using -u switch.\n");
usage();
return -1;
}
--
2.31.1