vhost: fix build with old kernels
authorZhihong Wang <zhihong.wang@intel.com>
Wed, 31 Jan 2018 14:20:57 +0000 (09:20 -0500)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 31 Jan 2018 11:11:13 +0000 (12:11 +0100)
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 <zhihong.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
lib/librte_vhost/vhost.h

index ba80584..646aad3 100644 (file)
@@ -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