From patchwork Tue Nov 28 22:12:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 10081177 X-Patchwork-Delegate: ira.weiny@intel.com 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 13F5160353 for ; Tue, 28 Nov 2017 22:12:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05E2F2970E for ; Tue, 28 Nov 2017 22:12:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EEFD229710; Tue, 28 Nov 2017 22:12:04 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 95F1D2970F for ; Tue, 28 Nov 2017 22:12:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752187AbdK1WMD (ORCPT ); Tue, 28 Nov 2017 17:12:03 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:44444 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752129AbdK1WMD (ORCPT ); Tue, 28 Nov 2017 17:12:03 -0500 Received: by mail-qt0-f194.google.com with SMTP id j5so1895367qth.11 for ; Tue, 28 Nov 2017 14:12:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev-mellanox-co-il.20150623.gappssmtp.com; s=20150623; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=XFezMZOhj2tJ7zAoHPQh62LzQXO8tVuuLhqC1dFGTp8=; b=GJ+wFNPF/Q7WkYjLbI40FPoEc9jYEWAzf/ehgNbMqm8QGIZ03gs40xpfoyeqAtDnTs p11IkFON8lcFqg/t9dEbipv8EGbXiVwcni7mwWHKdb7RAoXVGleqdgTy2EV5EsPmOk9H 9KM6j99meadHKvxDEjfuGYQJZ5FWl+Opqk32JlzoJdOt+KF8WhZHgFME1g0WprIygZvl KQLBy/gVKR0PQZQcVJalgOrJfpocE+e9GsiH2dBofSWxuO902nQ3MxwhfLEtrkWkZW8v XUyboRaVI6RoK9nrLINNgQDrqPUuoDJ54EE4DaTbMgtKNTU+IZnA5oskWBzsYPughOlz sz6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=XFezMZOhj2tJ7zAoHPQh62LzQXO8tVuuLhqC1dFGTp8=; b=rnfTPfZ/vOTdOiYJLoN2UR7LtupJcDDyk9ZAiMIjJi2Kv+WdW4K8zfdp08+ZHMRBJB WatMuDhv6RCl9MoXs/3N1qD6qs5oJDvgVtxi+ltbMX4J1jDBMM5lYGzjraYC0ikYgSNS 6Ip6j2/LJesqDnD9ppj9OK0CPJ0erH5/af2YQs7/AyoXn0Infmq+ylu13Ta+qAKbCYDk yj0m8YoluIINIUpJWSv+63CY0vnFrs8zIT1natAaFlui/N0r9EOPA2qpZkCJur4Zku8y /6uXdvX8FAkXN7U6aIyWZ8cAm9cEusE3HlLK87xShY//jui8NGM09dGpSaqqgWcQNTDJ ykcg== X-Gm-Message-State: AJaThX7uVuWwtKEptK7Yt95iE4tb7WBjEJx6qAs3z8IQ4lyy0B54Pv/a yliAdOZ+tZ31xAI/zCDH4kWD/e04 X-Google-Smtp-Source: AGs4zMYRRVnGQ7SJHyIgPQEfTGimaEjPfp8o7Ot2cIPaJiOWJvbj1PRkE9PWhPngVZmerQoURzDQhA== X-Received: by 10.237.34.51 with SMTP id n48mr1249226qtc.300.1511907122345; Tue, 28 Nov 2017 14:12:02 -0800 (PST) Received: from [192.168.1.183] (c-73-182-207-166.hsd1.ma.comcast.net. [73.182.207.166]) by smtp.googlemail.com with ESMTPSA id c16sm150431qke.53.2017.11.28.14.12.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Nov 2017 14:12:01 -0800 (PST) To: "Weiny, Ira" Cc: "linux-rdma@vger.kernel.org" From: Hal Rosenstock Subject: [PATCH infiniband-diags 4/6] ib[netdiscover portstate].c: Add HDR support Message-ID: <5e17e529-a54e-e425-eb89-dbce256bc8f1@dev.mellanox.co.il> Date: Tue, 28 Nov 2017 17:12:01 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Content-Language: en-US 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 Per MgtWG comments #9364-9366 Signed-off-by: Hal Rosenstock --- src/ibnetdiscover.c | 3 +++ src/ibportstate.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ibnetdiscover.c b/src/ibnetdiscover.c index 68374a2..6f360bb 100644 --- a/src/ibnetdiscover.c +++ b/src/ibnetdiscover.c @@ -115,6 +115,9 @@ char *dump_linkspeedext_compat(uint32_t espeed, uint32_t speed, uint32_t fdr10) case 2: return ("EDR"); break; + case 4: + return ("HDR"); + break; } return ("???"); } diff --git a/src/ibportstate.c b/src/ibportstate.c index 06bd5d2..6b78fa7 100644 --- a/src/ibportstate.c +++ b/src/ibportstate.c @@ -356,7 +356,12 @@ static void validate_speed(int speed, int peerspeed, int lsa) static void validate_extended_speed(int espeed, int peerespeed, int lsea) { - if ((espeed & peerespeed & 0x2)) { + if ((espeed & peerespeed & 0x4)) { + if (lsea != 4) + IBWARN + ("Peer ports operating at active extended speed %d rather than 4 (53.125 Gbps)", + lsea); + } else if ((espeed & peerespeed & 0x2)) { if (lsea != 2) IBWARN ("Peer ports operating at active extended speed %d rather than 2 (25.78125 Gbps)",