From e6d3c09282d88e904e4255a0c81e0c19a92217c1 Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Fri, 12 Jul 2019 15:48:08 +0100 Subject: [PATCH] eal/freebsd: fix config creation The config create function did not store the mem config address in the shared memconfig structure, so the secondary processes couldn't map it at the required address. Fixes: b149a7064261 ("eal/freebsd: add config reattach in secondary process") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson --- lib/librte_eal/freebsd/eal/eal.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/eal/eal.c index 13ca1202cb..d53f0fe697 100644 --- a/lib/librte_eal/freebsd/eal/eal.c +++ b/lib/librte_eal/freebsd/eal/eal.c @@ -266,6 +266,11 @@ rte_eal_config_create(void) memcpy(rte_mem_cfg_addr, &early_mem_config, sizeof(early_mem_config)); rte_config.mem_config = rte_mem_cfg_addr; + /* store address of the config in the config itself so that secondary + * processes could later map the config into this exact location + */ + rte_config.mem_config->mem_cfg_addr = (uintptr_t) rte_mem_cfg_addr; + return 0; } -- 2.20.1