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 9324BA04BB; Sat, 26 Sep 2020 13:41:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BE0AE1D70A; Sat, 26 Sep 2020 13:40:59 +0200 (CEST) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by dpdk.org (Postfix) with ESMTP id 611621D709 for ; Sat, 26 Sep 2020 13:40:57 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 34F5B891; Sat, 26 Sep 2020 07:40:56 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sat, 26 Sep 2020 07:40:56 -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= VuXXQFHOuGXx5VjmY/9adLwDgsrCadQxkq+GzEXrEYk=; b=bzZtxTFwQlCz+ryE ibD5mpGcRZHs898MtPg/hyGiaDyEBlEm2yHHvkxtbhtlDfH4f8+MivCQzrf9OJ3a oCsi7eukroPsIufo/hijtbIztXczZQ8WbPdMncQCqs+3aFPJyDjZR1EMmHqZ7psS FWql6GtVcYaJM61FfR4lU+mgImW9xT7zN1nECIwP7jJJKWxaKnhM06gk6CXn8xv5 /5uXx+8Vx5SZ9G23WvXkv9OmQw8e3BWJF0dTPnRvJalfmR3Nh6vg0OIhB8n+UxI7 T4VcfUmlZY6yjN63iP0JZCdW23TJCYd53yNFsUODWW4RkSm0T3ZmzmCEzrhPnrmi upNR1A== 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=VuXXQFHOuGXx5VjmY/9adLwDgsrCadQxkq+GzEXrE Yk=; b=U2vNjV4EsHeWaHFGWm27NOqmLgfDoSipxKNwtT+iO3I3q/wAwk8VOC8Or 4kX+8iQQUB+ucao9JeXKkS8xbLGCn3upMgDvGnermoHD/wS0pfjJnKYkh9LJ6W+V WwLsiYJPfQiHzgYtns6rpJzqtBY45HHokOc9UVZH/XywK9pjLzDNYmTD30dffN0W wJ4U5cc5ks9vhpT+d2U4pu+XMwQ9AzM79gfDyjCWuevxdjqKh2N3hw5fBDrBdFaV hOg6PNNSzcLgGfRPHneJ+saz48tRQ+3gLDBviONxEMNadj9WeNCPagnrlO/flYjo mrAfRyqn2IZQ8X11eL5OfUT9YI1HQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvgdegfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth 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 D17A0328005D; Sat, 26 Sep 2020 07:40:54 -0400 (EDT) From: Thomas Monjalon To: Rasesh Mody Cc: "ferruh.yigit@intel.com" , "dev@dpdk.org" , Igor Russkikh , Devendra Singh Rawat Date: Sat, 26 Sep 2020 13:40:53 +0200 Message-ID: <2608981.eo9qpkfZKq@thomas> In-Reply-To: References: <20200925041744.17688-1-rmody@marvell.com> <5510907.LnDuOoN5zq@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [EXT] Re: [PATCH] net/bnx2x: enhance old ethdev close behavior 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" 25/09/2020 21:24, Rasesh Mody: > Hi Thomas, > > >From: Thomas Monjalon > >Sent: Friday, September 25, 2020 12:11 AM > > > >25/09/2020 06:17, Rasesh Mody: > >> Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private resources > >> for the port can be freed by rte_eth_dev_close(). With this change the > >> private port resources are released in the .dev_close callback. > >> > >> Signed-off-by: Rasesh Mody > >> --- > >> static int eth_bnx2x_dev_uninit(struct rte_eth_dev *eth_dev) { > >> - /* mac_addrs must not be freed alone because part of dev_private */ > >> - eth_dev->data->mac_addrs = NULL; > >> + struct bnx2x_softc *sc = eth_dev->data->dev_private; > >> + > >> + PMD_INIT_FUNC_TRACE(sc); > >> + > >> + /* only uninitialize in the primary process */ > >> + if (rte_eal_process_type() != RTE_PROC_PRIMARY) > >> + return 0; > >> + > >> + bnx2x_dev_close(eth_dev); > > > >The check for primary process should be in the close function. > > > PMDs check for primary process as part of PCI probe, hence it was put in as part of PCI remove. I also observed other PMDs implementing a similar scheme. Yes I am reviewing other PMDs to fix the same. > If it needs to be part of close function, I can move it there. Yes please. > >About the title, I would suggest net/bnx2x: release port upon close > > > I'll change the title and resubmit. Thanks