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