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>
This commit is contained in:
parent
9bd3979306
commit
06e787bd94
@ -14,6 +14,7 @@ CONFIG_RTE_LIBRTE_KNI=y
|
||||
CONFIG_RTE_LIBRTE_PMD_KNI=y
|
||||
CONFIG_RTE_LIBRTE_VHOST=y
|
||||
CONFIG_RTE_LIBRTE_VHOST_NUMA=y
|
||||
CONFIG_RTE_LIBRTE_VHOST_POSTCOPY=n
|
||||
CONFIG_RTE_LIBRTE_PMD_VHOST=y
|
||||
CONFIG_RTE_LIBRTE_IFC_PMD=y
|
||||
CONFIG_RTE_LIBRTE_PMD_AF_PACKET=y
|
||||
|
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user