#include "eal_memcfg.h"
+void
+eal_mcfg_wait_complete(void)
+{
+ struct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;
+
+ /* wait until shared mem_config finish initialising */
+ while (mcfg->magic != RTE_MAGIC)
+ rte_pause();
+}
+
void
rte_mcfg_mem_read_lock(void)
{
uint8_t dma_maskbits; /**< Keeps the more restricted dma mask. */
};
-static inline void
-rte_eal_mcfg_wait_complete(struct rte_mem_config *mcfg)
-{
- /* wait until shared mem_config finish initialising */
- while (mcfg->magic != RTE_MAGIC)
- rte_pause();
-}
+/* wait until primary process initialization is complete */
+void
+eal_mcfg_wait_complete(void);
#endif /* EAL_MEMCFG_H */
#include "eal_filesystem.h"
#include "eal_hugepages.h"
#include "eal_options.h"
+#include "eal_memcfg.h"
#define MEMSIZE_IF_NO_HUGE_PAGE (64ULL * 1024ULL * 1024ULL)
case RTE_PROC_SECONDARY:
if (rte_eal_config_attach() < 0)
return -1;
- rte_eal_mcfg_wait_complete(rte_config.mem_config);
+ eal_mcfg_wait_complete();
if (rte_eal_config_reattach() < 0)
return -1;
break;
case RTE_PROC_SECONDARY:
if (rte_eal_config_attach() < 0)
return -1;
- rte_eal_mcfg_wait_complete(rte_config.mem_config);
+ eal_mcfg_wait_complete();
if (rte_eal_config_reattach() < 0)
return -1;
eal_update_internal_config();