From patchwork Mon Mar 27 15:35:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 9647053 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 6F8AC601D7 for ; Mon, 27 Mar 2017 15:36:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6058D28427 for ; Mon, 27 Mar 2017 15:36:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5554A2843F; Mon, 27 Mar 2017 15:36:05 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 D43B728427 for ; Mon, 27 Mar 2017 15:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752292AbdC0PgE (ORCPT ); Mon, 27 Mar 2017 11:36:04 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:36682 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751385AbdC0PgD (ORCPT ); Mon, 27 Mar 2017 11:36:03 -0400 Received: by mail-wr0-f196.google.com with SMTP id u1so14382526wra.3 for ; Mon, 27 Mar 2017 08:35:57 -0700 (PDT) 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-transfer-encoding; bh=mpdaOZwAXDPI+67QzaIREFoRC5tUgY8oyquxokTfkvs=; b=WJ6kawDvuzlPvXC9xSLkcFcFnk6TM6MMIOT2nWrajIQEATzWPmZIEtremeI/vRwT4s hdjaG8BBAURx40y7wHtfLfhAZTC3lIqgFD9giF9IAcE6fpz29viLG+aK3mkMgylN5Vrq 4si9EM777mv7Sv5Vyf/bK7Ei9J7b3C9TVBvk8OZ2N+4Gz6XrbuH9pi0t3ULgqKBjsHCN XTu2aVdRFNf6K94vP6f05pVYuNVpif3AJZi6dbQLcOdcBHtwZi4uLTEDVfZFLYBvi5yp hKJg4l19/dHCpSp1f3xDO/8WdTs/8D1LPNjqZ5APSj28QImhaRL8uWVTEge0dfWVJKYx hypA== 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-transfer-encoding; bh=mpdaOZwAXDPI+67QzaIREFoRC5tUgY8oyquxokTfkvs=; b=s/2dOkqH6X6cXiL9SsSMLiuE/sXXlIPL6aUmk7fjLRWwphuFYhk6MNRfmffHilQowA EHZZ4X5ZFF7TEZD2WCEGLNwn1npVHtnvqq2iU+CEH7mthpzl2loQwghfgAdy23bU5bTf lVtae0yfTStM9WbYw42We8EfX1VtIQacbNhtRuERn2S8vtpKqOcl5hvM1j9E+N1UrLxN hiQxUj/3Xy9MWx/qsXRBjDIQpySGhF+QLetseLSVUeBZMvZn49e9oUcvO6Xc93px8/MG NWmF6gljUPDbGVi0VSfaQ14mE4DOU1n9ZCxH/gpAhN3EVj0Haj70MvkZnnS/23N3RoPD cG+w== X-Gm-Message-State: AFeK/H1As4OOLXhsIoJYAXfDN/PvcMb8ZXEH3QO7/i2BIRuIu3O5NUoh6vJMea9mYOT6RQ== X-Received: by 10.28.18.21 with SMTP id 21mr9828346wms.77.1490628946565; Mon, 27 Mar 2017 08:35:46 -0700 (PDT) Received: from [192.168.1.183] (c-67-189-170-197.hsd1.ma.comcast.net. [67.189.170.197]) by smtp.googlemail.com with ESMTPSA id o15sm1337592wmd.10.2017.03.27.08.35.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Mar 2017 08:35:45 -0700 (PDT) To: "Weiny, Ira" Cc: "linux-rdma@vger.kernel.org" From: Hal Rosenstock Subject: [PATCH libibmad 2/2] gs.c: In performance_reset_via, use proper CounterSelect2 field for PortCountersExtended Message-ID: <26623475-0c21-ebf2-f4e8-dd40693fab64@dev.mellanox.co.il> Date: Mon, 27 Mar 2017 11:35:44 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 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 Per MgtWG errata #9302 Signed-off-by: Hal Rosenstock --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/gs.c b/src/gs.c index 5541b6b..90db7e2 100644 --- a/src/gs.c +++ b/src/gs.c @@ -110,11 +110,14 @@ uint8_t *performance_reset_via(void *rcvbuf, ib_portid_t * dest, memset(rcvbuf, 0, IB_MAD_SIZE); - /* Same for attribute IDs */ + /* Next 2 lines - same for attribute IDs */ mad_set_field(rcvbuf, 0, IB_PC_PORT_SELECT_F, port); mad_set_field(rcvbuf, 0, IB_PC_COUNTER_SELECT_F, mask); mask = mask >> 16; - mad_set_field(rcvbuf, 0, IB_PC_COUNTER_SELECT2_F, mask); + if (id == IB_GSI_PORT_COUNTERS_EXT) + mad_set_field(rcvbuf, 0, IB_PC_EXT_COUNTER_SELECT2_F, mask); + else + mad_set_field(rcvbuf, 0, IB_PC_COUNTER_SELECT2_F, mask); rpc.attr.mod = 0; rpc.timeout = timeout; rpc.datasz = IB_PC_DATA_SZ;