From patchwork Sun Aug 4 08:07:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gal Pressman X-Patchwork-Id: 11074713 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B46CF14E5 for ; Sun, 4 Aug 2019 08:08:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5EBA28862 for ; Sun, 4 Aug 2019 08:08:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9749C2886C; Sun, 4 Aug 2019 08:08:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F10928862 for ; Sun, 4 Aug 2019 08:08:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726034AbfHDIIT (ORCPT ); Sun, 4 Aug 2019 04:08:19 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:14327 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725936AbfHDIIT (ORCPT ); Sun, 4 Aug 2019 04:08:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1564906098; x=1596442098; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=FIN2taldKWEt2pP9NpPZWMTKJRTjL9lQCOBlSBd8ByM=; b=XB4ErKgDsLOMWmTaE+VozLl/5VuKTT6glw8axqEoSXh/zZAKvw+hk2g1 lwh40BCEqLoN1MWSJraiNwzGSCXfD6RXi4GVMUdYFFNFE9l6wWd7f/dsY NXoyH3Zh90RpUJ7zEAkf8Vxzx2dm0+YukkeeLEe3cjjxCEof01MvXc9Ul Y=; X-IronPort-AV: E=Sophos;i="5.64,345,1559520000"; d="scan'208";a="816428103" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-2a-8549039f.us-west-2.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 04 Aug 2019 08:08:16 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2a-8549039f.us-west-2.amazon.com (Postfix) with ESMTPS id A54F7A2E12; Sun, 4 Aug 2019 08:08:16 +0000 (UTC) Received: from EX13D19EUA004.ant.amazon.com (10.43.165.28) by EX13MTAUEA001.ant.amazon.com (10.43.61.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 4 Aug 2019 08:08:16 +0000 Received: from EX13MTAUWC001.ant.amazon.com (10.43.162.135) by EX13D19EUA004.ant.amazon.com (10.43.165.28) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 4 Aug 2019 08:08:15 +0000 Received: from 8c85908914bf.ant.amazon.com (10.218.69.135) by mail-relay.amazon.com (10.43.162.232) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Sun, 4 Aug 2019 08:08:12 +0000 From: Gal Pressman To: Stephen Hemminger CC: , , Leon Romanovsky , Gal Pressman Subject: [PATCH iproute2-next] rdma: Add driver QP type string Date: Sun, 4 Aug 2019 11:07:56 +0300 Message-ID: <20190804080756.58364-1-galpress@amazon.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Leon Romanovsky --- rdma/res.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rdma/res.c b/rdma/res.c index ef863f142eca..97a7b9640185 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"; }