DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
* [dpdk-dev] [PATCH] net/ice: net/ice: free the HW tables when close device
@ 2019-11-08  9:40 Qi Zhang
  2019-11-08 15:28 ` Ye Xiaolong
  0 siblings, 1 reply; 2+ messages in thread
From: Qi Zhang @ 2019-11-08  9:40 UTC (permalink / raw)
  To: xiaolong.ye; +Cc: dev, Qi Zhang

Free the HW tables during dev_close.
Otherwise there will be two issues:
1. Memory not be freed if the device is detached.
2. Driver can't be initialized correctly after device reset.

Fixes: a4c8c48fe3f4 ("net/ice: load OS default package")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 432f4af69..febcdfe2a 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2397,6 +2397,7 @@ ice_dev_close(struct rte_eth_dev *dev)
 	ice_res_pool_destroy(&pf->msix_pool);
 	ice_release_vsi(pf->main_vsi);
 	ice_sched_cleanup_all(hw);
+	ice_free_hw_tbls(hw);
 	rte_free(hw->port_info);
 	hw->port_info = NULL;
 	ice_shutdown_all_ctrlq(hw);
-- 
2.13.6


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ice: net/ice: free the HW tables when close device
  2019-11-08  9:40 [dpdk-dev] [PATCH] net/ice: net/ice: free the HW tables when close device Qi Zhang
@ 2019-11-08 15:28 ` Ye Xiaolong
  0 siblings, 0 replies; 2+ messages in thread
From: Ye Xiaolong @ 2019-11-08 15:28 UTC (permalink / raw)
  To: Qi Zhang; +Cc: dev

On 11/08, Qi Zhang wrote:
>Free the HW tables during dev_close.
>Otherwise there will be two issues:
>1. Memory not be freed if the device is detached.
>2. Driver can't be initialized correctly after device reset.
>
>Fixes: a4c8c48fe3f4 ("net/ice: load OS default package")
>
>Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>---
> drivers/net/ice/ice_ethdev.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
>index 432f4af69..febcdfe2a 100644
>--- a/drivers/net/ice/ice_ethdev.c
>+++ b/drivers/net/ice/ice_ethdev.c
>@@ -2397,6 +2397,7 @@ ice_dev_close(struct rte_eth_dev *dev)
> 	ice_res_pool_destroy(&pf->msix_pool);
> 	ice_release_vsi(pf->main_vsi);
> 	ice_sched_cleanup_all(hw);
>+	ice_free_hw_tbls(hw);
> 	rte_free(hw->port_info);
> 	hw->port_info = NULL;
> 	ice_shutdown_all_ctrlq(hw);
>-- 
>2.13.6
>

Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel. Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08  9:40 [dpdk-dev] [PATCH] net/ice: net/ice: free the HW tables when close device Qi Zhang
2019-11-08 15:28 ` Ye Xiaolong

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org
	public-inbox-index dpdk-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git