All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel@redhat.com>
To: dev@dpdk.org
Cc: marcel@redhat.com
Subject: [Qemu-devel] [PATCH] vhost: fix compilation issue caused by virtio 1.0 support
Date: Tue,  3 Nov 2015 13:28:41 +0200	[thread overview]
Message-ID: <1446550121-27776-1-git-send-email-marcel@redhat.com> (raw)

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

             reply	other threads:[~2015-11-03 11:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03 11:28 Marcel Apfelbaum [this message]
2015-11-03 11:35 ` [Qemu-devel] [PATCH] vhost: fix compilation issue caused by virtio 1.0 support Marcel Apfelbaum
2015-11-03 11:35 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1446550121-27776-1-git-send-email-marcel@redhat.com \
    --to=marcel@redhat.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.