summaryrefslogtreecommitdiff
path: root/lib/librte_vhost
diff options
context:
space:
mode:
authorMaxime Coquelin <maxime.coquelin@redhat.com>2018-10-12 14:40:38 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-18 10:24:39 +0200
commit06e787bd945690af9c1f949ff49bb4fcd92d8c80 (patch)
treea60f02812228bf012811969729b522073f58195f /lib/librte_vhost
parent9bd3979306b597069b359b239beac09bfbe3cbce (diff)
downloaddpdk-06e787bd945690af9c1f949ff49bb4fcd92d8c80.zip
dpdk-06e787bd945690af9c1f949ff49bb4fcd92d8c80.tar.gz
dpdk-06e787bd945690af9c1f949ff49bb4fcd92d8c80.tar.xz
vhost: add config flag for postcopy
Postcopy live-migration features relies on userfaultfd, which was only introduced in kernel v4.3. This patch introduces a new define to allow building vhost library on kernels not supporting userfaultfd. With legacy build system, user has to explicitly set CONFIG_RTE_LIBRTE_VHOST_POSTCOPY to 'y'. With Meson build system, RTE_LIBRTE_VHOST_POSTCOPY gets automatically defined if userfaultfd kernel header is present. Suggested-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Ilya Maximets <i.maximets@samsung.com>
Diffstat (limited to 'lib/librte_vhost')
-rw-r--r--lib/librte_vhost/meson.build2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/librte_vhost/meson.build b/lib/librte_vhost/meson.build
index 9d25b4d..e33e6fc 100644
--- a/lib/librte_vhost/meson.build
+++ b/lib/librte_vhost/meson.build
@@ -7,6 +7,8 @@ endif
if has_libnuma == 1
dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true)
endif
+dpdk_conf.set('RTE_LIBRTE_VHOST_POSTCOPY',
+ cc.has_header('linux/userfaultfd.h'))
version = 4
allow_experimental_apis = true
cflags += '-fno-strict-aliasing'