From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id D0B258E6E for ; Tue, 3 Nov 2015 12:28:46 +0100 (CET) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 1A5C419F384; Tue, 3 Nov 2015 11:28:46 +0000 (UTC) Received: from work.redhat.com (vpn1-6-51.ams2.redhat.com [10.36.6.51]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA3BShwB031567; Tue, 3 Nov 2015 06:28:44 -0500 From: Marcel Apfelbaum To: dev@dpdk.org Date: Tue, 3 Nov 2015 13:28:41 +0200 Message-Id: <1446550121-27776-1-git-send-email-marcel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Cc: marcel@redhat.com Subject: [dpdk-dev] [Qemu-devel] [PATCH] vhost: fix compilation issue caused by virtio 1.0 support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 11:28:47 -0000 Commit 15e9ee6982a4822ce395fd597dd500a61ceafa7c (vhost: enable virtio 1.0) uses the VIRTIO_F_VERSION_1 macro existing only in newer kernels. Fixed it by manually defining it for older kernels. Reported-by: Xu, Qian Q Signed-off-by: Marcel Apfelbaum --- Hi, I reproduced the issue with 3.9.5 kernel and solved using Xie, Huawei's idea. By the way, what is the earlier kernel that DPDK supports? I tried 3.19 with no luck. Please let me know if you prefer another way to do it. Thanks, Marcel lib/librte_vhost/rte_virtio_net.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h index b6386f9..5687452 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. */ -- 2.1.0