From 704098fc478c0dbdd6144e64c8de2ff19d010dda Mon Sep 17 00:00:00 2001 From: Zhihong Wang Date: Wed, 31 Jan 2018 09:20:57 -0500 Subject: [PATCH] vhost: fix build with old kernels This patch fixes compile failure with old kernels which have no VIRTIO_F_ANY_LAYOUT defined. Fixes: 5a8bb6e9020f ("vhost: claim to support any layout feature") Signed-off-by: Zhihong Wang Reviewed-by: Maxime Coquelin Tested-by: Jerin Jacob --- lib/librte_vhost/vhost.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index ba805843ba..646aad30d9 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h @@ -130,6 +130,10 @@ struct vhost_virtqueue { #define VIRTIO_NET_F_MTU 3 #endif +#ifndef VIRTIO_F_ANY_LAYOUT + #define VIRTIO_F_ANY_LAYOUT 27 +#endif + /* Declare IOMMU related bits for older kernels */ #ifndef VIRTIO_F_IOMMU_PLATFORM -- 2.20.1