eal/freebsd: lock memory device to prevent conflicts
authorBruce Richardson <bruce.richardson@intel.com>
Mon, 13 Sep 2021 14:08:48 +0000 (15:08 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Sat, 2 Oct 2021 14:30:16 +0000 (16:30 +0200)
commit47a4f2650c71d9197231a95c5df8f89d0f65e882
tree469d478162ae7ad7a419effbd6de046252f269a3
parent8f532a34c4f2a0636913569596f97d68c0d0df7b
eal/freebsd: lock memory device to prevent conflicts

Only a single DPDK process on the system can be using the /dev/contigmem
mappings at a time, but this was never explicitly enforced, e.g. when
using --in-memory flag on two processes. To prevent possible conflict
issues, we lock the dev node when it's in use, preventing other DPDK
processes from starting up and causing problems for us.

Fixes: 764bf26873b9 ("add FreeBSD support")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/eal/freebsd/eal_hugepage_info.c