From: Thomas Monjalon Date: Mon, 28 Sep 2020 23:14:32 +0000 (+0200) Subject: drivers/net: remove redundant MAC addresses freeing X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f820adfcb0b6d644dbc22794e4972f9749643960;p=dpdk.git drivers/net: remove redundant MAC addresses freeing 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 Acked-by: Stephen Hemminger --- 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 6061f61fd6..466c8362b9 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.c +++ b/drivers/net/hinic/hinic_pmd_ethdev.c @@ -3257,9 +3257,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 5f7b58a787..d8ce09d28f 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2420,9 +2420,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; }