mem: add API to lock/unlock memory hotplug
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 5 Jul 2019 13:10:27 +0000 (14:10 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 5 Jul 2019 20:12:40 +0000 (22:12 +0200)
commit76f80881ef1e14cce2c11020ca913ea5d7186cba
tree058b700f9592d3f39bf3926597fca8dc3a40d2b7
parent703458e19c16135143b3f30089e1af66100c82dc
mem: add API to lock/unlock memory hotplug

Currently, the memory hotplug is locked automatically by all
memory-related _walk() functions, but sometimes locking the
memory subsystem outside of them is needed. There is no
public API to do that, so it creates a dependency on shared
memory config to be public. Fix this by introducing a new
API to lock/unlock the memory hotplug subsystem.

Create a new common file for all things mem config, and a
new API namespace rte_mcfg_*, and search-and-replace all
usages of the locks with the new API.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
14 files changed:
drivers/bus/fslmc/fslmc_vfio.c
drivers/net/mlx4/mlx4_mr.c
drivers/net/mlx5/mlx5_mr.c
drivers/net/virtio/virtio_user/virtio_user_dev.c
lib/librte_eal/common/eal_common_mcfg.c [new file with mode: 0644]
lib/librte_eal/common/eal_common_memory.c
lib/librte_eal/common/include/rte_eal_memconfig.h
lib/librte_eal/common/malloc_heap.c
lib/librte_eal/common/meson.build
lib/librte_eal/common/rte_malloc.c
lib/librte_eal/freebsd/eal/Makefile
lib/librte_eal/linux/eal/Makefile
lib/librte_eal/linux/eal/eal_vfio.c
lib/librte_eal/rte_eal_version.map