Blame SOURCES/0001-infiniband-diags-specify-the-HCA-name-and-Port-numbe.patch

0e3d1a
From a2c4768ff2f0516791b80640894c5abd4eab14bf Mon Sep 17 00:00:00 2001
0e3d1a
From: Honggang Li <honli@redhat.com>
0e3d1a
Date: Tue, 27 Oct 2020 17:06:43 +0800
0e3d1a
Subject: [PATCH] infiniband-diags: specify the HCA name and Port number when
0e3d1a
 run ibportstate
0e3d1a
0e3d1a
A host, from which execute the enable/disable/reset command, may be
0e3d1a
connected to multiple InfiniBand fabrics. When the HCA name and
0e3d1a
Port number were not specified, the libibumad library will pick up the
0e3d1a
first active port it was found, which may not be wanted. Recommend to
0e3d1a
specific the HCA name and Port number when run ibportstate.
0e3d1a
0e3d1a
On the other hand, HCA port may be locally changed without the
0e3d1a
knowledge of the Subnet Manager. When locally enable a disabled HCA
0e3d1a
port, the HCA name and Port number must be specified.
0e3d1a
0e3d1a
Signed-off-by: Honggang Li <honli@redhat.com>
0e3d1a
---
0e3d1a
 infiniband-diags/ibportstate.c            |  4 ++--
0e3d1a
 infiniband-diags/man/ibportstate.8.in.rst | 13 +++++++------
0e3d1a
 2 files changed, 9 insertions(+), 8 deletions(-)
0e3d1a
0e3d1a
diff --git a/infiniband-diags/ibportstate.c b/infiniband-diags/ibportstate.c
0e3d1a
index 17d1e1503834..7f3afb83bdb3 100644
0e3d1a
--- a/infiniband-diags/ibportstate.c
0e3d1a
+++ b/infiniband-diags/ibportstate.c
0e3d1a
@@ -401,8 +401,8 @@ int main(int argc, char **argv)
0e3d1a
 	    "\twidth, query, down, arm, active, vls, mtu, lid, smlid, lmc,\n"
0e3d1a
 	    "\tmkey, mkeylease, mkeyprot\n";
0e3d1a
 	const char *usage_examples[] = {
0e3d1a
-		"3 1 disable\t\t\t# by lid",
0e3d1a
-		"-G 0x2C9000100D051 1 enable\t# by guid",
0e3d1a
+		"-C qib0 -P 1 3 1 disable     # by CA name, CA Port Number, lid, physical port number",
0e3d1a
+		"-C qib0 -P 1 3 1 enable      # by CA name, CA Port Number, lid, physical port number",
0e3d1a
 		"-D 0 1\t\t\t# (query) by direct route",
0e3d1a
 		"3 1 reset\t\t\t# by lid",
0e3d1a
 		"3 1 speed 1\t\t\t# by lid",
0e3d1a
diff --git a/infiniband-diags/man/ibportstate.8.in.rst b/infiniband-diags/man/ibportstate.8.in.rst
0e3d1a
index da1de4c76317..309a3d191c51 100644
0e3d1a
--- a/infiniband-diags/man/ibportstate.8.in.rst
0e3d1a
+++ b/infiniband-diags/man/ibportstate.8.in.rst
0e3d1a
@@ -22,8 +22,9 @@ DESCRIPTION
0e3d1a
 ibportstate allows the port state and port physical state of an IB port
0e3d1a
 to be queried (in addition to link width and speed being validated
0e3d1a
 relative to the peer port when the port queried is a switch port),
0e3d1a
-or a switch port to be disabled, enabled, or reset. It
0e3d1a
-also allows the link speed/width enabled on any IB port to be adjusted.
0e3d1a
+or a switch port to be disabled, enabled, or reset. InfiniBand HCA port
0e3d1a
+state may be changed locally without the knowledge of the Subnet Manager.
0e3d1a
+It also allows the link speed/width enabled on any IB port to be adjusted.
0e3d1a
 
0e3d1a
 OPTIONS
0e3d1a
 =======
0e3d1a
@@ -34,8 +35,8 @@ OPTIONS
0e3d1a
                         mkey, mkeylease, mkeyprot
0e3d1a
 			(Default is query)
0e3d1a
 
0e3d1a
-        **enable, disable, and reset** are only allowed on switch ports (An
0e3d1a
-        error is indicated if attempted on CA or router ports)
0e3d1a
+        **enable, disable, and reset** change or reset a switch or HCA port state
0e3d1a
+        (You must specify the CA name and Port number when locally change CA port state.)
0e3d1a
 
0e3d1a
         **off** change the port state to disable.
0e3d1a
 
0e3d1a
@@ -114,8 +115,8 @@ EXAMPLES
0e3d1a
 ========
0e3d1a
 
0e3d1a
 ::
0e3d1a
-        ibportstate 3 1 disable                  # by lid
0e3d1a
-        ibportstate -G 0x2C9000100D051 1 enable  # by guid
0e3d1a
+        ibportstate -C qib0 -P 1 3 1 disable     # by CA name, CA Port Number, lid, physical port number
0e3d1a
+        ibportstate -C qib0 -P 1 3 1 enable      # by CA name, CA Port Number, lid, physical port number
0e3d1a
         ibportstate -D 0 1                       # (query) by direct route
0e3d1a
         ibportstate 3 1 reset                    # by lid
0e3d1a
         ibportstate 3 1 speed 1                  # by lid
0e3d1a
-- 
0e3d1a
2.25.4
0e3d1a