From: Marcel Apfelbaum Date: Tue, 3 Nov 2015 11:28:41 +0000 (+0200) Subject: vhost: fix build with old kernels X-Git-Tag: spdx-start~8170 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=45c55d39c5ebb8f8e1e70401dd0492f6c935455b;p=dpdk.git vhost: fix build with old kernels Commit 15e9ee6982a4822ce395fd597dd500a61ceafa7c uses the VIRTIO_F_VERSION_1 macro existing only in newer kernels. Fixed it by manually defining it for older kernels. Fixes: 15e9ee6982a4 ("vhost: enable virtio 1.0") Reported-by: Qian Xu Signed-off-by: Marcel Apfelbaum --- diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h index b6386f91c3..568745227d 100644 --- a/lib/librte_vhost/rte_virtio_net.h +++ b/lib/librte_vhost/rte_virtio_net.h @@ -108,6 +108,13 @@ struct vhost_virtqueue { #define VHOST_SUPPORTS_MQ 0 #endif +/* + * Define virtio 1.0 for older kernels + */ +#ifndef VIRTIO_F_VERSION_1 + #define VIRTIO_F_VERSION_1 32 +#endif + /** * Device structure contains all configuration information relating to the device. */