111 lines
3.5 KiB
Diff
111 lines
3.5 KiB
Diff
|
From f0596659bb2ba71bbe6ec80df9d54ea02775f40f Mon Sep 17 00:00:00 2001
|
||
|
From: Andrea Claudi <aclaudi@redhat.com>
|
||
|
Date: Thu, 23 Apr 2020 12:47:12 +0200
|
||
|
Subject: [PATCH] man: rdma-statistic: Add filter description
|
||
|
|
||
|
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1786565
|
||
|
Upstream Status: iproute2.git commit 31824e2299bf5
|
||
|
|
||
|
commit 31824e2299bf5dc609026436db629b0c25cc1a10
|
||
|
Author: Andrea Claudi <aclaudi@redhat.com>
|
||
|
Date: Fri Feb 28 18:36:25 2020 +0100
|
||
|
|
||
|
man: rdma-statistic: Add filter description
|
||
|
|
||
|
Add description for filters on rdma statistics show command.
|
||
|
Also add a filter description on the help message of the command.
|
||
|
Additionally, fix some whitespace issue in the man page.
|
||
|
|
||
|
Reported-by: Zhaojuan Guo <zguo@redhat.com>
|
||
|
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
|
||
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
||
|
---
|
||
|
man/man8/rdma-statistic.8 | 16 ++++++++++++----
|
||
|
rdma/stat.c | 1 +
|
||
|
2 files changed, 13 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/man/man8/rdma-statistic.8 b/man/man8/rdma-statistic.8
|
||
|
index dea6ff24b499b..cd85ca46993a0 100644
|
||
|
--- a/man/man8/rdma-statistic.8
|
||
|
+++ b/man/man8/rdma-statistic.8
|
||
|
@@ -9,7 +9,7 @@ rdma-statistic \- RDMA statistic counter configuration
|
||
|
.B rdma
|
||
|
.RI "[ " OPTIONS " ]"
|
||
|
.B statistic
|
||
|
-.RI " { " COMMAND " | "
|
||
|
+.RI "{ " COMMAND " | "
|
||
|
.BR help " }"
|
||
|
.sp
|
||
|
|
||
|
@@ -23,6 +23,7 @@ rdma-statistic \- RDMA statistic counter configuration
|
||
|
.RI "[ " OBJECT " ]"
|
||
|
.B show link
|
||
|
.RI "[ " DEV/PORT_INDX " ]"
|
||
|
+.RI "[ " FILTER_NAME " " FILTER_VALUE " ]"
|
||
|
|
||
|
.ti -8
|
||
|
.B rdma statistic
|
||
|
@@ -34,7 +35,7 @@ rdma-statistic \- RDMA statistic counter configuration
|
||
|
.IR OBJECT
|
||
|
.B set
|
||
|
.IR COUNTER_SCOPE
|
||
|
-.RI "[ " DEV/PORT_INDEX "]"
|
||
|
+.RI "[ " DEV/PORT_INDEX " ]"
|
||
|
.B auto
|
||
|
.RI "{ " CRITERIA " | "
|
||
|
.BR off " }"
|
||
|
@@ -44,7 +45,7 @@ rdma-statistic \- RDMA statistic counter configuration
|
||
|
.IR OBJECT
|
||
|
.B bind
|
||
|
.IR COUNTER_SCOPE
|
||
|
-.RI "[ " DEV/PORT_INDEX "]"
|
||
|
+.RI "[ " DEV/PORT_INDEX " ]"
|
||
|
.RI "[ " OBJECT-ID " ]"
|
||
|
.RI "[ " COUNTER-ID " ]"
|
||
|
|
||
|
@@ -53,7 +54,7 @@ rdma-statistic \- RDMA statistic counter configuration
|
||
|
.IR OBJECT
|
||
|
.B unbind
|
||
|
.IR COUNTER_SCOPE
|
||
|
-.RI "[ " DEV/PORT_INDEX "]"
|
||
|
+.RI "[ " DEV/PORT_INDEX " ]"
|
||
|
.RI "[ " COUNTER-ID " ]"
|
||
|
.RI "[ " OBJECT-ID " ]"
|
||
|
|
||
|
@@ -69,6 +70,10 @@ rdma-statistic \- RDMA statistic counter configuration
|
||
|
.IR CRITERIA " := "
|
||
|
.RB "{ " type " }"
|
||
|
|
||
|
+.ti -8
|
||
|
+.IR FILTER_NAME " := "
|
||
|
+.RB "{ " cntn " | " lqpn " | " pid " }"
|
||
|
+
|
||
|
.SH "DESCRIPTION"
|
||
|
.SS rdma statistic [object] show - Queries the specified RDMA device for RDMA and driver-specific statistics. Show the default hw counters if object is not specified
|
||
|
|
||
|
@@ -79,6 +84,9 @@ rdma-statistic \- RDMA statistic counter configuration
|
||
|
.I "PORT_INDEX"
|
||
|
- specifies counters on this RDMA port to show.
|
||
|
|
||
|
+.I "FILTER_NAME
|
||
|
+- specifies a filter to show only the results matching it.
|
||
|
+
|
||
|
.SS rdma statistic <object> set - configure counter statistic auto-mode for a specific device/port
|
||
|
In auto mode all objects belong to one category are bind automatically to a single counter set.
|
||
|
|
||
|
diff --git a/rdma/stat.c b/rdma/stat.c
|
||
|
index ef0bbcf147a70..cd99b7ace73fc 100644
|
||
|
--- a/rdma/stat.c
|
||
|
+++ b/rdma/stat.c
|
||
|
@@ -22,6 +22,7 @@ static int stat_help(struct rd *rd)
|
||
|
pr_out("where OBJECT: = { qp }\n");
|
||
|
pr_out(" CRITERIA : = { type }\n");
|
||
|
pr_out(" COUNTER_SCOPE: = { link | dev }\n");
|
||
|
+ pr_out(" FILTER_NAME: = { cntn | lqpn | pid }\n");
|
||
|
pr_out("Examples:\n");
|
||
|
pr_out(" %s statistic qp show\n", rd->filename);
|
||
|
pr_out(" %s statistic qp show link mlx5_2/1\n", rd->filename);
|
||
|
--
|
||
|
2.25.4
|
||
|
|