aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ena/ena_ethdev.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2018-11-14 11:13:57 +0000
committerLuca Boccassi <luca.boccassi@gmail.com>2018-11-14 11:14:10 +0000
commit4e7bab38ced48a52244d22a2fca70786ec57ef4b (patch)
tree99bf2737cd079ad11a4d248b0c719fda2aba2dfb /drivers/net/ena/ena_ethdev.c
parentea3fa5ca926a4a692702b340439631ffc79ca8e0 (diff)
parent8a853e3f0275efc8b05cb195085d45946942744a (diff)
Merge tag 'upstream/18.11-rc3' into 18.11.x
Upstream version 18.11-rc3 Change-Id: I60edf371bef2e72307adde288af0ba1e9de3a720 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/net/ena/ena_ethdev.c')
-rw-r--r--drivers/net/ena/ena_ethdev.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index abe1e7bd..05a4fbe0 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -530,11 +530,6 @@ static void ena_close(struct rte_eth_dev *dev)
adapter);
/*
- * Pass the information to the rte_eth_dev_close() that it should also
- * release the private port resources.
- */
- dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
- /*
* MAC is not allocated dynamically. Setting NULL should prevent from
* release of the resource in the rte_eth_dev_release_port().
*/
@@ -1666,6 +1661,12 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
ether_addr_copy((struct ether_addr *)get_feat_ctx.dev_attr.mac_addr,
(struct ether_addr *)adapter->mac_addr);
+ /*
+ * Pass the information to the rte_eth_dev_close() that it should also
+ * release the private port resources.
+ */
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
+
adapter->drv_stats = rte_zmalloc("adapter stats",
sizeof(*adapter->drv_stats),
RTE_CACHE_LINE_SIZE);