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 B6B64A04C0; Tue, 29 Sep 2020 01:22:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9A1031D93C; Tue, 29 Sep 2020 01:16:36 +0200 (CEST) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id C2F731D9F9 for ; Tue, 29 Sep 2020 01:15:53 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id 6445E580799; Mon, 28 Sep 2020 19:15:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Mon, 28 Sep 2020 19:15:53 -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=qRiUtOwI/0y+LHJ4gaKGJZ7X2Epga 7dnwhVvHGS020yeDYzqEmujTUOdyrmKnsSADorUCWRJgv9s0sjWc6IJ+uHqrdPu8 vEuDjtjUlqqZbXb6Ojp7G8Dp9Yu7MueE5uEfeUG4oDJ+PifvZ+YDVYIl+R8C9YRt MdHAuTVQSlOfEIdSY2JRLUPRyKW7SV9SBwBPfJs/FgOGnWGx4OU1YQlKcEa38RKF cubtv5D9NP3yFSJuP46LL5K8knB0SscMHihmLFx3qLdYzlOnm7YliXrW4NLz7tnd Br5WYwjaKIx0QswugZGuPcJDcvArqJ9WAmAuZopNGYG/LZ1cKvkDKQfGw== 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=nmXHLOW4 dAPmgWhSqBvko90S4xHHfmCN8IzmgWFISnVoW7+AusxxjpZFwhiJvzZQXAL00yNm F9IMHYIQExM1wPMNlSZ+q/JLw080btyYSNtI164Y88108aILDa+yBeZwqqwqGR6D YHAJMhvS4lw2QtAkz2IzwnHtbjQolJ9Ukvm6nbayz1KOqzv6RJJGIEf3WOVgIiof nYB051GKEZI2ameWQwoVBIwFICRbCNQ5Ncj1ID55f+G/TAkWmHBBJ7q8Jh6v9NLa FlMPTd2YXm95uojT0opSgwsm9BJHAHL+LG0fXV8rkOHSznbCWD8+DZACrBKj/pY4 bWG8BHeJ+jV6YA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdejgddulecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedvhefgiedvjeegtdevheefhfetleefgfeivefgffevfeejgedtgfeu tdehtdegveenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgepvdehnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl 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 C21703064674; Mon, 28 Sep 2020 19:15:51 -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: Tue, 29 Sep 2020 01:14:32 +0200 Message-Id: <20200928231437.414489-25-thomas@monjalon.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200928231437.414489-1-thomas@monjalon.net> References: <20200913220711.3768597-1-thomas@monjalon.net> <20200928231437.414489-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 24/29] 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