]> git.droids-corp.org - dpdk.git/commitdiff
drivers/net: remove redundant MAC addresses freeing
authorThomas Monjalon <thomas@monjalon.net>
Mon, 28 Sep 2020 23:14:32 +0000 (01:14 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 30 Sep 2020 17:19:14 +0000 (19:19 +0200)
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 <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
drivers/net/ark/ark_ethdev.c
drivers/net/hinic/hinic_pmd_ethdev.c
drivers/net/ice/ice_ethdev.c
drivers/net/nfb/nfb_ethdev.c
drivers/net/szedata2/rte_eth_szedata2.c

index 3e96445fdbb98e370c1a44c58f221876f6243618..e3b1347769b35f3cd431047d4c830cf77adc279e 100644 (file)
@@ -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;
 }
 
index 6061f61fd6ea0e5b07ef3f3922b8e218ddadb0c4..466c8362b9f45c6822fbbfb85da2d386d7ce9c7c 100644 (file)
@@ -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;
 }
 
index 5f7b58a787b7e5f0b7ce62e01abc8133ff427b0b..d8ce09d28f1222a8e6906e6ac8fad3c561a3af95 100644 (file)
@@ -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);
 
index 7ee7294143a295d3a790e73b1fff7e8e1e1fc6c8..a9a8bc878db2b0e24e27ef6f9c632da7958a753e 100644 (file)
@@ -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;
 }
 
index 7e9fafdcf7df294c1d710d8bbb06a2b2ed2ffc89..0eecec1e8cb3514d02d02408c6542dbeb2fc927a 100644 (file)
@@ -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;
 }