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 49EE7A0471 for ; Thu, 18 Jul 2019 10:26:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E500D152A; Thu, 18 Jul 2019 10:26:00 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id B2754DE3 for ; Thu, 18 Jul 2019 10:25:58 +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 orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 01:25:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,276,1559545200"; d="scan'208";a="191534196" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 18 Jul 2019 01:25:57 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) 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:25:57 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jul 2019 01:25:56 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.240]) with mapi id 14.03.0439.000; Thu, 18 Jul 2019 16:25:54 +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/AgAAAgAA= Date: Thu, 18 Jul 2019 08:25:54 +0000 Message-ID: References: <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" BR, Haiyue > -----Original Message----- > From: Wang, Haiyue > Sent: Thursday, July 18, 2019 16:23 > To: Zhang, Xiao ; dev@dpdk.org > Cc: Xing, Beilei ; Zhang, Qi Z > Subject: RE: [DPDK] net/i40e: fix SFP X722 not work with FW4.16 >=20 > > -----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 > > > > 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. > > > > Signed-off-by: Xiao Zhang > > --- > > drivers/net/i40e/i40e_ethdev.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_eth= dev.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, > > } > > > > /* 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); >=20 > Control the ' I40E_HW_FLAG_802_1AD_CAPABLE ' set or not here is better ? >=20 > enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) >=20 > /* 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; >=20 Looks like changing the share code. Or like : ret =3D i40e_init_adminq(hw); if (ret !=3D I40E_SUCCESS) { PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret); return -EIO; } ... clear I40E_HW_FLAG_802_1AD_CAPABLE here ... > > -- > > 2.7.4