eal: cleanup multiprocess hotplug resources

When rte_eal_cleanup is called, hotplug should unregister the
resources associated with the multi-process server.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Stephen Hemminger 2021-11-13 09:22:56 -08:00 committed by Thomas Monjalon
parent 6412941ae8
commit e8dc971b63
3 changed files with 12 additions and 0 deletions

View File

@ -462,3 +462,8 @@ int eal_mp_dev_hotplug_init(void)
return 0;
}
void eal_mp_dev_hotplug_cleanup(void)
{
rte_mp_action_unregister(EAL_DEV_MP_ACTION_REQUEST);
}

View File

@ -37,6 +37,12 @@ struct eal_dev_mp_req {
int
eal_mp_dev_hotplug_init(void);
/**
* Unregister all mp action callbacks for hotplug.
*/
void
eal_mp_dev_hotplug_cleanup(void);
/**
* This is a synchronous wrapper for secondary process send
* request to primary process, this is invoked when an attach

View File

@ -1284,6 +1284,7 @@ rte_eal_cleanup(void)
rte_mp_channel_cleanup();
/* after this point, any DPDK pointers will become dangling */
rte_eal_memory_detach();
eal_mp_dev_hotplug_cleanup();
rte_eal_alarm_cleanup();
rte_trace_save();
eal_trace_fini();