From patchwork Tue Jun 13 17:13:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Or Gerlitz X-Patchwork-Id: 9784383 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F12E660212 for ; Tue, 13 Jun 2017 17:13:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D75882853F for ; Tue, 13 Jun 2017 17:13:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA573286C4; Tue, 13 Jun 2017 17:13:17 +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=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 514F22853F for ; Tue, 13 Jun 2017 17:13:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751805AbdFMRNQ (ORCPT ); Tue, 13 Jun 2017 13:13:16 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:54391 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751802AbdFMRNQ (ORCPT ); Tue, 13 Jun 2017 13:13:16 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from ogerlitz@mellanox.com) with ESMTPS (AES256-SHA encrypted); 13 Jun 2017 20:13:12 +0300 Received: from r-vnc04.mtr.labs.mlnx (r-vnc04.mtr.labs.mlnx [10.208.0.116]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v5DHDCbS022340; Tue, 13 Jun 2017 20:13:12 +0300 From: Or Gerlitz To: Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, Yishai Hadas , Or Gerlitz Subject: [PATCH rdma-core] mlx5: Hexify device IDs Date: Tue, 13 Jun 2017 20:13:08 +0300 Message-Id: <1497373988-26357-1-git-send-email-ogerlitz@mellanox.com> X-Mailer: git-send-email 1.8.2.3 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 To make things less eye damaging and align with the mlx4 provided and both kernel drivers -- lets have the device IDs in hex, as seen e.g by lspci: 81:00.0 Ethernet controller [0200]: Mellanox Technologies MT27710 Family [ConnectX-4 Lx] [15b3:1015] 82:00.0 Ethernet controller [0200]: Mellanox Technologies MT28800 Family [ConnectX-5 Ex] [15b3:1019] 82:00.2 Ethernet controller [0200]: Mellanox Technologies MT27800 Family [ConnectX-5 Virtual Function] [15b3:1018] Signed-off-by: Or Gerlitz --- Stepped on that while debugging something, for quick ref here's the relevant kernel code: { PCI_VDEVICE(MELLANOX, 0x1011) }, /* Connect-IB */ { PCI_VDEVICE(MELLANOX, 0x1012), MLX5_PCI_DEV_IS_VF}, /* Connect-IB VF */ { PCI_VDEVICE(MELLANOX, 0x1013) }, /* ConnectX-4 */ { PCI_VDEVICE(MELLANOX, 0x1014), MLX5_PCI_DEV_IS_VF}, /* ConnectX-4 VF */ { PCI_VDEVICE(MELLANOX, 0x1015) }, /* ConnectX-4LX */ { PCI_VDEVICE(MELLANOX, 0x1016), MLX5_PCI_DEV_IS_VF}, /* ConnectX-4LX VF */ { PCI_VDEVICE(MELLANOX, 0x1017) }, /* ConnectX-5, PCIe 3.0 */ { PCI_VDEVICE(MELLANOX, 0x1018), MLX5_PCI_DEV_IS_VF}, /* ConnectX-5 VF */ { PCI_VDEVICE(MELLANOX, 0x1019) }, /* ConnectX-5 Ex */ { PCI_VDEVICE(MELLANOX, 0x101a), MLX5_PCI_DEV_IS_VF}, /* ConnectX-5 Ex VF */ { PCI_VDEVICE(MELLANOX, 0x101b) }, /* ConnectX-6 */ { PCI_VDEVICE(MELLANOX, 0x101c), MLX5_PCI_DEV_IS_VF}, /* ConnectX-6 VF */ { PCI_VDEVICE(MELLANOX, 0xa2d2) }, /* BlueField integrated ConnectX-5 network controller */ { PCI_VDEVICE(MELLANOX, 0xa2d3), MLX5_PCI_DEV_IS_VF}, /* BlueField integrated ConnectX-5 network controller VF */ Also, Doug/Jason, it would be cool if you can set dnf builddep rdma-core on FC to work, this way ppl can just blindly run it instead of the manual dnf install thing. providers/mlx5/mlx5.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/providers/mlx5/mlx5.c b/providers/mlx5/mlx5.c index 1bbc3f2..ecd5d6a 100644 --- a/providers/mlx5/mlx5.c +++ b/providers/mlx5/mlx5.c @@ -66,20 +66,20 @@ static struct { unsigned vendor; unsigned device; } hca_table[] = { - HCA(MELLANOX, 4113), /* MT4113 Connect-IB */ - HCA(MELLANOX, 4114), /* Connect-IB Virtual Function */ - HCA(MELLANOX, 4115), /* ConnectX-4 */ - HCA(MELLANOX, 4116), /* ConnectX-4 Virtual Function */ - HCA(MELLANOX, 4117), /* ConnectX-4LX */ - HCA(MELLANOX, 4118), /* ConnectX-4LX Virtual Function */ - HCA(MELLANOX, 4119), /* ConnectX-5, PCIe 3.0 */ - HCA(MELLANOX, 4120), /* ConnectX-5 Virtual Function */ - HCA(MELLANOX, 4121), /* ConnectX-5 Ex */ - HCA(MELLANOX, 4122), /* ConnectX-5 Ex VF */ - HCA(MELLANOX, 4123), /* ConnectX-6 */ - HCA(MELLANOX, 4124), /* ConnectX-6 VF */ - HCA(MELLANOX, 41682), /* BlueField integrated ConnectX-5 network controller */ - HCA(MELLANOX, 41683), /* BlueField integrated ConnectX-5 network controller VF */ + HCA(MELLANOX, 0x1011), /* MT4113 Connect-IB */ + HCA(MELLANOX, 0x1012), /* Connect-IB Virtual Function */ + HCA(MELLANOX, 0x1013), /* ConnectX-4 */ + HCA(MELLANOX, 0x1014), /* ConnectX-4 Virtual Function */ + HCA(MELLANOX, 0x1015), /* ConnectX-4LX */ + HCA(MELLANOX, 0x1016), /* ConnectX-4LX Virtual Function */ + HCA(MELLANOX, 0x1017), /* ConnectX-5, PCIe 3.0 */ + HCA(MELLANOX, 0x1018), /* ConnectX-5 Virtual Function */ + HCA(MELLANOX, 0x1019), /* ConnectX-5 Ex */ + HCA(MELLANOX, 0x101a), /* ConnectX-5 Ex VF */ + HCA(MELLANOX, 0x101b), /* ConnectX-6 */ + HCA(MELLANOX, 0x101c), /* ConnectX-6 VF */ + HCA(MELLANOX, 0xa2d2), /* BlueField integrated ConnectX-5 network controller */ + HCA(MELLANOX, 0xa2d3), /* BlueField integrated ConnectX-5 network controller VF */ }; uint32_t mlx5_debug_mask = 0;