naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0004-man-rdma-statistic-Add-filter-description.patch

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