summaryrefslogtreecommitdiffstats
path: root/drivers/vhost/net.c
diff options
context:
space:
mode:
authorAsias He <asias@redhat.com>2013-05-06 10:38:20 +0200
committerMichael S. Tsirkin <mst@redhat.com>2013-05-06 12:21:00 +0200
commit8570a6e72c5bfb1aee8225b8c4814cdc28417a20 (patch)
tree2bb6af290c85226eda2a56a17b44c3192f3fd51c /drivers/vhost/net.c
parentvhost-net: Free ubuf when vhost_dev_set_owner fails (diff)
downloadlinux-8570a6e72c5bfb1aee8225b8c4814cdc28417a20.tar.xz
linux-8570a6e72c5bfb1aee8225b8c4814cdc28417a20.zip
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/net.c')
-rw-r--r--drivers/vhost/net.c6
1 files changed, 6 insertions, 0 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;"
#define VHOST_DMA_IS_DONE(len) ((len) >= VHOST_DMA_DONE_LEN)
enum {
+ VHOST_NET_FEATURES = VHOST_FEATURES |
+ (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) |
+ (1ULL << VIRTIO_NET_F_MRG_RXBUF),
+};
+
+enum {
VHOST_NET_VQ_RX = 0,
VHOST_NET_VQ_TX = 1,
VHOST_NET_VQ_MAX = 2,