From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54729C76191 for ; Thu, 18 Jul 2019 08:32:37 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id E67F12173B for ; Thu, 18 Jul 2019 08:32:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E67F12173B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1D6061C01; Thu, 18 Jul 2019 10:32:36 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 631EC152A for ; Thu, 18 Jul 2019 10:32:34 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 01:32:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,276,1559545200"; d="scan'208";a="343297199" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 18 Jul 2019 01:32:33 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jul 2019 01:32:33 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jul 2019 01:32:32 -0700 Received: from shsmsx105.ccr.corp.intel.com ([169.254.11.232]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.240]) with mapi id 14.03.0439.000; Thu, 18 Jul 2019 16:32:31 +0800 From: "Zhang, Xiao" To: "Wang, Haiyue" , "dev@dpdk.org" CC: "Xing, Beilei" , "Zhang, Qi Z" Thread-Topic: [DPDK] net/i40e: fix SFP X722 not work with FW4.16 Thread-Index: AQHVPUFhMHbNT90Ewkye8orz2l8216bQCV/AgAAAgACAAAHM4A== Date: Thu, 18 Jul 2019 08:32:30 +0000 Message-ID: References: <1563470021-16325-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-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: Wang, Haiyue > Sent: Thursday, July 18, 2019 4:26 PM > 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 >=20 >=20 > BR, > Haiyue >=20 >=20 > > -----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 > > > > > -----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_ethdev.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); > > > > 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; > > > Looks like changing the share code. Or like : >=20 > 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 ... Yes, it's better to clear this flag in case it will be used in other place. > > > -- > > > 2.7.4