]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
rdma: Add driver QP type string
authorGal Pressman <galpress@amazon.com>
Sun, 4 Aug 2019 08:07:56 +0000 (11:07 +0300)
committerDavid Ahern <dsahern@gmail.com>
Wed, 7 Aug 2019 19:00:01 +0000 (12:00 -0700)
RDMA resource tracker now tracks driver QPs as well, add driver QP type
string to qp_types_to_str function.

Signed-off-by: Gal Pressman <galpress@amazon.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
rdma/res.c

index ef863f142eca1c8da9f63eacf1e4973ba0d60f73..97a7b9640185e23505a93fbd695921e20f0ce9cb 100644 (file)
@@ -148,9 +148,11 @@ const char *qp_types_to_str(uint8_t idx)
                                                     "UC", "UD", "RAW_IPV6",
                                                     "RAW_ETHERTYPE",
                                                     "UNKNOWN", "RAW_PACKET",
-                                                    "XRC_INI", "XRC_TGT" };
+                                                    "XRC_INI", "XRC_TGT",
+                                                    [0xFF] = "DRIVER",
+       };
 
-       if (idx < ARRAY_SIZE(qp_types_str))
+       if (idx < ARRAY_SIZE(qp_types_str) && qp_types_str[idx])
                return qp_types_str[idx];
        return "UNKNOWN";
 }