From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E31B51B2D5 for ; Fri, 26 Jan 2018 18:08:42 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jan 2018 09:08:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,417,1511856000"; d="scan'208";a="22556524" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.48]) ([10.237.220.48]) by orsmga003.jf.intel.com with ESMTP; 26 Jan 2018 09:08:40 -0800 To: Ajit Khaparde , dev@dpdk.org References: <4e127fe7-7351-31b5-40d4-37d850c5fb12@intel.com> <20180125224757.82325-1-ajit.khaparde@broadcom.com> <20180125224757.82325-7-ajit.khaparde@broadcom.com> From: Ferruh Yigit Message-ID: Date: Fri, 26 Jan 2018 17:08:39 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180125224757.82325-7-ajit.khaparde@broadcom.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 6/7] net/bnxt: add 100G speed detection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2018 17:08:43 -0000 On 1/25/2018 10:47 PM, Ajit Khaparde wrote: > When the driver is loaded on a 100G NIC, the port speed is not > displayed correctly. Parse the 100G speed before displaying it. > > Signed-off-by: Ajit Khaparde > --- > drivers/net/bnxt/bnxt_hwrm.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c > index 8fac05251..d412e51fc 100644 > --- a/drivers/net/bnxt/bnxt_hwrm.c > +++ b/drivers/net/bnxt/bnxt_hwrm.c > @@ -2139,6 +2139,8 @@ static uint32_t bnxt_parse_hw_link_speed(uint16_t hw_link_speed) > break; > case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_50GB: > eth_link_speed = ETH_SPEED_NUM_50G; This case doesn't have a "break" statement, which looks like unintentional, but if it is intentional please put /* Fallthrough */ comment to prevent build error [1]. [1] ...dpdk/drivers/net/bnxt/bnxt_hwrm.c: In function ‘bnxt_parse_hw_link_speed’: ...dpdk/drivers/net/bnxt/bnxt_hwrm.c:2141:18: error: this statement may fall through [-Werror=implicit-fallthrough=] eth_link_speed = ETH_SPEED_NUM_50G; ...dpdk/drivers/net/bnxt/bnxt_hwrm.c:2142:2: note: here case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100GB: ^~~~ > + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100GB: > + eth_link_speed = ETH_SPEED_NUM_100G; > break; > case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_2GB: > default: >