eal: add option to limit memory allocation on sockets
authorAnatoly Burakov <anatoly.burakov@intel.com>
Thu, 31 May 2018 17:35:33 +0000 (18:35 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 13 Jul 2018 09:44:15 +0000 (11:44 +0200)
commite4348122a42a15fd03d1221a1c34615d5b68add6
treea7fc77e0c867f528b867b6b40fc0ad5d8f063798
parent0b82bd7b24c95ddd77f8e0b93df8456e1a38d627
eal: add option to limit memory allocation on sockets

Previously, it was possible to limit maximum amount of memory
allowed for allocation by creating validator callbacks. Although a
powerful tool, it's a bit of a hassle and requires modifying the
application for it to work with DPDK example applications.

Fix this by adding a new parameter "--socket-limit", with syntax
similar to "--socket-mem", which would set per-socket memory
allocation limits, and set up a default validator callback to deny
all allocations above the limit.

This option is incompatible with legacy mode, as validator callbacks
are not supported there.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
doc/guides/linux_gsg/build_sample_apps.rst
doc/guides/prog_guide/env_abstraction_layer.rst
lib/librte_eal/common/eal_common_options.c
lib/librte_eal/common/eal_internal_cfg.h
lib/librte_eal/common/eal_options.h
lib/librte_eal/linuxapp/eal/eal.c
lib/librte_eal/linuxapp/eal/eal_memory.c