git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vhost: fix default value of kickfd and callfd
[dpdk.git]
/
lib
/
librte_vhost
/
vhost_rxtx.c
diff --git
a/lib/librte_vhost/vhost_rxtx.c
b/lib/librte_vhost/vhost_rxtx.c
index
ca939d6
..
a6330f8
100644
(file)
--- 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. */
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;
}
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. */
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);
}
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. */
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:
eventfd_write(vq->callfd, (eventfd_t)1);
out: