From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 2B8E4A0C45;
	Wed, 15 Sep 2021 04:01:33 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id B6CFE4014F;
	Wed, 15 Sep 2021 04:01:32 +0200 (CEST)
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
 by mails.dpdk.org (Postfix) with ESMTP id 0BDB74003C;
 Wed, 15 Sep 2021 04:01:30 +0200 (CEST)
X-IronPort-AV: E=McAfee;i="6200,9189,10107"; a="219002691"
X-IronPort-AV: E=Sophos;i="5.85,292,1624345200"; d="scan'208";a="219002691"
Received: from orsmga005.jf.intel.com ([10.7.209.41])
 by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 14 Sep 2021 19:01:29 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.85,292,1624345200"; d="scan'208";a="651006770"
Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82])
 by orsmga005.jf.intel.com with ESMTP; 14 Sep 2021 19:01:29 -0700
Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by
 fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
 15.1.2242.12; Tue, 14 Sep 2021 19:01:27 -0700
Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by
 SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
 15.1.2242.12; Wed, 15 Sep 2021 10:01:20 +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.2242.012;
 Wed, 15 Sep 2021 10:01:19 +0800
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: Qiming Chen <chenqiming_huawei@163.com>, "dev@dpdk.org" <dev@dpdk.org>
CC: "Xing, Beilei" <beilei.xing@intel.com>, "Wu, Jingjing"
 <jingjing.wu@intel.com>, "stable@dpdk.org" <stable@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH] net/iavf: fix queue start failed
Thread-Index: AQHXqFE/1my/gIqMpEWAk8zfuUWvsqukWhcA
Date: Wed, 15 Sep 2021 02:01:19 +0000
Message-ID: <607c48cab4794060a904913cf22b4459@intel.com>
References: <20210913034023.4324-1-chenqiming_huawei@163.com>
In-Reply-To: <20210913034023.4324-1-chenqiming_huawei@163.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
dlp-reaction: no-action
dlp-version: 11.6.200.16
dlp-product: dlpe-windows
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] [PATCH] net/iavf: fix queue start failed
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Qiming Chen
> Sent: Monday, September 13, 2021 11:40 AM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel=
.com>;
> Qiming Chen <chenqiming_huawei@163.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/iavf: fix queue start failed
>=20
> In the iavf_dev_start function, if the first execution of iavf_start_queu=
es fails, it
> will still fail when it is started again.
> The patch solves the problem of rolling back resources after the queue fa=
ils to
> start, and then restarts successfully.
>=20
> Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
> Cc: stable@dpdk.org
>=20
> Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
> ---
>  drivers/net/iavf/iavf_ethdev.c | 1 +
>  1 file changed, 1 insertion(+)
>=20
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethde=
v.c
> index 6ed2dbbcbe..9eca4b70ee 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -897,6 +897,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
>=20
>  err_mac:
>  	iavf_add_del_all_mac_addr(adapter, false);
> +	iavf_stop_queues(dev);

This looks like not a good place to fix the issue, if iavf_start_queues fai=
led, it it better all the resource be cleanup inside the function?

>  err_queue:
>  	return -1;
>  }
> --
> 2.30.1.windows.1