[dpdk-dev] [PATCH v2] mem: fix cleanup when multi-process is disabled

David Marchand david.marchand at redhat.com
Fri Mar 26 17:15:27 CET 2021


On Wed, Mar 24, 2021 at 8:32 PM Dmitry Kozlyuk <dmitry.kozliuk at gmail.com> wrote:
>
> rte_eal_memory_detach() did not account for cases where multi-process
> mode is disabled: --in-memory and --no-shconf. This resulted
> in unmapping memory that had not been mapped, which caused errors:
>
>     EAL: Could not unmap memory: No error   (Windows)
>     EAL: Cannot munmap(0x1d47f40, 0x7000): Invalid argument  (Linux)
>
> Confusing "No error" was caused by using errno instead of rte_errno
> set by rte_mem_unmap().
>
> Skip detaching memory altogether when --in-memory is specified.
> Skip unmapping configuration when it's not shared.
> Fix and add error handling to produce proper log messages.
>
> Fixes: dfbc61a2f9a6 ("mem: detach memsegs on cleanup")
> Cc: Anatoly Burakov <anatoly.burakov at intel.com>
>
> Reported-by: Jie Zhou <jizh at microsoft.com>
> Suggested-by: David Marchand <david.marchand at redhat.com>
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
Acked-by: Ranjit Menon <ranjit.menon at intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>

Applied, thanks Dmitry.


-- 
David Marchand



More information about the dev mailing list