[EXT] [PATCH] vhost: add device op to offload the interrupt kick
Gowrishankar Muthukrishnan
gmuthukrishn at marvell.com
Mon Mar 27 17:16:48 CEST 2023
Hi Eelco,
> +void
> +rte_vhost_notify_guest(int vid, uint16_t queue_id) {
> + struct virtio_net *dev = get_device(vid);
> + struct vhost_virtqueue *vq;
> +
> + if (!dev || queue_id >= VHOST_MAX_VRING)
> + return;
> +
> + vq = dev->virtqueue[queue_id];
> + if (!vq)
> + return;
> +
> + rte_spinlock_lock(&vq->access_lock);
> +
Is spin lock needed here before system call ?
> + if (vq->callfd >= 0)
> + eventfd_write(vq->callfd, (eventfd_t)1);
> +
> + rte_spinlock_unlock(&vq->access_lock);
> +}
> +
Thanks.
More information about the dev
mailing list