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 5214BA00C3; Wed, 26 Jan 2022 04:33:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 19FD24118A; Wed, 26 Jan 2022 04:33:07 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 241074069D; Wed, 26 Jan 2022 04:33:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643167985; x=1674703985; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=EfqYbEotu3gt3SOcSMN6UpO+R/bhiWxgthqWAFguqy0=; b=ms/4kKPk8iixUxWPbP/ff12dn0wC1CuEMpgk6fLgaEhS6G+JGWYoCCqW t1TbMlw5m9aL5MQxEsaIMpunsf5OxJQWDCrslq/N0Mp4TvUMkIES9PVgL IIwDW62bW0ngDLuf639F3BF6wtP/P9C3KEHb/p/iOrVnOnnygApZYc6zT hBoCf8Fsy6+XMrl4X/2d082bgOHFe1Yrh4dRX/1ttuVJjI+lyiw8WCTjU bKZw8EOwUX6mldtt2s/E4kCYkftWqc12VPwl6qUCpG6QhAAEA2bDgMcTd BFsfrdbXQxGtvE0UnHCYKPgCFFu+o9nXIqUl566MUNRG6D4JMefy3PzDc g==; X-IronPort-AV: E=McAfee;i="6200,9189,10238"; a="233847352" X-IronPort-AV: E=Sophos;i="5.88,316,1635231600"; d="scan'208";a="233847352" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 19:33:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,316,1635231600"; d="scan'208";a="767006756" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.238.175.107]) by fmsmga006.fm.intel.com with ESMTP; 25 Jan 2022 19:33:01 -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] raw/ifpga: fix ifpga devices cleanup function Date: Tue, 25 Jan 2022 22:29:53 -0500 Message-Id: <20220126032953.24695-1-wei.huang@intel.com> X-Mailer: git-send-email 2.26.2 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 fdf3c23..88c38aa 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