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 9D6D3A04C0; Mon, 28 Sep 2020 01:49:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E93121D67C; Mon, 28 Sep 2020 01:44:14 +0200 (CEST) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by dpdk.org (Postfix) with ESMTP id C86F91D5FD for ; Mon, 28 Sep 2020 01:44:05 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id 7B22658012A; Sun, 27 Sep 2020 19:44:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sun, 27 Sep 2020 19:44:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=7sZYRsSLmG5Nd mWmza6ySpt7MbzmkAreiX991tShuhw=; b=G87ueSNXICobPQ9eiSEcoyxI8mt1i Z5ezOvBgE10pNugSVo0TBtrm1IviRLIS6KoyUKwgJtAGB6ck3ohkJ4eZlKuylrUL p5wVfJeYFKsGe7hRtdVuiDa3rfp1BzDR4WUHvfgzbeKvSM/FbhsKt85O0mYVtRKQ pZ24nz51t/Fzix0PSyhqrjPB5q5jqpD69CZyrFbC1PtNvXpaxWGUaWLgqMXc/hVp Fks33qZscvoeZ+ic3ElRa8SxNtglccFw1sYbPgvJ7Vd04ow9ximks4lBjx/UkJYK noYP6Yarfm+4X4m4iEjrWHzPbepD8bIThr/5BAJjWNe3OfXullnUGGJbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=7sZYRsSLmG5NdmWmza6ySpt7MbzmkAreiX991tShuhw=; b=eXBibqsg qO2q/lcEGlqHAojkZYb/G48IXmdXbtYfrXLrpNSmJohHuXgKHFVOfrvOoagv5u5l 6j3s/2+HNOwYmhA5UQ56LWT785SJEGc1sjawShyPZUaKqmGVkwCttcUFhN7CLoRe Xg7uQ4YAR5H735MqUA5lDTCY9jv9bA/PvAbQDqk7rP8bPviPKbX1VWsMTp9ZpT+v 5gb4zobE2nQzhQH250G4A1tVNEX93OLEGmOhP780/aiZ26iDzAf3qEbhUjiwiPCv orTq+BvFVjcbxkv3PhFmJC+egX9aSrleA0mZJIZs9yO1B2DiDtjC8M3fWhYMubYS MLtV6u11OqeBoQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdehgddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedvhefgiedvjeegtdevheefhfetleefgfeivefgffevfeejgedtgfeu tdehtdegveenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgepvddunecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id EC4C6328005D; Sun, 27 Sep 2020 19:44:03 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: ferruh.yigit@intel.com, arybchenko@solarflare.com, Shepard Siegel , Ed Czeck , John Miller , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , Qiming Yang , Qi Zhang , Martin Spinler Date: Mon, 28 Sep 2020 01:42:44 +0200 Message-Id: <20200927234249.3198780-21-thomas@monjalon.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200927234249.3198780-1-thomas@monjalon.net> References: <20200913220711.3768597-1-thomas@monjalon.net> <20200927234249.3198780-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 20/25] drivers/net: remove redundant MAC addresses freeing 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" The MAC addresses array is already freed by rte_eth_dev_release_port(). The redundant freeing can be removed from the PMD port closing functions. Signed-off-by: Thomas Monjalon Reviewed-by: Ferruh Yigit --- drivers/net/ark/ark_ethdev.c | 3 --- drivers/net/hinic/hinic_pmd_ethdev.c | 3 --- drivers/net/ice/ice_ethdev.c | 3 --- drivers/net/nfb/nfb_ethdev.c | 3 --- drivers/net/szedata2/rte_eth_szedata2.c | 3 --- 5 files changed, 15 deletions(-) diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index 3e96445fdb..e3b1347769 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -705,9 +705,6 @@ eth_ark_dev_close(struct rte_eth_dev *dev) dev->data->rx_queues[i] = 0; } - rte_free(dev->data->mac_addrs); - dev->data->mac_addrs = 0; - return 0; } diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c index 1b175aeace..c5b06fae73 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.c +++ b/drivers/net/hinic/hinic_pmd_ethdev.c @@ -3228,9 +3228,6 @@ static int hinic_dev_uninit(struct rte_eth_dev *dev) rte_free(nic_dev->mc_list); - rte_free(dev->data->mac_addrs); - dev->data->mac_addrs = NULL; - return HINIC_OK; } diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 96159c92f2..73af19ce81 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2467,9 +2467,6 @@ ice_dev_close(struct rte_eth_dev *dev) dev->rx_pkt_burst = NULL; dev->tx_pkt_burst = NULL; - rte_free(dev->data->mac_addrs); - dev->data->mac_addrs = NULL; - /* disable uio intr before callback unregister */ rte_intr_disable(intr_handle); diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c index 7ee7294143..a9a8bc878d 100644 --- a/drivers/net/nfb/nfb_ethdev.c +++ b/drivers/net/nfb/nfb_ethdev.c @@ -236,9 +236,6 @@ nfb_eth_dev_close(struct rte_eth_dev *dev) } dev->data->nb_tx_queues = 0; - rte_free(dev->data->mac_addrs); - dev->data->mac_addrs = NULL; - return 0; } diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c index 7e9fafdcf7..0eecec1e8c 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -1181,9 +1181,6 @@ eth_dev_close(struct rte_eth_dev *dev) } dev->data->nb_tx_queues = 0; - rte_free(dev->data->mac_addrs); - dev->data->mac_addrs = NULL; - return 0; } -- 2.28.0