From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 36FF3A04B4; Fri, 8 Nov 2019 16:33:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7238B1C23F; Fri, 8 Nov 2019 16:33:08 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 4ADFA1C23C for ; Fri, 8 Nov 2019 16:33:07 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Nov 2019 07:33:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,281,1569308400"; d="scan'208";a="354122407" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by orsmga004.jf.intel.com with ESMTP; 08 Nov 2019 07:33:05 -0800 Date: Fri, 8 Nov 2019 23:28:57 +0800 From: Ye Xiaolong To: Qi Zhang Cc: dev@dpdk.org Message-ID: <20191108152857.GB93101@intel.com> References: <20191108094039.47840-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191108094039.47840-1-qi.z.zhang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH] net/ice: net/ice: free the HW tables when close device X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" 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 >--- > 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 Applied to dpdk-next-net-intel. Thanks.