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
net/bnxt: modify port DB to handle more info
[dpdk.git]
/
lib
/
librte_vhost
/
vhost_user.c
diff --git
a/lib/librte_vhost/vhost_user.c
b/lib/librte_vhost/vhost_user.c
index
d9c421b
..
6039a8f
100644
(file)
--- a/
lib/librte_vhost/vhost_user.c
+++ b/
lib/librte_vhost/vhost_user.c
@@
-1619,6
+1619,12
@@
vhost_user_set_vring_call(struct virtio_net **pdev, struct VhostUserMsg *msg,
"vring call idx:%d file:%d\n", file.index, file.fd);
vq = dev->virtqueue[file.index];
"vring call idx:%d file:%d\n", file.index, file.fd);
vq = dev->virtqueue[file.index];
+
+ if (vq->ready) {
+ vhost_user_notify_queue_state(dev, file.index, 0);
+ vq->ready = 0;
+ }
+
if (vq->callfd >= 0)
close(vq->callfd);
if (vq->callfd >= 0)
close(vq->callfd);
@@
-1877,6
+1883,11
@@
vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *msg,
dev->vid, file.index, 1);
}
dev->vid, file.index, 1);
}
+ if (vq->ready) {
+ vhost_user_notify_queue_state(dev, file.index, 0);
+ vq->ready = 0;
+ }
+
if (vq->kickfd >= 0)
close(vq->kickfd);
vq->kickfd = file.fd;
if (vq->kickfd >= 0)
close(vq->kickfd);
vq->kickfd = file.fd;