vhost: Move VHOST_NET_FEATURES to net.c
authorAsias He <asias@redhat.com>
Mon, 6 May 2013 08:38:20 +0000 (16:38 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 6 May 2013 10:21:00 +0000 (13:21 +0300)
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>
drivers/vhost/net.c
drivers/vhost/vhost.h

index 354665a3ecd808b7333fcb51bcebcf99d33245c0..06b2447bce7144ab0d49d308feb8bd522087d21c 100644 (file)
@@ -58,6 +58,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,
index cc23bc456d157a7307b8c7c4a18845c384735f35..08ebf58dfcf40c27f6e69d19e22736d59e7a9b28 100644 (file)
@@ -178,9 +178,6 @@ enum {
                         (1ULL << VIRTIO_RING_F_INDIRECT_DESC) |
                         (1ULL << VIRTIO_RING_F_EVENT_IDX) |
                         (1ULL << VHOST_F_LOG_ALL),
-       VHOST_NET_FEATURES = VHOST_FEATURES |
-                        (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) |
-                        (1ULL << VIRTIO_NET_F_MRG_RXBUF),
 };
 
 static inline int vhost_has_feature(struct vhost_dev *dev, int bit)