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 1B05DA0559; Tue, 17 Mar 2020 02:35:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 26A701C0B1; Tue, 17 Mar 2020 02:35:25 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 91F671C0AD; Tue, 17 Mar 2020 02:35:22 +0100 (CET) IronPort-SDR: 3c1mM+i4t51ECwAs0dZ7HYKceYImr/mdkov2zpvi8A9nOzYlc1FaKNiD5mNHoPYAYQyFySHHl7 SswKIahPPJuQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2020 18:35:21 -0700 IronPort-SDR: MyENPS7+DWnW8OZJhr6un1XIMZ/D2SUV0XR9DXa823sOeE69pNEEwYDOsqaMarcgrSN9YxjpeE rgAgb6p9Qh7g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,562,1574150400"; d="scan'208";a="443574246" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 16 Mar 2020 18:35:20 -0700 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 16 Mar 2020 18:35:20 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX602.ccr.corp.intel.com (10.109.6.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 17 Mar 2020 09:35:18 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Tue, 17 Mar 2020 09:35:18 +0800 From: "Li, Xiaoyun" To: Kevin Traynor , Zhike Wang , "dev@dpdk.org" CC: "Xing, Beilei" , "Zhang, Qi Z" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [dpdk-stable] [PATCH] net/i40e: fix X722 judgement when disable adminq operation Thread-Index: AQHV+WvvSbpMnhEPA0GklngkXQStVKhKdQiAgAAJvoCAAYXHoA== Date: Tue, 17 Mar 2020 01:35:18 +0000 Message-ID: <04a292da526c4906b343965a4f47a8d8@intel.com> References: <1579137597-14076-1-git-send-email-wangzhike@jd.com> <36b37ce80e63461cbb6ec200abfeb38a@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.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/i40e: fix X722 judgement when disable adminq operation 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: Kevin Traynor > Sent: Monday, March 16, 2020 18:16 > To: Li, Xiaoyun ; Zhike Wang ; > dev@dpdk.org > Cc: Xing, Beilei ; Zhang, Qi Z ; > stable@dpdk.org > Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/i40e: fix X722 judgemen= t > when disable adminq operation >=20 > On 16/03/2020 02:02, Li, Xiaoyun wrote: > > > > > >> -----Original Message----- > >> From: Kevin Traynor [mailto:ktraynor@redhat.com] > >> Sent: Saturday, March 14, 2020 03:16 > >> To: Li, Xiaoyun ; Zhike Wang > >> ; dev@dpdk.org > >> Cc: Xing, Beilei ; Zhang, Qi Z > >> ; stable@dpdk.org > >> Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/i40e: fix X722 > >> judgement when disable adminq operation > >> > >> On 13/03/2020 04:40, Li, Xiaoyun wrote: > >>> Hi > >>> > >>> This issue is already fixed in 20.02 with base code update of the > >>> following > >> commit. > >>> > >>> > >>> > >>> commit 37b091c75b13d2f26359be9b77adbc33c55a7581 > >>> > >>> Author: Xiaolong Ye > >>> > >>> Date: Mon Jan 13 10:39:31 2020 +0800 > >>> > >>> > >>> > >>> net/i40e/base: extend PHY access AQ command > >>> > >>> > >>> > >>> Currently FW use MDIO I/F number corresponded with current PF > >>> for PHY > >>> > >>> access. This code allow to specify used MDIO I/F number. > >>> > >>> > >>> > >>> Signed-off-by: Piotr Azarewicz > >>> > >>> Signed-off-by: Xiaolong Ye > >>> > >>> Acked-by: Qi Zhang > >>> > >>> Acked-by: Beilei Xing > >>> beilei.xing@intel.com > >>> > >>> > >>> > >>> But it makes sense to back port this to stable release so it can > >>> work with dpdk > >> version <=3D19.11. > >>> > >>> Still some comments inline. > >>> > >>> > >>> > >>>> -----Original Message----- > >>> > >>>> From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Zhike > >>>> Wang > >>> > >>>> Sent: Thursday, January 16, 2020 09:20 > >>> > >>>> To: dev@dpdk.org > >>> > >>>> Cc: Xing, Beilei ; Zhang, Qi Z > >>>> ; > >>> > >>>> stable@dpdk.org; Zhike Wang > >>> > >>>> Subject: [dpdk-stable] [PATCH] net/i40e: fix X722 judgement when > >>>> disable > >>> > >>>> adminq operation > >>> > >>>> > >>> > >>>> X722 SFPs have different flavors, eg I40E_DEV_ID_SFP_X722 > >>> > >>>> /I40E_DEV_ID_SFP_I_X722. So instead we use mac.type to judge > >>>> whether it is > >>> > >>>> X722 or not. > >>> > >>>> > >>> > >>> Please be careful about your commit log. If you use mac.type =3D=3D > >>> X722, then > >> that's not just X722 SFP but all X722 devices. > >>> > >>> You can just say something like X722 doesn't support adminq > >>> operation so > >> disable it. > >>> > >> > >> You say commit log, but isn't that what is done in the code? > > > > His commit log only says about X722 SFPs but mac.type =3D=3D X722 means= all > X722 devices. SFPs are only a part of X722. > > So I prefer his commit log can explain the root cause. > > >=20 > Yes, my comment/question is similar about the code. >=20 > "if (hw->mac.type =3D=3D I40E_MAC_X722)" >=20 > is this correct? I've checked the base code update in 20.02. When the mac type is X722, this= flag is not set. So I think it should be correct. The following is the related base code. switch (hw->mac.type) { case I40E_MAC_XL710: if (aq->api_maj_ver > 1 || (aq->api_maj_ver =3D=3D 1 && aq->api_min_ver >=3D I40E_MINOR_VER_GET_LINK_INFO_XL710)) { hw->flags |=3D I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE; hw->flags |=3D I40E_HW_FLAG_FW_LLDP_STOPPABLE; /* The ability to RX (not drop) 802.1ad frames */ hw->flags |=3D I40E_HW_FLAG_802_1AD_CAPABLE; } break; case I40E_MAC_X722: hw->flags |=3D I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE | I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK; if (aq->api_maj_ver > 1 || (aq->api_maj_ver =3D=3D 1 && aq->api_min_ver >=3D I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722)) hw->flags |=3D I40E_HW_FLAG_FW_LLDP_STOPPABLE; if (aq->api_maj_ver > 1 || (aq->api_maj_ver =3D=3D 1 && aq->api_min_ver >=3D I40E_MINOR_VER_GET_LINK_INFO_X722)) hw->flags |=3D I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE; /* fall through */ default: break; } >=20 > >> > >>> > >>> > >>>> Fixes: 9efa8d28b ("net/i40e: fix SFP X722 with FW4.16") > >>> > >>> Please follow the DPDK community code style. Fix line needs commit > >>> id of 12 > >> bit. > >>> > >>> In this case, should be: Fixes: 9efa8d28b4da ("net/i40e: fix SFP > >>> X722 with > >> FW4.16") > >>> > >>> And since this fix makes sense for <=3D19.11, please add this line: C= c: > >> stable@dpdk.org > >>> > >> > >> Please add the stable branches requested in the usual format. > >> > >> http://doc.dpdk.org/guides/contributing/patches.html#backporting-patc > >> hes- > >> for-stable-releases > >> > >>> > >>> > >>>> Signed-off-by: Zhike Wang > >>>> > > >>> > >>>> --- > >>> > >>>> drivers/net/i40e/i40e_ethdev.c | 2 +- > >>> > >>>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>>> > >>> > >>>> diff --git a/drivers/net/i40e/i40e_ethdev.c > >>>> b/drivers/net/i40e/i40e_ethdev.c > >>> > >>>> index 5999c96..85ccb76 100644 > >>> > >>>> --- a/drivers/net/i40e/i40e_ethdev.c > >>> > >>>> +++ b/drivers/net/i40e/i40e_ethdev.c > >>> > >>>> @@ -1443,7 +1443,7 @@ static inline void > >>>> i40e_config_automask(struct > >>> > >>>> i40e_pf *pf) > >>> > >>>> return -EIO; > >>> > >>>> } > >>> > >>>> /* Firmware of SFP x722 does not support adminq option > >>>> */ > >>> > >>>> - if (hw->device_id =3D=3D I40E_DEV_ID_SFP_X722) > >>> > >>>> + if (hw->mac.type =3D=3D I40E_MAC_X722) > >>> > >>>> hw->flags &=3D > >>>> ~I40E_HW_FLAG_802_1AD_CAPABLE; > >>> > >>>> > >>> > >>>> PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM > >>>> %02d.%02d.%02d > >>> > >>>> eetrack %04x", > >>> > >>>> -- > >>> > >>>> 1.8.3.1 > >>> > >>>> > >>> > >