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 ACCADA0471 for ; Thu, 18 Jul 2019 10:23:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AC2DA1DBF; Thu, 18 Jul 2019 10:23:35 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 2670A152A for ; Thu, 18 Jul 2019 10:23:32 +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 fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 01:23:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,276,1559545200"; d="scan'208";a="191533627" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 18 Jul 2019 01:23:32 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jul 2019 01:23:32 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jul 2019 01:23:31 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.60]) with mapi id 14.03.0439.000; Thu, 18 Jul 2019 16:23:30 +0800 From: "Wang, Haiyue" To: "Zhang, Xiao" , "dev@dpdk.org" CC: "Xing, Beilei" , "Zhang, Qi Z" Thread-Topic: [DPDK] net/i40e: fix SFP X722 not work with FW4.16 Thread-Index: AQHVPUFhwrVQphyTBUS+QqKn0nlwNqbQCV/A Date: Thu, 18 Jul 2019 08:23:29 +0000 Message-ID: References: <1563470021-16325-1-git-send-email-xiao.zhang@intel.com> In-Reply-To: <1563470021-16325-1-git-send-email-xiao.zhang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjJkMTc3NWUtZmE4NC00YzM4LTgzZjgtY2Q3ZmM5ZmRlYWRiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRDdETFcwcXN5XC9VK1lJXC9RUUlRRHlkYnMwZmY4blB0cmo5Q05cL0d5bXZ2NkNVTDAxR08wWnlRWU05WkoxTVwvNjUifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action 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-dev] [DPDK] net/i40e: fix SFP X722 not work with FW4.16 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Zhang, Xiao > Sent: Friday, July 19, 2019 01:14 > To: dev@dpdk.org > Cc: Xing, Beilei ; Wang, Haiyue ; Zhang, Qi Z > ; Zhang, Xiao > Subject: [DPDK] net/i40e: fix SFP X722 not work with FW4.16 >=20 > FW4.16 of SFP X722 does not support setting TPID by set_switch_config > adminq operation, for firmware version less than 4.16 TPID is set by > register instead. Follow the same path with new firmware version for > SFP X722 to make it work. >=20 > Signed-off-by: Xiao Zhang > --- > drivers/net/i40e/i40e_ethdev.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 2b9fc45..bf6dc2b 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -3708,7 +3708,9 @@ i40e_vlan_tpid_set(struct rte_eth_dev *dev, > } >=20 > /* 802.1ad frames ability is added in NVM API 1.7*/ > - if (hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) { > + /* FW4.16 for SFP x722 does not support set_switch_config option */ > + if ((hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) && > + hw->device_id !=3D I40E_DEV_ID_SFP_X722) { > if (qinq) { > if (vlan_type =3D=3D ETH_VLAN_TYPE_OUTER) > hw->first_tag =3D rte_cpu_to_le_16(tpid); Control the ' I40E_HW_FLAG_802_1AD_CAPABLE ' set or not here is better ? enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) /* The ability to RX (not drop) 802.1ad frames was added in API 1.7 */ if ((hw->aq.api_maj_ver > 1) || ((hw->aq.api_maj_ver =3D=3D 1) && (hw->aq.api_min_ver >=3D 7))) hw->flags |=3D I40E_HW_FLAG_802_1AD_CAPABLE; > -- > 2.7.4