diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-22 12:19:24 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-22 12:19:24 -0700 |
commit | 5dc7c77967a64a1c2cb1a45f45f580fa18927a4c (patch) | |
tree | 286a35eef8b89d95968166445e568fc7c125582e /drivers | |
parent | 2a304bb8fa6a60cf6039f9a686798ec330f198ef (diff) | |
parent | 163049aefdc04323a2d17ec9f2862027b43b0502 (diff) | |
download | linux-5dc7c77967a64a1c2cb1a45f45f580fa18927a4c.tar.bz2 |
Merge branch 'vhost-net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/vhost/net.c | 4 | ||||
-rw-r--r-- | drivers/vhost/test.c | 4 | ||||
-rw-r--r-- | drivers/vhost/vhost.c | 5 | ||||
-rw-r--r-- | drivers/vhost/vhost.h | 6 |
4 files changed, 11 insertions, 8 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index f82a7394756e..072cbbadbc36 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -823,14 +823,14 @@ static long vhost_net_ioctl(struct file *f, unsigned int ioctl, return -EFAULT; return vhost_net_set_backend(n, backend.index, backend.fd); case VHOST_GET_FEATURES: - features = VHOST_FEATURES; + features = VHOST_NET_FEATURES; if (copy_to_user(featurep, &features, sizeof features)) return -EFAULT; return 0; case VHOST_SET_FEATURES: if (copy_from_user(&features, featurep, sizeof features)) return -EFAULT; - if (features & ~VHOST_FEATURES) + if (features & ~VHOST_NET_FEATURES) return -EOPNOTSUPP; return vhost_net_set_features(n, features); case VHOST_RESET_OWNER: diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c index 3de00d9fae2e..91d6f060aade 100644 --- a/drivers/vhost/test.c +++ b/drivers/vhost/test.c @@ -261,14 +261,14 @@ static long vhost_test_ioctl(struct file *f, unsigned int ioctl, return -EFAULT; return vhost_test_run(n, test); case VHOST_GET_FEATURES: - features = VHOST_FEATURES; + features = VHOST_NET_FEATURES; if (copy_to_user(featurep, &features, sizeof features)) return -EFAULT; return 0; case VHOST_SET_FEATURES: if (copy_from_user(&features, featurep, sizeof features)) return -EFAULT; - if (features & ~VHOST_FEATURES) + if (features & ~VHOST_NET_FEATURES) return -EOPNOTSUPP; return vhost_test_set_features(n, features); case VHOST_RESET_OWNER: diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 112156f68afb..ef82a0d18489 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -64,7 +64,7 @@ static int vhost_poll_wakeup(wait_queue_t *wait, unsigned mode, int sync, return 0; } -static void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn) +void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn) { INIT_LIST_HEAD(&work->node); work->fn = fn; @@ -137,8 +137,7 @@ void vhost_poll_flush(struct vhost_poll *poll) vhost_work_flush(poll->dev, &poll->work); } -static inline void vhost_work_queue(struct vhost_dev *dev, - struct vhost_work *work) +void vhost_work_queue(struct vhost_dev *dev, struct vhost_work *work) { unsigned long flags; diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 8de1fd5b8efb..1125af3d27d1 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -43,6 +43,9 @@ struct vhost_poll { struct vhost_dev *dev; }; +void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn); +void vhost_work_queue(struct vhost_dev *dev, struct vhost_work *work); + void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn, unsigned long mask, struct vhost_dev *dev); void vhost_poll_start(struct vhost_poll *poll, struct file *file); @@ -201,7 +204,8 @@ enum { VHOST_FEATURES = (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | (1ULL << VIRTIO_RING_F_EVENT_IDX) | - (1ULL << VHOST_F_LOG_ALL) | + (1ULL << VHOST_F_LOG_ALL), + VHOST_NET_FEATURES = VHOST_FEATURES | (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) | (1ULL << VIRTIO_NET_F_MRG_RXBUF), }; |