|
|
8def76 |
From e67f089156708052abeb9c67d77cb0cf966d89c6 Mon Sep 17 00:00:00 2001
|
|
|
8def76 |
From: Andrea Claudi <aclaudi@redhat.com>
|
|
|
8def76 |
Date: Wed, 29 May 2019 18:40:20 +0200
|
|
|
8def76 |
Subject: [PATCH] rdma: Fix representation of PortInfo CapabilityMask
|
|
|
8def76 |
|
|
|
8def76 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1664694
|
|
|
8def76 |
Upstream Status: iproute2.git commit d090fbf33bd15
|
|
|
8def76 |
|
|
|
8def76 |
commit d090fbf33bd15d82978596920b07616aa119ac2f
|
|
|
8def76 |
Author: Leon Romanovsky <leonro@mellanox.com>
|
|
|
8def76 |
Date: Sun Sep 16 20:28:13 2018 +0300
|
|
|
8def76 |
|
|
|
8def76 |
rdma: Fix representation of PortInfo CapabilityMask
|
|
|
8def76 |
|
|
|
8def76 |
The port capability mask represents IBTA PortInfo specification,
|
|
|
8def76 |
but as it is written in description of kernel commit 2f944c0fbf58
|
|
|
8def76 |
("RDMA: Fix storage of PortInfo CapabilityMask in the kernel"),
|
|
|
8def76 |
the bit 26 was mistakenly overwritten.
|
|
|
8def76 |
|
|
|
8def76 |
The rdmatool followed it too and mislead users by presenting wrong
|
|
|
8def76 |
value. Since it never showed proper value, we update the whole
|
|
|
8def76 |
port_cap_mask to comply with IBTA and show real HW values.
|
|
|
8def76 |
|
|
|
8def76 |
Fixes: da990ab40a92 ("rdma: Add link object")
|
|
|
8def76 |
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
|
|
|
8def76 |
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
|
8def76 |
---
|
|
|
8def76 |
rdma/link.c | 14 ++++++++++----
|
|
|
8def76 |
1 file changed, 10 insertions(+), 4 deletions(-)
|
|
|
8def76 |
|
|
|
8def76 |
diff --git a/rdma/link.c b/rdma/link.c
|
|
|
8def76 |
index 7e914c870994e..7a6d4b7e356d7 100644
|
|
|
8def76 |
--- a/rdma/link.c
|
|
|
8def76 |
+++ b/rdma/link.c
|
|
|
8def76 |
@@ -20,6 +20,7 @@ static int link_help(struct rd *rd)
|
|
|
8def76 |
static const char *caps_to_str(uint32_t idx)
|
|
|
8def76 |
{
|
|
|
8def76 |
#define RDMA_PORT_FLAGS(x) \
|
|
|
8def76 |
+ x(RESERVED, 0) \
|
|
|
8def76 |
x(SM, 1) \
|
|
|
8def76 |
x(NOTICE, 2) \
|
|
|
8def76 |
x(TRAP, 3) \
|
|
|
8def76 |
@@ -32,7 +33,9 @@ static const char *caps_to_str(uint32_t idx)
|
|
|
8def76 |
x(SM_DISABLED, 10) \
|
|
|
8def76 |
x(SYS_IMAGE_GUID, 11) \
|
|
|
8def76 |
x(PKEY_SW_EXT_PORT_TRAP, 12) \
|
|
|
8def76 |
+ x(CABLE_INFO, 13) \
|
|
|
8def76 |
x(EXTENDED_SPEEDS, 14) \
|
|
|
8def76 |
+ x(CAP_MASK2, 15) \
|
|
|
8def76 |
x(CM, 16) \
|
|
|
8def76 |
x(SNMP_TUNNEL, 17) \
|
|
|
8def76 |
x(REINIT, 18) \
|
|
|
8def76 |
@@ -43,7 +46,12 @@ static const char *caps_to_str(uint32_t idx)
|
|
|
8def76 |
x(BOOT_MGMT, 23) \
|
|
|
8def76 |
x(LINK_LATENCY, 24) \
|
|
|
8def76 |
x(CLIENT_REG, 25) \
|
|
|
8def76 |
- x(IP_BASED_GIDS, 26)
|
|
|
8def76 |
+ x(OTHER_LOCAL_CHANGES, 26) \
|
|
|
8def76 |
+ x(LINK_SPPED_WIDTH, 27) \
|
|
|
8def76 |
+ x(VENDOR_SPECIFIC_MADS, 28) \
|
|
|
8def76 |
+ x(MULT_PKER_TRAP, 29) \
|
|
|
8def76 |
+ x(MULT_FDB, 30) \
|
|
|
8def76 |
+ x(HIERARCHY_INFO, 31)
|
|
|
8def76 |
|
|
|
8def76 |
enum { RDMA_PORT_FLAGS(RDMA_BITMAP_ENUM) };
|
|
|
8def76 |
|
|
|
8def76 |
@@ -51,9 +59,7 @@ static const char *caps_to_str(uint32_t idx)
|
|
|
8def76 |
rdma_port_names[] = { RDMA_PORT_FLAGS(RDMA_BITMAP_NAMES) };
|
|
|
8def76 |
#undef RDMA_PORT_FLAGS
|
|
|
8def76 |
|
|
|
8def76 |
- if (idx < ARRAY_SIZE(rdma_port_names) && rdma_port_names[idx])
|
|
|
8def76 |
- return rdma_port_names[idx];
|
|
|
8def76 |
- return "UNKNOWN";
|
|
|
8def76 |
+ return rdma_port_names[idx];
|
|
|
8def76 |
}
|
|
|
8def76 |
|
|
|
8def76 |
static void link_print_caps(struct rd *rd, struct nlattr **tb)
|
|
|
8def76 |
--
|
|
|
8def76 |
2.20.1
|
|
|
8def76 |
|