mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 01:51:26 +00:00
dpdk: Use --in-memory by default.
If anonymous memory mapping is supported by the kernel, it's better to run OVS entirely in memory rather than creating shared data structures. OVS doesn't work in multi-process mode, so there is no need to litter a filesystem. Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1949849 Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Ian Stokes <ian.stokes@intel.com> Signed-off-by: Rosemarie O'Riorden <roriorde@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
parent
b5d2dbdbb5
commit
269b927fd7
1
NEWS
1
NEWS
@ -8,6 +8,7 @@ Post-v2.16.0
|
||||
by default. 'other_config:dpdk-socket-limit' can be set equal to
|
||||
the 'other_config:dpdk-socket-mem' to preserve the legacy memory
|
||||
limiting behavior.
|
||||
* EAL argument --in-memory is applied by default if supported.
|
||||
* Add hardware offload support for matching IPv4/IPv6 frag types
|
||||
(experimental).
|
||||
* Add support for DPDK 21.11.
|
||||
|
@ -472,6 +472,12 @@ AC_DEFUN([OVS_CHECK_DPDK], [
|
||||
], [[#include <rte_config.h>]])
|
||||
], [], [[#include <rte_config.h>]])
|
||||
|
||||
AC_CHECK_DECL([MAP_HUGE_SHIFT], [
|
||||
AC_DEFINE([DPDK_IN_MEMORY_SUPPORTED], [1], [If MAP_HUGE_SHIFT is
|
||||
defined, anonymous memory mapping is supported by the
|
||||
kernel, and --in-memory can be used.])
|
||||
], [], [[#include <sys/mman.h>]])
|
||||
|
||||
# DPDK uses dlopen to load plugins.
|
||||
OVS_FIND_DEPENDENCY([dlopen], [dl], [libdl])
|
||||
|
||||
|
@ -405,6 +405,13 @@ dpdk_init__(const struct smap *ovs_other_config)
|
||||
svec_add(&args, ovs_get_program_name());
|
||||
construct_dpdk_args(ovs_other_config, &args);
|
||||
|
||||
#ifdef DPDK_IN_MEMORY_SUPPORTED
|
||||
if (!args_contains(&args, "--in-memory") &&
|
||||
!args_contains(&args, "--legacy-mem")) {
|
||||
svec_add(&args, "--in-memory");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (args_contains(&args, "-c") || args_contains(&args, "-l")) {
|
||||
auto_determine = false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user