From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8B4D9A0613 for ; Wed, 25 Sep 2019 10:16:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5858F1BE8A; Wed, 25 Sep 2019 10:16:11 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 9DDED1DBC; Wed, 25 Sep 2019 10:16:07 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2019 01:16:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,547,1559545200"; d="scan'208";a="213966101" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 25 Sep 2019 01:16:06 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 25 Sep 2019 01:16:06 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 25 Sep 2019 01:16:06 -0700 Received: from shsmsx105.ccr.corp.intel.com ([169.254.11.23]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.195]) with mapi id 14.03.0439.000; Wed, 25 Sep 2019 16:16:04 +0800 From: "Zhang, Xiao" To: "Gavin Hu (Arm Technology China)" , "dev@dpdk.org" CC: "Lu, Wenzhuo" , "marcdevel@gmail.com" , "stable@dpdk.org" , nd Thread-Topic: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability Thread-Index: AQHVc0woz+egRxTUI0udjYq1DMIixqc7ciaAgACUsiA= Date: Wed, 25 Sep 2019 08:16:04 +0000 Message-ID: References: <1569379794-54847-1-git-send-email-xiao.zhang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] net/ixgbe: fix X553 wrong speed capability X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi Gavin, > -----Original Message----- > From: Gavin Hu (Arm Technology China) [mailto:Gavin.Hu@arm.com] > Sent: Wednesday, September 25, 2019 3:04 PM > To: Zhang, Xiao ; dev@dpdk.org > Cc: Lu, Wenzhuo ; marcdevel@gmail.com; > stable@dpdk.org; nd > Subject: RE: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability >=20 > Hi Xiao, >=20 > > -----Original Message----- > > From: dev On Behalf Of Zhang Xiao > > Sent: Wednesday, September 25, 2019 10:50 AM > > To: dev@dpdk.org > > Cc: wenzhuo.lu@intel.com; Zhang Xiao ; > > marcdevel@gmail.com; stable@dpdk.org > > Subject: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability > > > > The speed capability of X553 1GbE should be ETH_LINK_SPEED_1G | > > ETH_LINK_SPEED_100M | ETH_LINK_SPEED_10M rather than > ETH_LINK_SPEED_1G > > | ETH_LINK_SPEED_10G. Correct it to fix the issue. > > > > Fixes: e274f5732225 ("ethdev: add speed capabilities") > > Cc: marcdevel@gmail.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Zhang Xiao > > --- > > drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > > b/drivers/net/ixgbe/ixgbe_ethdev.c > > index 7eb3d05..e7c4ce3 100644 > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > > @@ -3843,6 +3843,11 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, > > struct rte_eth_dev_info *dev_info) > > dev_info->flow_type_rss_offloads =3D IXGBE_RSS_OFFLOAD_ALL; > > > > dev_info->speed_capa =3D ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G; > Look through the following code, 100M and 1G is more common to across x53= 0 > to x550 devices, while 10M and 10G is specific. > Here 10G should be replaced by 100M and you can save some comparisons in > the following code. Sorry, I am not quite clear about your comments here. Do you mean I should change the logic of the legacy code to make it shorter= or there is some mistake here? This code is not only for x540 and x550, but also for 82598, 82599, x550em,= etc. Here if I replace 10G with 100M, still need add lots of other compari= sons. Xiao > /Gavin >=20 > > + if (hw->device_id =3D=3D IXGBE_DEV_ID_X550EM_A_1G_T || > > + hw->device_id =3D=3D IXGBE_DEV_ID_X550EM_A_1G_T_L) > > + dev_info->speed_capa =3D ETH_LINK_SPEED_10M | > > + ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G; > > + > > if (hw->mac.type =3D=3D ixgbe_mac_X540 || > > hw->mac.type =3D=3D ixgbe_mac_X540_vf || > > hw->mac.type =3D=3D ixgbe_mac_X550 || > > -- > > 2.7.4