On 9/24/2020 10:58 PM, Thomas Monjalon wrote:
23/09/2020 22:47, Thomas Monjalon:
23/09/2020 18:44, Ferruh Yigit:
On 9/13/2020 11:07 PM, Thomas Monjalon wrote:
The flag RTE_ETH_DEV_CLOSE_REMOVE is set so all port resources
can be freed by rte_eth_dev_close().
Signed-off-by: Thomas Monjalon <tho...@monjalon.net>
---
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
+static int
+eth_dev_close(struct rte_eth_dev *dev)
+{
+ PMD_LOG(INFO, "Closing null ethdev on NUMA socket %u",
+ rte_socket_id());
+
+ /* mac_addrs must not be freed alone because part of dev_private */
+ dev->data->mac_addrs = NULL;
+
+ return 0;
+}
should check 'RTE_PROC_PRIMARY' in 'eth_dev_close()'?
Yes, looks to be a miss for this new function.
Sorry no, this function is not freeing any shared data,
so no restriction on secondary process.
"dev->data->mac_addrs = NULL", won't this change the shared data?