From patchwork Sat Sep 30 01:42:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 9978977 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 603E36034B for ; Sat, 30 Sep 2017 01:42:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F6F9298A4 for ; Sat, 30 Sep 2017 01:42:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 428DD298C5; Sat, 30 Sep 2017 01:42:23 +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 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 F06AC298A4 for ; Sat, 30 Sep 2017 01:42:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752594AbdI3BmW convert rfc822-to-8bit (ORCPT ); Fri, 29 Sep 2017 21:42:22 -0400 Received: from mga14.intel.com ([192.55.52.115]:63283 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752589AbdI3BmV (ORCPT ); Fri, 29 Sep 2017 21:42:21 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Sep 2017 18:42:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,455,1500966000"; d="scan'208";a="1020036237" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 29 Sep 2017 18:42:20 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 29 Sep 2017 18:42:20 -0700 Received: from crsmsx103.amr.corp.intel.com (172.18.63.31) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 29 Sep 2017 18:42:20 -0700 Received: from crsmsx101.amr.corp.intel.com ([169.254.1.79]) by CRSMSX103.amr.corp.intel.com ([169.254.4.74]) with mapi id 14.03.0319.002; Fri, 29 Sep 2017 19:42:17 -0600 From: "Weiny, Ira" To: "'Hal Rosenstock (hal@dev.mellanox.co.il)'" , "odedni@mellanox.com" CC: "linux-rdma@vger.kernel.org" Subject: RE: ibqueryerrors.c: Add support for additional counters in PortCountersExtended Thread-Topic: RE: ibqueryerrors.c: Add support for additional counters in PortCountersExtended Thread-Index: AdM5jTa4IElWyP+9Q++3oQ+4VUxUlA== Date: Sat, 30 Sep 2017 01:42:17 +0000 Message-ID: <2807E5FD2F6FDA4886F6618EAC48510E67D31C52@CRSMSX101.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZThiYTJhNzUtZDM5MC00ZWIzLWIwZWUtNWFkNjFkMGI0MjRkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik0xYVJvS3ZQZUdlRjhNYUFKXC9PVmMwekpQd0FxbU8yWnhpZkM0XC9FcjNjbz0ifQ== x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [172.18.205.10] 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 Hal, Oded, I have lost the original email from this submission but got it off of patchwork. Question on the hunk below. if (strcmp(name, mad_field_name(f)) == 0) { mad_encode_field(thresholds, f, &val); - snprintf(tmp, 255, "[%s = %u]", name, val); + snprintf(tmp, 255, "[%s = %lu]", name, val); threshold_str = realloc(threshold_str, strlen(threshold_str)+strlen(tmp)+1); if (!threshold_str) { --- 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/ibqueryerrors.c b/src/ibqueryerrors.c index 304dc154c4b4..4ea762a1f344 100644 --- a/src/ibqueryerrors.c +++ b/src/ibqueryerrors.c @@ -105,15 +105,15 @@ static unsigned valid_gid(ib_gid_t * gid) return memcmp(&zero_gid, gid, sizeof(*gid)); } -static void set_thres(char *name, uint32_t val) +static void set_thres(char *name, uint64_t val) { int f; int n; char tmp[256]; - for (f = IB_PC_FIRST_F; f <= IB_PC_LAST_F; f++) { + for (f = IB_PC_EXT_ERR_SYM_F; f <= IB_PC_EXT_XMT_WAIT_F; f++) { How does this change allow for users to set the old Port Counters thresholds? Ira