DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vhost: fix build error for old kernels
@ 2016-03-08  8:51 Yuanhan Liu
  2016-03-11 15:29 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Yuanhan Liu @ 2016-03-08  8:51 UTC (permalink / raw)
  To: dev

VIRTIO_NET_F_GUEST_ANNOUNCE is a new feature introduced since kernel
v3.5. For older kernels (or more precisely, old distributions), we
could simply define it manually, to fix the "macro not defined" error.

Fixes: d293dac8f30e ("vhost: claim support of guest announce")

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 lib/librte_vhost/rte_virtio_net.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h
index 7d1fde2..443245d 100644
--- a/lib/librte_vhost/rte_virtio_net.h
+++ b/lib/librte_vhost/rte_virtio_net.h
@@ -97,6 +97,11 @@ struct vhost_virtqueue {
 	struct buf_vector	buf_vec[BUF_VECTOR_MAX];	/**< for scatter RX. */
 } __rte_cache_aligned;
 
+/* Old kernels have no such macro defined */
+#ifndef VIRTIO_NET_F_GUEST_ANNOUNCE
+ #define VIRTIO_NET_F_GUEST_ANNOUNCE 21
+#endif
+
 
 /*
  * Make an extra wrapper for VIRTIO_NET_F_MQ and
-- 
1.9.0

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

* Re: [dpdk-dev] [PATCH] vhost: fix build error for old kernels
  2016-03-08  8:51 [dpdk-dev] [PATCH] vhost: fix build error for old kernels Yuanhan Liu
@ 2016-03-11 15:29 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2016-03-11 15:29 UTC (permalink / raw)
  To: Yuanhan Liu; +Cc: dev

2016-03-08 16:51, Yuanhan Liu:
> VIRTIO_NET_F_GUEST_ANNOUNCE is a new feature introduced since kernel
> v3.5. For older kernels (or more precisely, old distributions), we
> could simply define it manually, to fix the "macro not defined" error.
> 
> Fixes: d293dac8f30e ("vhost: claim support of guest announce")
> 
> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

Applied, thanks

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

end of thread, other threads:[~2016-03-11 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-08  8:51 [dpdk-dev] [PATCH] vhost: fix build error for old kernels Yuanhan Liu
2016-03-11 15:29 ` 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).