Spdk/lib/env_dpdk
Ben Walker d635d6d297 env: Add spdk_mem_reserve
The spdk_mem_reserve() function reserves a memory region in SPDK's
memory maps. This pre-allocates all of the required data structures
to hold memory address translations for that region without actually
populating the region.

After a region is reserved, calls to spdk_mem_register() for
addresses in that range will not require any internal memory
allocations. This is useful when overlaying a custom memory allocator
on top of SPDK's hugepage memory, such as tcmalloc.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2511 (master)

This backport requires increasing SO_MINOR version, since it adds
new API. Version 2.1 does not conflict with any other, since on master
the API was increased from 2 to 3 SO_VER see:
(229ef16b) lib/env_dpdk: add map file and rev so major version.

(cherry picked from commit cf450c0d7c)
Change-Id: Ia4e8a770e8b5c956814aa90e9119013356dfab46
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2600
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-29 08:26:42 +00:00
..
env_internal.h env_dpdk: tell spdk_mem_map_init whether legacy_mem was specified 2019-12-11 11:05:10 +00:00
env.c env: add a new function for printing memory layout 2019-12-13 11:05:57 +00:00
env.mk env_dpdk: add functions to define dpdk_env make variables 2019-10-01 14:01:58 +00:00
init.c env_dpdk: fix DPDK 18.05 legacy-mem check 2019-12-30 11:44:54 +00:00
Makefile env: Add spdk_mem_reserve 2020-05-29 08:26:42 +00:00
memory.c env: Add spdk_mem_reserve 2020-05-29 08:26:42 +00:00
pci_ioat.c ioat: add device IDs for new CB-DMA engines 2019-02-26 06:50:52 +00:00
pci_nvme.c pci: remove nvme-specific attach functions 2018-12-07 17:24:19 +00:00
pci_virtio.c pci: remove virtio-specific attach functions 2018-12-07 17:24:19 +00:00
pci_vmd.c lib/env_dpdk: Added VMD PCI driver object 2019-05-29 20:35:11 +00:00
pci.c env_dpdk: dont treat NULL as error in spdk_map_bar_rte() 2020-03-19 08:09:53 +00:00
threads.c env: drop DPDK 16.07 support 2018-11-30 19:59:34 +00:00