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 1D6FCA04C9; Tue, 15 Sep 2020 18:00:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C03C71C0CE; Tue, 15 Sep 2020 18:00:20 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id EDC9C1BE8E for ; Tue, 15 Sep 2020 18:00:18 +0200 (CEST) IronPort-SDR: fZPFcy0vNfDocgLNEt/xRAgapFk7mofrybL4E+Hm5qtvFhkvweEIAanvb7WrC0NGFeVqTEIemB csft5cY/4rTw== X-IronPort-AV: E=McAfee;i="6000,8403,9745"; a="223456137" X-IronPort-AV: E=Sophos;i="5.76,430,1592895600"; d="scan'208";a="223456137" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2020 07:52:52 -0700 IronPort-SDR: gWwxNQTBxxaPionUP2tKZbKMzlK5zajYD12xnF4zT/vo8kgocDG+FDkpYrhZXbBUdchMzI1wmu 55tJPjZlq3+g== X-IronPort-AV: E=Sophos;i="5.76,430,1592895600"; d="scan'208";a="482827471" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.215.1]) ([10.213.215.1]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2020 07:52:50 -0700 To: wangyunjian , dev@dpdk.org Cc: thomas@monjalon.net, jerry.lilijun@huawei.com, xudingke@huawei.com References: <9a94f272bc7c1e5650295ddf3e02fb19b15e7951.1598596042.git.wangyunjian@huawei.com> From: Ferruh Yigit Message-ID: Date: Tue, 15 Sep 2020 15:52:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <9a94f272bc7c1e5650295ddf3e02fb19b15e7951.1598596042.git.wangyunjian@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] net/tap: release port upon close 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" On 8/28/2020 1:37 PM, wangyunjian wrote: > From: Yunjian Wang > > Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private > resources for the port can be freed by rte_eth_dev_close(). > > Signed-off-by: Yunjian Wang <...> > @@ -1040,6 +1044,9 @@ tap_dev_close(struct rte_eth_dev *dev) > struct pmd_process_private *process_private = dev->process_private; > struct rx_queue *rxq; > > + if (process_private == NULL) > + return; Why this check is required?