diff options
author | Jason Wang <jasowang@redhat.com> | 2016-07-06 09:57:55 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2016-07-07 14:29:04 +0800 |
commit | 69e87b32680a41d9761191443587c595b6f5fc3f (patch) | |
tree | 683f9339d73eb1f1480672c2586e46deddbeab7e /include/hw | |
parent | 91d35509903464c7f4b9ed56be223d7370d3597c (diff) |
tap: vhost busy polling support
This patch add the capability of basic vhost net busy polling which is
supported by recent kernel. User could configure the maximum number of
us that could be spent on busy polling through a new property of tap
"poll-us".
Cc: Greg Kurz <groug@kaod.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/virtio/vhost-backend.h | 3 | ||||
-rw-r--r-- | include/hw/virtio/vhost.h | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h index 95fcc96676..84e1cb79ff 100644 --- a/include/hw/virtio/vhost-backend.h +++ b/include/hw/virtio/vhost-backend.h @@ -57,6 +57,8 @@ typedef int (*vhost_set_vring_kick_op)(struct vhost_dev *dev, struct vhost_vring_file *file); typedef int (*vhost_set_vring_call_op)(struct vhost_dev *dev, struct vhost_vring_file *file); +typedef int (*vhost_set_vring_busyloop_timeout_op)(struct vhost_dev *dev, + struct vhost_vring_state *r); typedef int (*vhost_set_features_op)(struct vhost_dev *dev, uint64_t features); typedef int (*vhost_get_features_op)(struct vhost_dev *dev, @@ -91,6 +93,7 @@ typedef struct VhostOps { vhost_get_vring_base_op vhost_get_vring_base; vhost_set_vring_kick_op vhost_set_vring_kick; vhost_set_vring_call_op vhost_set_vring_call; + vhost_set_vring_busyloop_timeout_op vhost_set_vring_busyloop_timeout; vhost_set_features_op vhost_set_features; vhost_get_features_op vhost_get_features; vhost_set_owner_op vhost_set_owner; diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index b60d7585b4..2106ed8c0d 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -64,7 +64,8 @@ struct vhost_dev { }; int vhost_dev_init(struct vhost_dev *hdev, void *opaque, - VhostBackendType backend_type); + VhostBackendType backend_type, + uint32_t busyloop_timeout); void vhost_dev_cleanup(struct vhost_dev *hdev); int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev); void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev); |