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 91BF6A0C41; Fri, 8 Oct 2021 08:29:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BA8B40DDA; Fri, 8 Oct 2021 08:29:26 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 194884067E for ; Fri, 8 Oct 2021 08:29:24 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 76AD05C019C; Fri, 8 Oct 2021 02:29:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 08 Oct 2021 02:29: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= 13tkR5xbkx/7+8izDgHeQSXLl7axIPQlD20/CIHJk0Y=; b=XDd3Sz9rt92zZIll TPxSeEnu++r0O1PCYpSS5gyryh35DxlLMNszXDu4twkBWcwT+wVEAZ0ozRFFeaoF mphS7yGp+lO2e0s9D8UrevIYz6VzUo606LiTGQeuRuDYIazyhBEfQqNmm5O8HHcY pvdYfS9arUr7oa9D47kwit1l/skl6bXUoWNspHvrhDGrZ80gh0vGD3hfA4ItPqvL 1twPGGlRN0QNltC/BX/E+WDWCsO1vWQ73TgbJmKph4pvx6KUiik5gFbYJm7CHQjR Nc/FwycmNdTPp5IxIHzD9Zi2xdZQjolBmpX0Q7GcjevncSB1lbusx99PFVgIy5Fy YEcGLA== 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=fm1; bh=13tkR5xbkx/7+8izDgHeQSXLl7axIPQlD20/CIHJk 0Y=; b=fJWik2Ldq7IJ7zNzX5EpoafzrGV3PQJgUehURPQLoZCyo5Yw63Fycc2jf oDMCJibLuNb2cwL61HV50qEy8c2HnCpj3+5ui6hCByKBgCfDqx3VFrRzHKjFMlIT Gw+HSRpKF0rBkuNUaaHH/+1JznqkscVt7IGkPv+W7w3O79M3o6JPhZ4S3dsMiTkD 0zp2mXxTlipZwplxWJ9aU/Wf2Qt+SeBgQEKJ19yAAmQNdM1lKhayUxoRlyV1NOdG EGw+8xe0wSdX3cc4MS6JxiQk3Gl2wjhjPULrsYIbzrMPWmpj+oba3Z+ccYxqrxM7 umXghw5x5YRujffwPTiIRBuZkb2GA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudelledguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Oct 2021 02:29:21 -0400 (EDT) From: Thomas Monjalon To: "lihuisong (C)" Cc: dev@dpdk.org, ferruh.yigit@intel.com, david.marchand@redhat.com Date: Fri, 08 Oct 2021 08:29:18 +0200 Message-ID: <1954053.uMmENRcsHf@thomas> In-Reply-To: <19202698-59ac-d920-2635-851e2e89694e@huawei.com> References: <20210907034108.58763-1-lihuisong@huawei.com> <2162308.5El5PrcoHi@thomas> <19202698-59ac-d920-2635-851e2e89694e@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device 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" 08/10/2021 08:26, lihuisong (C): > As you mentioned, if we do not want the user to free rte_pci_device and > we want rte_pci_device > to be freed in time. Can we add a code logic calculating the number of > ports under a PCI address > and calling rte_dev_remove() in rte_eth_dev_close() to free > rte_pci_device and delete it from rte_pci_bus? Yes that's the idea. But it cannot be done in ethdev lib, it should be the responsibility of the driver. Only the driver knows exactly what to free.