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 5965BA0C4E; Sat, 21 Aug 2021 11:45:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D01EA4067A; Sat, 21 Aug 2021 11:45:22 +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 1F30F4003E; Sat, 21 Aug 2021 11:45:20 +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=FYRfg S4wLbqhAsXkyg6cy12cU1cQgzMg+QAAOqYpixI=; b=UPAxR30sKzC115HRIqqD9 yXzxvPpy6f3hnPGcsD+VqysWUBavA7y1XDbZXAoLJ4hYBFTXL0FqQEWoiKybHffn miR8M99dByso5zFZ+1h9FTANmQPrNa3ZHzGjur4Qu46WQUv/cj5CD/KWxoZyJK+s VMR2OWCTfabxe72P663rXs= Received: from localhost.localdomain (unknown [124.160.213.137]) by smtp1 (Coremail) with SMTP id GdxpCgBnpposyyBh06QhOg--.9421S2; Sat, 21 Aug 2021 17:45:19 +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:44:35 +0800 Message-Id: <20210821094435.6336-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: GdxpCgBnpposyyBh06QhOg--.9421S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7Aw47ZryrXw4xKr1fGFy3urg_yoW8WFy7pF WDGrWUJr1jqF1kG39rZF4I9F95C398t345uF95C3s09r4Yya48tayUCFyUK3WqkrW8Ja12 qFs2qrnrZ398WrJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jIwZxUUUUU= X-Originating-IP: [124.160.213.137] X-CM-SenderInfo: xfkh01xlpl0w5bkxt4lhl6il2tof0z/xtbBZw-1oFet3rhr2QAAsT 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") Fixes: 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