On 5/26/23 10:54, David Marchand wrote:
On Thu, May 25, 2023 at 6:26 PM Maxime Coquelin
<maxime.coque...@redhat.com> wrote:
@@ -900,6 +905,24 @@ vhost_need_event(uint16_t event_idx, uint16_t new_idx, 
uint16_t old)
         return (uint16_t)(new_idx - event_idx - 1) < (uint16_t)(new_idx - old);
  }

+static __rte_always_inline void
+vhost_vring_inject_irq(struct virtio_net *dev, struct vhost_virtqueue *vq)
+{
+       int ret;
+
+       ret = dev->backend_ops->inject_irq(dev, vq);
+       if (ret) {

No need for ret.

Agree. Fixed here and also in the new API introduced by Eelco.

Thanks,
Maxime

+               if (dev->flags & VIRTIO_DEV_STATS_ENABLED)
+                       vq->stats.guest_notifications_error++;
+               return;
+       }
+
+       if (dev->flags & VIRTIO_DEV_STATS_ENABLED)
+               vq->stats.guest_notifications++;
+       if (dev->notify_ops->guest_notified)
+               dev->notify_ops->guest_notified(dev->vid);
+}
+
  static __rte_always_inline void
  vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
  {



Reply via email to