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 E0928A00C3; Tue, 18 Jan 2022 04:21:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 05D9B42700; Tue, 18 Jan 2022 04:21:00 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 1594A426FA; Tue, 18 Jan 2022 04:20:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642476059; x=1674012059; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YpNoAGCqp2E2EkukPhwK/AHG/x9wLGpJw5/oXGqnwKc=; b=iXtIMb6cLGz7Ba4qxCLhz2a+kwdmajZK5EgaFYDLIu6sL57LpU9/5hJS FPsCt+KaJM1eEh1pvgVVjrFdjYeCcnXEm0xkpIV6iYhA4WSndPMm38VEe LIoipGhZ3uUVXcBPUQoFc3BTDNg4NYLxZZImDNqX/EIct+O20fWbop1QQ zEin4rlMa9uA1KgMKC5fhKKL+9u264RsPk5KAaJ0+5HflQNWGY4ohNppm 5aSbr9w5qEbBwzPrQd/Gk95J6FKjvX3IfwQg0F8cTrQceez3pQJ92aMzM uN82jTul0xWpeisIAkaqQh7E56aH5aBXxMmcDVSbyMTgXkXSgHtwzvw0V w==; X-IronPort-AV: E=McAfee;i="6200,9189,10230"; a="331079648" X-IronPort-AV: E=Sophos;i="5.88,296,1635231600"; d="scan'208";a="331079648" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2022 19:20:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,296,1635231600"; d="scan'208";a="625372019" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.238.175.107]) by orsmga004.jf.intel.com with ESMTP; 17 Jan 2022 19:20:55 -0800 From: Wei Huang To: dev@dpdk.org, rosen.xu@intel.com, qi.z.zhang@intel.com Cc: stable@dpdk.org, tianfei.zhang@intel.com, ferruh.yigit@intel.com, Wei Huang Subject: [PATCH v1 3/4] raw/ifpga: fix ifpga devices cleanup function Date: Mon, 17 Jan 2022 22:17:37 -0500 Message-Id: <20220118031738.2059-4-wei.huang@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220118031738.2059-1-wei.huang@intel.com> References: <20220118031738.2059-1-wei.huang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Use rte_dev_remove() to replace rte_rawdev_pmd_release() in ifpga_rawdev_cleanup(), resources occupied by ifpga raw devices such as threads can be released correctly. Fixes: f724a802 ("raw/ifpga: add miscellaneous APIs") Signed-off-by: Wei Huang --- drivers/raw/ifpga/ifpga_rawdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c index 9663b67..8d47fd5 100644 --- a/drivers/raw/ifpga/ifpga_rawdev.c +++ b/drivers/raw/ifpga/ifpga_rawdev.c @@ -1787,12 +1787,14 @@ int ifpga_rawdev_partial_reconfigure(struct rte_rawdev *dev, int port, void ifpga_rawdev_cleanup(void) { struct ifpga_rawdev *dev; + struct rte_rawdev *rdev; unsigned int i; for (i = 0; i < IFPGA_RAWDEV_NUM; i++) { dev = &ifpga_rawdevices[i]; if (dev->rawdev) { - rte_rawdev_pmd_release(dev->rawdev); + rdev = dev->rawdev; + rte_dev_remove(rdev->device); dev->rawdev = NULL; } } -- 1.8.3.1