From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 534DEA034F; Fri, 26 Feb 2021 17:46:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4CBD407FF; Fri, 26 Feb 2021 17:46:45 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id B86FE40692 for ; Fri, 26 Feb 2021 17:46:43 +0100 (CET) IronPort-SDR: DHanhqxlOYPvnJmUruAPKkmYEBNED1F14U92UdCPZWxKHr+BdoGKkbEt/Z7yVaRcKePsyEWnOQ bSz77frnfLjQ== X-IronPort-AV: E=McAfee;i="6000,8403,9907"; a="205465815" X-IronPort-AV: E=Sophos;i="5.81,209,1610438400"; d="scan'208";a="205465815" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2021 08:46:42 -0800 IronPort-SDR: RXr9nRjnolfl5qotn2ymz+rVCnWzBmfPUpHY9YKRQYj0RZHhXAgfGtZJJ2b09HH5YGF2YKpOP5 lx2nKLICrQew== X-IronPort-AV: E=Sophos;i="5.81,209,1610438400"; d="scan'208";a="404999989" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.252.17.170]) ([10.252.17.170]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2021 08:46:39 -0800 To: ZhangTengfei Cc: dev@dpdk.org References: From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Fri, 26 Feb 2021 16:46:31 +0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] driver/net/pcap fix: pcap fd leak X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 2/26/2021 4:20 PM, ZhangTengfei wrote: > pcap fd was opend when vdev probed, > but not closed when vdev removed. > This bug appears in dpdk-pdump > > Signed-off-by: ZhangTengfei > --- > drivers/net/pcap/rte_eth_pcap.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c > index 90f5d75ea..fb01ea924 100644 > --- a/drivers/net/pcap/rte_eth_pcap.c > +++ b/drivers/net/pcap/rte_eth_pcap.c > @@ -1597,6 +1597,7 @@ pmd_pcap_remove(struct rte_vdev_device *dev) > if (eth_dev == NULL) > return 0; /* port already released */ > > + eth_dev_stop(eth_dev); > eth_dev_close(eth_dev); > rte_eth_dev_release_port(eth_dev); > > Thanks for the fix, the cleanup seems missing in 'eth_dev_close()' too, what do you think moving 'eth_dev_stop(eth_dev);' inside the 'eth_dev_close()'? So both 'close' and 'remove' will be covered. Btw, you have same patch with both "ZhangTengfei " sign and "ZhangTengfei " sign (this one), can you please clarify which one do you prefer?