Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
New upstream version 18.11-rc3
[deb_dpdk.git]
/
drivers
/
net
/
ena
/
ena_ethdev.c
diff --git
a/drivers/net/ena/ena_ethdev.c
b/drivers/net/ena/ena_ethdev.c
index
abe1e7b
..
05a4fbe
100644
(file)
--- a/
drivers/net/ena/ena_ethdev.c
+++ b/
drivers/net/ena/ena_ethdev.c
@@
-529,11
+529,6
@@
static void ena_close(struct rte_eth_dev *dev)
ena_interrupt_handler_rte,
adapter);
ena_interrupt_handler_rte,
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().
/*
* 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);
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);
adapter->drv_stats = rte_zmalloc("adapter stats",
sizeof(*adapter->drv_stats),
RTE_CACHE_LINE_SIZE);