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 7858EA04C3; Fri, 25 Sep 2020 09:11:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E8C3C1E535; Fri, 25 Sep 2020 09:11:26 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by dpdk.org (Postfix) with ESMTP id 51EA41E4ED for ; Fri, 25 Sep 2020 09:11:25 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id D3B3E8FA; Fri, 25 Sep 2020 03:11:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 25 Sep 2020 03:11:23 -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= VGABef5k9TNGPbC0abxp09bvtqtOh2DggQpf0gjp3Wg=; b=up2YrH+BepMLSnyt pC2HHN+W7r5KJuTvHdxa4wcCd9MeAVh6IDx9v38VoWXNH/t/pWpR8wze2FXUYdA1 YwAe1bkkJv9kVTIXeWluXHKbdEt3vY41rphHRklB5xHUPcTRNugr/nC3TVXpB11o cKeCbZGnFdrNhNYlhZDNDxKIV3Tl0l25uew7qO1DuiW5lR651x9D9zqeB3pko/MH 126G1SJSrEyrArUnfIK6xRAmK2qZUHIcfRvM9PpsBzadawz04jOD0qWlZQAhLc89 qDyg1xAqfzxZ+eQylNoWRn34xx+7T5EPXJ1m37/AUnDXWntrzDMu11WN7BPnkaYo M2oNxw== 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=VGABef5k9TNGPbC0abxp09bvtqtOh2DggQpf0gjp3 Wg=; b=d8qMtZIJ6dn1+MsNn7oXxTB4GlM2nuXzhCO1UD/ibwOuvMTmZZhMZFTjg nf96qQMYu0rL6w1tOcGsqscn5du8p5wOH5ja5ZGWEDTkdrpt9jiXaGLIyDTG97VK hormPbD+5GqN2Af3tz3XOx9NfYquH4tSFMlFIPaH9KiHjZ0YDW2F6evPMhetAdaY WhSEZlkZsxwBE14NJmBYWKd9PDMv+8+L7jo0PS4sB40WGYWvukpE4KuisN6+e67X NPsfBR9+EmTnHLItmHItkHBTkFPjv/X19OvP2H8cOpKZ3Jzptdl/cg/IifZoAPAn IwGL9VZfCMTO7sKUdZUvO5QNwcaAQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudelgdduudduucetufdoteggodetrfdotf 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 42961328005A; Fri, 25 Sep 2020 03:11:21 -0400 (EDT) From: Thomas Monjalon To: Rasesh Mody Cc: ferruh.yigit@intel.com, dev@dpdk.org, irusskikh@marvell.com, dsinghrawat@marvell.com Date: Fri, 25 Sep 2020 09:11:19 +0200 Message-ID: <5510907.LnDuOoN5zq@thomas> In-Reply-To: <20200925041744.17688-1-rmody@marvell.com> References: <20200925041744.17688-1-rmody@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [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 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. About the title, I would suggest net/bnx2x: release port upon close