From: chenqiming_huawei@163.com
To: dev@dpdk.org
Cc: beilei.xing@intel.com, Qiming Chen <chenqiming_huawei@163.com>,
stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/i40e: fix dev startup resource release problem
Date: Sat, 21 Aug 2021 17:44:35 +0800 [thread overview]
Message-ID: <20210821094435.6336-1-chenqiming_huawei@163.com> (raw)
From: Qiming Chen <chenqiming_huawei@163.com>
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 <chenqiming_huawei@163.com>
---
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
next reply other threads:[~2021-08-21 9:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-21 9:44 chenqiming_huawei [this message]
2021-09-13 2:44 ` Zhang, Qi Z
-- strict thread matches above, loose matches on Subject: below --
2021-08-21 9:36 chenqiming_huawei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210821094435.6336-1-chenqiming_huawei@163.com \
--to=chenqiming_huawei@163.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).