X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_vhost%2Fvhost_rxtx.c;h=a6330f8f520be3475d7c43b3b943808dbc5ff2ce;hb=fb871d0a4dc1c038a381c524cdb86fe83d21d842;hp=ca939d660121671a225e2d02d53f6914559ad675;hpb=a436f53ebfeb5a76df1e2248db8064e9dab8e739;p=dpdk.git diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c index ca939d6601..a6330f8f52 100644 --- a/lib/librte_vhost/vhost_rxtx.c +++ b/lib/librte_vhost/vhost_rxtx.c @@ -333,7 +333,8 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id, rte_mb(); /* Kick the guest if necessary. */ - if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) + if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT) + && (vq->callfd >= 0)) eventfd_write(vq->callfd, (eventfd_t)1); return count; } @@ -586,7 +587,8 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id, rte_mb(); /* Kick the guest if necessary. */ - if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) + if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT) + && (vq->callfd >= 0)) eventfd_write(vq->callfd, (eventfd_t)1); } @@ -929,7 +931,8 @@ rte_vhost_dequeue_burst(struct virtio_net *dev, uint16_t queue_id, sizeof(vq->used->idx)); /* Kick guest if required. */ - if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) + if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT) + && (vq->callfd >= 0)) eventfd_write(vq->callfd, (eventfd_t)1); out: