mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
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>
This commit is contained in:
parent
91d3550990
commit
69e87b3268
11 changed files with 70 additions and 6 deletions
|
@ -138,6 +138,12 @@ static int vhost_kernel_set_vring_call(struct vhost_dev *dev,
|
|||
return vhost_kernel_call(dev, VHOST_SET_VRING_CALL, file);
|
||||
}
|
||||
|
||||
static int vhost_kernel_set_vring_busyloop_timeout(struct vhost_dev *dev,
|
||||
struct vhost_vring_state *s)
|
||||
{
|
||||
return vhost_kernel_call(dev, VHOST_SET_VRING_BUSYLOOP_TIMEOUT, s);
|
||||
}
|
||||
|
||||
static int vhost_kernel_set_features(struct vhost_dev *dev,
|
||||
uint64_t features)
|
||||
{
|
||||
|
@ -185,6 +191,8 @@ static const VhostOps kernel_ops = {
|
|||
.vhost_get_vring_base = vhost_kernel_get_vring_base,
|
||||
.vhost_set_vring_kick = vhost_kernel_set_vring_kick,
|
||||
.vhost_set_vring_call = vhost_kernel_set_vring_call,
|
||||
.vhost_set_vring_busyloop_timeout =
|
||||
vhost_kernel_set_vring_busyloop_timeout,
|
||||
.vhost_set_features = vhost_kernel_set_features,
|
||||
.vhost_get_features = vhost_kernel_get_features,
|
||||
.vhost_set_owner = vhost_kernel_set_owner,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue