From: Gal Pressman Date: Sun, 4 Aug 2019 08:07:56 +0000 (+0300) Subject: rdma: Add driver QP type string X-Git-Tag: v5.4.0~37^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39307384cea7be7f50036f18ab3e9925026399fd;p=thirdparty%2Fiproute2.git rdma: Add driver QP type string 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 Signed-off-by: David Ahern --- diff --git a/rdma/res.c b/rdma/res.c index ef863f142..97a7b9640 100644 --- a/rdma/res.c +++ b/rdma/res.c @@ -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"; }