/* add all IOVA-contiguous areas to the heap */
return rte_memseg_contig_walk(malloc_add_seg, NULL);
}
+
+void
+rte_eal_malloc_heap_cleanup(void)
+{
+ unregister_mp_requests();
+}
int
rte_eal_malloc_heap_init(void);
+void
+rte_eal_malloc_heap_cleanup(void);
+
#endif /* MALLOC_HEAP_H_ */
}
return 0;
}
+
+void
+unregister_mp_requests(void)
+{
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ rte_mp_action_unregister(MP_ACTION_REQUEST);
+ } else {
+ rte_mp_action_unregister(MP_ACTION_SYNC);
+ rte_mp_action_unregister(MP_ACTION_ROLLBACK);
+ rte_mp_action_unregister(MP_ACTION_RESPONSE);
+ }
+}
int
register_mp_requests(void);
+void
+unregister_mp_requests(void);
+
int
request_to_primary(struct malloc_mp_req *req);
/* after this point, any DPDK pointers will become dangling */
rte_eal_memory_detach();
eal_mp_dev_hotplug_cleanup();
+ rte_eal_malloc_heap_cleanup();
rte_eal_alarm_cleanup();
rte_trace_save();
eal_trace_fini();
return 0;
}
+void
+unregister_mp_requests(void)
+{
+ /* Non-stub function succeeds if multi-process is not supported. */
+ EAL_LOG_STUB();
+}
+
int
request_to_primary(struct malloc_mp_req *req)
{