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 EACA0A0573; Thu, 5 Mar 2020 10:06:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F43A1BFDB; Thu, 5 Mar 2020 10:06:46 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C11181BFDB; Thu, 5 Mar 2020 10:06:44 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2020 01:06:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,517,1574150400"; d="scan'208";a="240751760" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 05 Mar 2020 01:06:35 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 5 Mar 2020 01:06:34 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 5 Mar 2020 01:06:34 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.137]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.206]) with mapi id 14.03.0439.000; Thu, 5 Mar 2020 17:06:32 +0800 From: "Zhang, Qi Z" To: "Wang, ShougangX" , "dev@dpdk.org" CC: "Yang, Qiming" , "Xing, Beilei" , "Wang, ShougangX" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: fix DCB init issue Thread-Index: AQHV8sqmOpuPFzf4AUur1QFLD021G6g5s4dQ Date: Thu, 5 Mar 2020 09:06:31 +0000 Message-ID: <039ED4275CED7440929022BC67E70611547DA953@SHSMSX103.ccr.corp.intel.com> References: <20200305084037.69571-1-shougangx.wang@intel.com> In-Reply-To: <20200305084037.69571-1-shougangx.wang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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] [PATCH] net/i40e: fix DCB init issue 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: dev On Behalf Of Shougang Wang > Sent: Thursday, March 5, 2020 4:41 PM > To: dev@dpdk.org > Cc: Yang, Qiming ; Xing, Beilei > ; Wang, ShougangX ; > stable@dpdk.org > Subject: [dpdk-dev] [PATCH] net/i40e: fix DCB init issue >=20 > Stopping lldp is necessary for DPDK, but it will cause DCB init failed. > For kernel shared code, the prerequisite for successful initialization of= DCB is > that LLDP is enabled. This patch starts lldp before DCB init and stops it= when > finish init. >=20 > Fixes: a8e84b22bd55 ("net/i40e/base: support persistent LLDP") > Cc: stable@dpdk.org >=20 > Signed-off-by: Shougang Wang > --- > drivers/net/i40e/i40e_ethdev.c | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 9fbda1c34..9f37662f8 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -11669,11 +11669,9 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, > bool sw_dcb) > * LLDP MIB change event. > */ > if (sw_dcb =3D=3D TRUE) { > - if (i40e_need_stop_lldp(dev)) { > - ret =3D i40e_aq_stop_lldp(hw, TRUE, TRUE, NULL); > - if (ret !=3D I40E_SUCCESS) > - PMD_INIT_LOG(DEBUG, "Failed to stop lldp"); > - } It's better to add some comment here, so easy for other people to understan= d the purpose. Otherwise Acked-by: Qi Zhang > + ret =3D i40e_aq_start_lldp(hw, true, NULL); > + if (ret !=3D I40E_SUCCESS) > + PMD_INIT_LOG(DEBUG, "Failed to start lldp"); >=20 > ret =3D i40e_init_dcb(hw, true); > /* If lldp agent is stopped, the return value from @@ -11718,6 > +11716,12 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb= ) > ret, hw->aq.asq_last_status); > return -ENOTSUP; > } > + > + if (i40e_need_stop_lldp(dev)) { > + ret =3D i40e_aq_stop_lldp(hw, true, true, NULL); > + if (ret !=3D I40E_SUCCESS) > + PMD_INIT_LOG(DEBUG, "Failed to stop lldp"); > + } > } else { > ret =3D i40e_aq_start_lldp(hw, true, NULL); > if (ret !=3D I40E_SUCCESS) > -- > 2.17.1