On Wed, Mar 24, 2021 at 8:32 PM Dmitry Kozlyuk <dmitry.kozl...@gmail.com> wrote:
> @@ -1050,7 +1055,10 @@ rte_eal_memory_detach(void)
>          * config - we can't zero it out because it might still be referenced
>          * by other processes.
>          */
> -       rte_mem_unmap(mcfg, RTE_ALIGN(sizeof(*mcfg), page_sz));
> +       if (internal_conf->no_shconf == 0)
> +               if (rte_mem_unmap(mcfg, RTE_ALIGN(sizeof(*mcfg), page_sz)) != 
> 0)
> +                       RTE_LOG(ERR, EAL, "Could not unmap shared memory 
> config: %s\n",
> +                                       rte_strerror(rte_errno));
>         rte_eal_get_configuration()->mem_config = NULL;
>
>         return 0;

We have another issue if eal init fails early, then the application
exits calling rte_exit() -> rte_eal_cleanup() ->
rte_eal_memory_detach()
The issue itself is not related to this current change but rather to
dfbc61a2f9a6 ("mem: detach memsegs on cleanup"), but it became visible
with the above log.


Example:
$ ./build/app/dpdk-testpmd --plop
...
EAL: FATAL: Invalid 'command line' arguments.
EAL: Invalid 'command line' arguments.
EAL: Error - exiting with code: 1
  Cause: Cannot init EAL: Invalid argument
EAL: Could not unmap shared memory config: Invalid argument


-- 
David Marchand

Reply via email to