From patchwork Tue Nov 28 22:12:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 10081179 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 7295160353 for ; Tue, 28 Nov 2017 22:12:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6521829712 for ; Tue, 28 Nov 2017 22:12:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A45929714; Tue, 28 Nov 2017 22:12:11 +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 D8B1029713 for ; Tue, 28 Nov 2017 22:12:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751711AbdK1WMK (ORCPT ); Tue, 28 Nov 2017 17:12:10 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:46834 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752129AbdK1WMJ (ORCPT ); Tue, 28 Nov 2017 17:12:09 -0500 Received: by mail-qk0-f194.google.com with SMTP id b184so1903130qkc.13 for ; Tue, 28 Nov 2017 14:12:09 -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=JQFsZIxVbDsMTMWE/IXxF5SggtGFCnsvOONcdUB/lkA=; b=0SR5JPTryFVK38uVMVBbm+t+xnzlIbFTndHwbHDGxm25vA9MsjYCdT2kaqdsjPlqAv /zyMRxJ9qD+cL0JMjVpwTTIbzOX+yG9Kj0brd2FUVyCUb5X6pz1laWLFnmJLesLgQn31 RtCXfL6EbHlo9VSntcjKO4F9G/nXZb3NyhGh4V2Wtl7yS6ng00sTY8CvFacBp5SB6sGY WHxbLTPXtecHoLzIcKFQ9534DbhB43fzQGKMLdIGWYRJxD4CFeLR41IErZyXUmB8a8wA J4bMN0IcN0i/QG8KF34QmQc4aBf0W6t2FJdVBWAzJyK7Kr2dfNKp8KThKt6ngMSQlKl3 86kQ== 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=JQFsZIxVbDsMTMWE/IXxF5SggtGFCnsvOONcdUB/lkA=; b=ErORmBbE3ddKwn3Tfx7gPaxyvjMiTpmtiVNDQ2nitfrT7VfzPCmkdLigW7ah9pMrGd 9+ccNEwSO0DXUzi5Rcbj682L4t3IPDpP8sz3XmpqN/TNOKIkFzhzseICy54pwjJhUYwQ zyemMLv8k1k8WSpo0zEEzgbi5iqSR+LLtXBBSamotQifMFdWM2TuT+lUeDAKbPvJECDK HtVJGUJ1G/gG2Rx3UevRM63HlcAR6MRwDLsp2W0a9dnpcEDDPY64TwZ9/zpl82Lp2H6W p3UHv1grm7VRWSEdgXM4FjdWpYxPC49Bq+Q1ogXGaazhppC/jHop5CR2A/XmBwbDkN3D nCrg== X-Gm-Message-State: AJaThX6op93Gzlb8hvZHZBCWrnGJC4Te6Ka9vFQELDdO2rnfmAS93N6m 5TuG67MyDrNuUjXe4yk/TVkNhocZ X-Google-Smtp-Source: AGs4zMbpsoX9+Y32HFBpPXriOMGZTHozjaISlTLEiN3xId8yDW0/JfzE8STCn2Lc8H3R7M678ICBKQ== X-Received: by 10.55.108.7 with SMTP id h7mr1174043qkc.111.1511907128683; Tue, 28 Nov 2017 14:12:08 -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 c16sm141252qtd.80.2017.11.28.14.12.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Nov 2017 14:12:08 -0800 (PST) To: "Weiny, Ira" Cc: "linux-rdma@vger.kernel.org" From: Hal Rosenstock Subject: [PATCH infiniband-diags 5/6] [perfquery.c ibdiag_common.h]: Add support for HDR RS-FEC Message-ID: Date: Tue, 28 Nov 2017 17:12:07 -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 HDR uses different RS-FEC. Original RS-FEC is RS(528,514) and is bit 2 in FECMode fields and value 2 in FECModeActive field. HDR uses RS(544,514) which is bit 4 in HDRFECMode fields and value 4 in FECModeActive field. Per MgtWG comments #9367 and #9368 Signed-off-by: Hal Rosenstock --- include/ibdiag_common.h | 4 ++++ src/perfquery.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/ibdiag_common.h b/include/ibdiag_common.h index b8c5987..ae93ba3 100644 --- a/include/ibdiag_common.h +++ b/include/ibdiag_common.h @@ -114,6 +114,10 @@ extern char *ibd_nd_format; #define IB_PORT_EXT_LOW_LATENCY_RS_FEC_MODE_ACTIVE (CL_HTON16(0x0003)) #endif +#ifndef IB_PORT_EXT_RS_FEC2_MODE_ACTIVE +#define IB_PORT_EXT_RS_FEC2_MODE_ACTIVE (CL_HTON16(0x0004)) +#endif + /* SM PortInfoExtended CapabilityMask Bits */ #ifndef IB_PORT_EXT_CAP_IS_FEC_MODE_SUPPORTED #define IB_PORT_EXT_CAP_IS_FEC_MODE_SUPPORTED (CL_HTON32(0x00000001)) diff --git a/src/perfquery.c b/src/perfquery.c index 6bc4d9c..19d4273 100644 --- a/src/perfquery.c +++ b/src/perfquery.c @@ -571,7 +571,8 @@ static uint8_t is_rsfec_mode_active(ib_portid_t * portid, int port, &fec_mode_active); if((pie_capmask & CL_NTOH32(IB_PORT_EXT_CAP_IS_FEC_MODE_SUPPORTED)) && - (CL_NTOH16(IB_PORT_EXT_RS_FEC_MODE_ACTIVE) == (fec_mode_active & 0xffff))) + ((CL_NTOH16(IB_PORT_EXT_RS_FEC_MODE_ACTIVE) == (fec_mode_active & 0xffff)) || + (CL_NTOH16(IB_PORT_EXT_RS_FEC2_MODE_ACTIVE) == (fec_mode_active & 0xffff)))) return 1; }