From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 98E071B2AB for ; Wed, 28 Nov 2018 10:32:25 +0100 (CET) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181128093223euoutp01ed85a6d6116d8069f59bff584d90f833~rP_NsC6hM1928019280euoutp01k for ; Wed, 28 Nov 2018 09:32:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181128093223euoutp01ed85a6d6116d8069f59bff584d90f833~rP_NsC6hM1928019280euoutp01k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1543397543; bh=nfcUD0IusdoqNeC1MgIYydGScC1vRdLAYpwaQ4pznmY=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=pmFkYtagFrdChcOxvKecUqELmDHjXDZpuXji8FU/TnteMo1tnyL0t0Za23Q+jGELH 8os/fbdKLbCJI/92nVhdd4LWyQLiFj7I8Zq0zGINOxpNBEi3bJCXOGR0aRq2Xe7V2o fm9fejbJSOY+X9WZSwh/KXllzdpWi6H+wHFQfHnk= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181128093222eucas1p2be4062ce70a9719c3f2622a5b8e2db57~rP_NKkzhy3107731077eucas1p27; Wed, 28 Nov 2018 09:32:22 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 51.18.04806.6A06EFB5; Wed, 28 Nov 2018 09:32:22 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20181128093221eucas1p119d9c4741bb612ae7fc5700c64e8595a~rP_MVuG8N2545625456eucas1p16; Wed, 28 Nov 2018 09:32:21 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20181128093221eusmtrp105f84078ae7330febb29875fa62a76e3~rP_MHWPvd2602526025eusmtrp1x; Wed, 28 Nov 2018 09:32:21 +0000 (GMT) X-AuditID: cbfec7f5-367ff700000012c6-f5-5bfe60a67445 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id A6.B9.04284.5A06EFB5; Wed, 28 Nov 2018 09:32:21 +0000 (GMT) Received: from [106.109.129.180] (unknown [106.109.129.180]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20181128093221eusmtip19677ff3b5dea5a231b97c3f98dc69b07~rP_LxmhV11584815848eusmtip1g; Wed, 28 Nov 2018 09:32:21 +0000 (GMT) To: Zhirun Yan , dev@dpdk.org, qi.z.zhang@intel.com Cc: haiyue.wang@intel.com From: Ilya Maximets Message-ID: Date: Wed, 28 Nov 2018 12:32:13 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181128165152.78676-1-zhirun.yan@intel.com> Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOKsWRmVeSWpSXmKPExsWy7djPc7rLEv5FG0x+JWXx7tN2JouezoOM Flfaf7JbTN/Qz2Yx798WZgdWj18LlrJ6LN7zksmjb8sqxgDmKC6blNSczLLUIn27BK6MJ5e/ Mxes4a2Yu/UGYwNjK3cXIyeHhICJxPuPJ9m6GLk4hARWMEo8OdvBDuF8YZTYefkrE4TzmVFi 9tQtbDAtvV+mskIkljNK7N6yE6rqI6PEv4XbGEGqhAVsJdZMusQKYosIeEq8Xn2WuYuRg4NZ QFLi1aJAkDCbgI7EqdVHwMp5Bewk2v/vZwGxWQRUJZ5s/coOYosKREh03F/NBlEjK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FnFKJJaWpybnltsqFecmFtcmpeul5yfu4kRGE3b jv3cvIPx0sbgQ4wCHIxKPLwBqX+jhVgTy4orcw8xSnAwK4nwltr9ixbiTUmsrEotyo8vKs1J LT7EaAr03ERmKdHkfGCk55XEG5oamltYGpobmxubWSiJ8543qIwSEkhPLEnNTk0tSC2C6WPi 4JRqYBRrEe/ykOl7FRsmcuRaY+KauBNv1BwuLrKff6P+hmeNQND6OwF+LgfTyr917Si3fBXN b/WTZ9eiqN+9+asV2te8a2/fYrxsw/tZCufvhX5QT1/8Pmvp2e+6vpdVz4VZ14laRoRY8F+a tUnke+UUez3jMyc3Ki1dzP9k/uvSqrkd/AZxq1IepymxFGckGmoxFxUnAgCh7J62vAIAAA== X-CMS-MailID: 20181128093221eucas1p119d9c4741bb612ae7fc5700c64e8595a X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20181128093221eucas1p119d9c4741bb612ae7fc5700c64e8595a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181128093221eucas1p119d9c4741bb612ae7fc5700c64e8595a References: <20181128165152.78676-1-zhirun.yan@intel.com> Subject: Re: [dpdk-dev] [v1] net/i40e: fix RX/TX setup when restart port 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: , X-List-Received-Date: Wed, 28 Nov 2018 09:32:25 -0000 On 28.11.2018 19:51, Zhirun Yan wrote: > Before this patch, there are two functions that will clear RX/TX queues > number: rte_eth_dev_close() and i40e_dev_free_queues(). But if also > i40e_dev_free_queues() clear it, RX/TX queues will not set up correctly > when restart port. According to DPDK API device could not be restarted after rte_eth_dev_close: "Close a stopped Ethernet device. The device cannot be restarted!" http://doc.dpdk.org/api/rte__ethdev_8h.html#a93eeb672a2f9cd18e338aad10c77687c You should not close the device if you're willing to use it later. If you really want to close it, you'll need to detach it and attach back when needed. > > Fixes: 6b4537128394 ("i40e: free queue memory when closing") > > Signed-off-by: Zhirun Yan > Signed-off-by: Haiyue Wang > --- > drivers/net/i40e/i40e_rxtx.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c > index e1152ff0e..cc953ad58 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -2753,7 +2753,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev) > i40e_dev_rx_queue_release(dev->data->rx_queues[i]); > dev->data->rx_queues[i] = NULL; > } > - dev->data->nb_rx_queues = 0; > > for (i = 0; i < dev->data->nb_tx_queues; i++) { > if (!dev->data->tx_queues[i]) > @@ -2761,7 +2760,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev) > i40e_dev_tx_queue_release(dev->data->tx_queues[i]); > dev->data->tx_queues[i] = NULL; > } > - dev->data->nb_tx_queues = 0; > } > > #define I40E_FDIR_NUM_TX_DESC I40E_MIN_RING_DESC >