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 924F0A0C4E; Sat, 21 Aug 2021 11:37:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1483040686; Sat, 21 Aug 2021 11:37:42 +0200 (CEST) Received: from mail-m971.mail.163.com (mail-m971.mail.163.com [123.126.97.1]) by mails.dpdk.org (Postfix) with ESMTP id 4BED44003E; Sat, 21 Aug 2021 11:37:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=Nh2uu SiIRMkp6NNMBZKE4W4Y6TF+Zc+p2QIYAaDJOyM=; b=Dzlf+tNTgrUDXOnayWn/l jPJJeum2PW83kKx0WIJ4e3tRnXhCd/BAY/kqRsK1dZMGfLVhFoydnFYWgd6pix3C u0EJAg5jS+A59KeVFctsbc+dK22uKCaL3A46fQY8xZ7Gq68rSEaCaSpc6h4jrfea mDpmgkTlQwhZguABAVADoo= Received: from localhost.localdomain (unknown [124.160.213.137]) by smtp1 (Coremail) with SMTP id GdxpCgD3X3teySBhqvUgOg--.9431S2; Sat, 21 Aug 2021 17:37:37 +0800 (CST) From: chenqiming_huawei@163.com To: dev@dpdk.org Cc: beilei.xing@intel.com, Qiming Chen , stable@dpdk.org Date: Sat, 21 Aug 2021 17:36:54 +0800 Message-Id: <20210821093654.6279-1-chenqiming_huawei@163.com> X-Mailer: git-send-email 2.30.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: GdxpCgD3X3teySBhqvUgOg--.9431S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7Aw47ZryrXw4xKr1fWw45Jrb_yoW8WF4DpF WDGrWUJr1jqF1kG39rZF4I9FyrC398t345uF95C3s09r4Yya48tayUCFyUK3WDCrW8Ja12 qFs2qrnrZ398WrJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jIGQDUUUUU= X-Originating-IP: [124.160.213.137] X-CM-SenderInfo: xfkh01xlpl0w5bkxt4lhl6il2tof0z/xtbBzwH1oFaD-9pGngAAsz Subject: [dpdk-dev] [PATCH] net/i40e: fix dev startup resource release problem 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" From: Qiming Chen In the eth_i40e_dev_init function, the tunnel and ehtertype hash table resource release interface should be rte_hash_free instead of rte_free, and the previously registered interrupt handling function also needs to be removed from the interrupt list. The patch is amended to use the correct interface to release the hash table resource and release the interrupt handling function at the same time. Fixes: 425c3325f0b0 ("net/i40e: store tunnel filter") 5c53c82c8174 ("net/i40e: store flow director filter") Cc: stable@dpdk.org Signed-off-by: Qiming Chen --- drivers/net/i40e/i40e_ethdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 7b230e2ed1..7a2a8281d2 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1760,12 +1760,14 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) return 0; err_init_fdir_filter_list: - rte_free(pf->tunnel.hash_table); + rte_hash_free(pf->tunnel.hash_table); rte_free(pf->tunnel.hash_map); err_init_tunnel_filter_list: - rte_free(pf->ethertype.hash_table); + rte_hash_free(pf->ethertype.hash_table); rte_free(pf->ethertype.hash_map); err_init_ethtype_filter_list: + rte_intr_callback_unregister(intr_handle, + i40e_dev_interrupt_handler, dev); rte_free(dev->data->mac_addrs); dev->data->mac_addrs = NULL; err_mac_alloc: -- 2.30.1.windows.1