DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [Qemu-devel] [PATCH] vhost: fix compilation issue caused by virtio 1.0 support
@ 2015-11-03 11:28 Marcel Apfelbaum
  2015-11-03 11:35 ` Marcel Apfelbaum
  2015-11-03 11:35 ` Thomas Monjalon
  0 siblings, 2 replies; 3+ messages in thread
From: Marcel Apfelbaum @ 2015-11-03 11:28 UTC (permalink / raw)
  To: dev; +Cc: marcel

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 <qian.q.xu@intel.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
---

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-03 11:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-03 11:28 [dpdk-dev] [Qemu-devel] [PATCH] vhost: fix compilation issue caused by virtio 1.0 support Marcel Apfelbaum
2015-11-03 11:35 ` Marcel Apfelbaum
2015-11-03 11:35 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).