aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vhost
diff options
context:
space:
mode:
authorAsias He <asias@redhat.com>2013-05-06 04:38:20 -0400
committerMichael S. Tsirkin <mst@redhat.com>2013-05-06 06:21:00 -0400
commit8570a6e72c5bfb1aee8225b8c4814cdc28417a20 (patch)
tree2bb6af290c85226eda2a56a17b44c3192f3fd51c /drivers/vhost
parentb1ad8496c9f47d8b545ed4e948ab4271627c8bcf (diff)
vhost: Move VHOST_NET_FEATURES to net.c
vhost.h should not depend on device specific marcos like VHOST_NET_F_VIRTIO_NET_HDR and VIRTIO_NET_F_MRG_RXBUF. Signed-off-by: Asias He <asias@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/net.c6
-rw-r--r--drivers/vhost/vhost.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 354665a3ecd8..06b2447bce71 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -59,6 +59,12 @@ MODULE_PARM_DESC(experimental_zcopytx, "Enable Zero Copy TX;"
59#define VHOST_DMA_IS_DONE(len) ((len) >= VHOST_DMA_DONE_LEN) 59#define VHOST_DMA_IS_DONE(len) ((len) >= VHOST_DMA_DONE_LEN)
60 60
61enum { 61enum {
62 VHOST_NET_FEATURES = VHOST_FEATURES |
63 (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) |
64 (1ULL << VIRTIO_NET_F_MRG_RXBUF),
65};
66
67enum {
62 VHOST_NET_VQ_RX = 0, 68 VHOST_NET_VQ_RX = 0,
63 VHOST_NET_VQ_TX = 1, 69 VHOST_NET_VQ_TX = 1,
64 VHOST_NET_VQ_MAX = 2, 70 VHOST_NET_VQ_MAX = 2,
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index cc23bc456d15..08ebf58dfcf4 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -178,9 +178,6 @@ enum {
178 (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | 178 (1ULL << VIRTIO_RING_F_INDIRECT_DESC) |
179 (1ULL << VIRTIO_RING_F_EVENT_IDX) | 179 (1ULL << VIRTIO_RING_F_EVENT_IDX) |
180 (1ULL << VHOST_F_LOG_ALL), 180 (1ULL << VHOST_F_LOG_ALL),
181 VHOST_NET_FEATURES = VHOST_FEATURES |
182 (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) |
183 (1ULL << VIRTIO_NET_F_MRG_RXBUF),
184}; 181};
185 182
186static inline int vhost_has_feature(struct vhost_dev *dev, int bit) 183static inline int vhost_has_feature(struct vhost_dev *dev, int bit)