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 F24BEA04BB; Thu, 24 Sep 2020 23:58:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 192DE1DEFB; Thu, 24 Sep 2020 23:58:18 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id B20C31DEFA for ; Thu, 24 Sep 2020 23:58:16 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 4B3095C0176; Thu, 24 Sep 2020 17:58:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 24 Sep 2020 17:58:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= 8Cb0DaGQXk5sNEIs4AXGZfDCWvqbpBfQ7kZKMRxoTxs=; b=B3VfaT8h1Yhi2bkx X25mc+N67DZFQPDxcoJ+moV8aJ3NiP3PuA2Mf+ei2X7nkQiNRSaJw9L03YoGyx3X 1Bni71pT50kI2Fm6c4062wApiH4Se5FfmD3FyCHahxPknungRZnZDF3iu5Grk6u0 /LttwzQwHaNFPSQI8zcrTC/Sv6kJJkpaZ1qPUeIY2+iGhhtPbVhgGMrMMe1bKQIA 9qlYy/pzdNFK6yjjvyj5re4XBP5Na2GVfw3mfMsSHvp0u7ybO8lxT8xTajLj7NzO nmkRv8sTQe7G2gy0sNiVOw+rc4G6LyZKPExx88ypRfWgt32WszrN6e10x69gh8np IDFAsQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=8Cb0DaGQXk5sNEIs4AXGZfDCWvqbpBfQ7kZKMRxoT xs=; b=vLIYpONE2bOIi0VpTjfvmxN1tkfJ1RV/ovhCrV0sMAAjs9PcfK73/o1y3 crpVBlxDGH5kKRa2FgUIrHRUVkGJTjHzMktTiWPm/VVEd8xPud3Jy6Hm8gp9e2sH kvl6G/roUfJWwaPDbdigOzW4vq/h8HpLjY8xmn2x9BK2fe2stAZLJig4Tic+0YZj MbgZlEZ8kkgCxr+x/gOxYNtQjKNXoEeSSjbju0EGHB6Mz2UprDHk/TblbpUF/oIK Jwf88Zw4Mg9iOPlTTJNzKVQDVSMqGfa9SP0ZnKVDSv4xuvOn9YcUbQwZKTjQSaN5 je2wUmBoGt6+PYahy7j6Tc3IRuZtQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudekgdduieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 344213064674; Thu, 24 Sep 2020 17:58:13 -0400 (EDT) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org, arybchenko@solarflare.com, Tetsuya Mukawa , Anatoly Burakov Date: Thu, 24 Sep 2020 23:58:12 +0200 Message-ID: <9908596.DBVW2PyNQy@thomas> In-Reply-To: <3167472.YmleaKYWZ9@thomas> References: <20200913220711.3768597-1-thomas@monjalon.net> <736c2ece-136d-19d0-e7bf-a23f5382a36f@intel.com> <3167472.YmleaKYWZ9@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 10/20] net/null: 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" 23/09/2020 22:47, Thomas Monjalon: > 23/09/2020 18:44, Ferruh Yigit: > > On 9/13/2020 11:07 PM, Thomas Monjalon wrote: > > > The flag RTE_ETH_DEV_CLOSE_REMOVE is set so all port resources > > > can be freed by rte_eth_dev_close(). > > > > > > Signed-off-by: Thomas Monjalon > > > --- > > > --- a/drivers/net/null/rte_eth_null.c > > > +++ b/drivers/net/null/rte_eth_null.c > > > +static int > > > +eth_dev_close(struct rte_eth_dev *dev) > > > +{ > > > + PMD_LOG(INFO, "Closing null ethdev on NUMA socket %u", > > > + rte_socket_id()); > > > + > > > + /* mac_addrs must not be freed alone because part of dev_private */ > > > + dev->data->mac_addrs = NULL; > > > + > > > + return 0; > > > +} > > > > should check 'RTE_PROC_PRIMARY' in 'eth_dev_close()'? > > Yes, looks to be a miss for this new function. Sorry no, this function is not freeing any shared data, so no restriction on secondary process.