From patchwork Wed Oct 22 12:41:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 5131811 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BF05C9F349 for ; Wed, 22 Oct 2014 12:41:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD5A22017E for ; Wed, 22 Oct 2014 12:41:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A6F720158 for ; Wed, 22 Oct 2014 12:41:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933307AbaJVMlY (ORCPT ); Wed, 22 Oct 2014 08:41:24 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:40342 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933049AbaJVMlX (ORCPT ); Wed, 22 Oct 2014 08:41:23 -0400 Received: by mail-wg0-f49.google.com with SMTP id x12so3740994wgg.32 for ; Wed, 22 Oct 2014 05:41:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=lhoSPZ4+Dnb/j87FHCRc4W7HVbyrbQQt1gZbe7qZjFU=; b=L0a+qK+sWI8DAnG2JcbF6HkTFXTtGNsFvfL8ToioztREiHX1S8cpoEuf8Jrxa4EY0/ 5BGvgu1Ea4NsCLWdpiQZFt2syZXzHgQvvLIWYt8mp378p4YiCtzJoKlrbyo9vDBsxo0C +M3T5hNKmVTUei47S8JbeVQ2QUYIqwnAFQ4M2tYlPEmXZJmhHVeqU7YafIncbRHMnYEM kzLYyigcnZ8z7tsNACu/6PsiOEsXdZ9EH2BySFbLpNA8vKv/oUFUACqtZTEe5dCm3h1i dRYc70HaA2sPY70DEYvJaa5vhZxMiwSLAJD6XaPj5oKDuPMDITJ4sqSSCBGHXIlA1r++ fuQA== X-Gm-Message-State: ALoCoQmnJZ+QOPPn447Eqsrc2QF21jmGI2Ng1UVGFiaCGj+UynPxYhmQdYZJhoIxLpXM92pA3Lfi X-Received: by 10.180.9.65 with SMTP id x1mr5356758wia.30.1413981682433; Wed, 22 Oct 2014 05:41:22 -0700 (PDT) Received: from [192.168.1.102] (c-98-229-118-119.hsd1.ma.comcast.net. [98.229.118.119]) by mx.google.com with ESMTPSA id pn4sm18754570wjc.38.2014.10.22.05.41.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Oct 2014 05:41:21 -0700 (PDT) Message-ID: <5447A5E5.4080502@dev.mellanox.co.il> Date: Wed, 22 Oct 2014 08:41:09 -0400 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: "linux-rdma (linux-rdma@vger.kernel.org)" CC: Dan Ben-Yosef Subject: [PATCH opensm] iba/ib_types.h: Add support for new MAD SM:PortInfoExtended and for modifying PM:PortExtendedSpeedsCounters Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dan Ben Yosef This commit is to support IBA spec changes for SM:PortInfoExtended and PM:PortExtendedSpeedsCounters). This change includes: 1. Adding new capability mask parse options for SM:PortInfo:CapabilityMask2. 2. Adding new capability mask parse options for SM:PortInfoExtended:CapabilityMask. 3. Adding new capability mask parse options for PM:ClassPortInfo:CapabilityMask. 4. Adding structs for SM:PortInfoExtended and for SA:PortInfoExtendedRecord. Signed-off-by: Dan Ben Yosef Signed-off-by: Hal Rosenstock --- include/iba/ib_types.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/include/iba/ib_types.h b/include/iba/ib_types.h index 59bd424..93c706e 100644 --- a/include/iba/ib_types.h +++ b/include/iba/ib_types.h @@ -3528,6 +3528,9 @@ typedef struct _ib_class_port_info { #define IB_PM_EXT_WIDTH_NOIETF_SUP (CL_HTON16(((uint16_t)1)<<10)) #define IB_PM_SAMPLES_ONLY_SUP (CL_HTON16(((uint16_t)1)<<11)) #define IB_PM_PC_XMIT_WAIT_SUP (CL_HTON16(((uint16_t)1)<<12)) +#define IS_PM_INH_LMTD_PKEY_MC_CONSTR_ERR (CL_HTON16(((uint16_t)1)<<13)) +#define IS_PM_RSFEC_COUNTERS_SUP (CL_HTON16(((uint16_t)1)<<14)) +#define IB_PM_IS_QP1_DROP_SUP (CL_HTON16(((uint16_t)1)<<15)) /****f* IBA Base: Types/ib_class_set_resp_time_val * NAME @@ -4660,6 +4663,37 @@ typedef struct _ib_port_info { #define IB_PORT_CAP_HAS_MCAST_FDB_TOP (CL_HTON32(0x40000000)) #define IB_PORT_CAP_HAS_HIER_INFO (CL_HTON32(0x80000000)) +#define IB_PORT_CAP2_IS_SET_NODE_DESC_SUPPORTED (CL_HTON16(0x0001)) +#define IB_PORT_CAP2_IS_PORT_INFO_EXT_SUPPORTED (CL_HTON16(0x0002)) + +/****s* IBA Base: Types/ib_port_info_ext_t +* NAME +* ib_port_info_ext_t +* +* DESCRIPTION +* IBA defined PortInfoExtended. (14.2.5.19) +* +* SYNOPSIS +*/ +#include +typedef struct _ib_port_info_ext { + ib_net32_t cap_mask; + ib_net16_t fec_mode_active; + ib_net16_t fdr_fec_mode_sup; + ib_net16_t fdr_fec_mode_enable; + ib_net16_t edr_fec_mode_sup; + ib_net16_t edr_fec_mode_enable; + uint8_t reserved[50]; +} PACK_SUFFIX ib_port_info_ext_t; +#include +/************/ + +#define IB_PORT_EXT_NO_FEC_MODE_ACTIVE 0 +#define IB_PORT_EXT_FIRE_CODE_FEC_MODE_ACTIVE (CL_HTON16(0x0001)) +#define IB_PORT_EXT_RS_FEC_MODE_ACTIVE (CL_HTON16(0x0002)) +#define IB_PORT_EXT_LOW_LATENCY_RS_FEC_MODE_ACTIVE (CL_HTON16(0x0003)) + +#define IB_PORT_EXT_CAP_IS_FEC_MODE_SUPPORTED (CL_HTON32(0x00000001)) /****f* IBA Base: Types/ib_port_info_get_port_state * NAME * ib_port_info_get_port_state @@ -6358,6 +6392,15 @@ typedef struct _ib_portinfo_record { #include #include +typedef struct _ib_portinfoext_record { + ib_net16_t lid; + uint8_t port_num; + uint8_t options; + ib_port_info_ext_t port_info_ext; +} PACK_SUFFIX ib_portinfoext_record_t; +#include + +#include typedef struct _ib_link_record { ib_net16_t from_lid; uint8_t from_port_num;