aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vhost
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2012-05-01 23:42:41 -0400
committerMichael S. Tsirkin <mst@redhat.com>2012-05-02 11:22:24 -0400
commitc8fb217af57c6c232af3517d3115d2af4ce9900e (patch)
treec570166201d18f7672178e37b4f8fa6689ea8448 /drivers/vhost
parentdbf34207c62bdec16b49721d119647c470a3443c (diff)
vhost_net: zerocopy: adding and signalling immediately when fully copied
When a packet were fully copied in zerocopy, we don't wait for the DMA done to mark the done flag, so after the packet were passed to lower device, we need to add used and signal guest immediately. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/net.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index f54b1d5fc234..853db7a08a26 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -266,6 +266,8 @@ static void handle_tx(struct vhost_net *net)
266 " len %d != %zd\n", err, len); 266 " len %d != %zd\n", err, len);
267 if (!zcopy) 267 if (!zcopy)
268 vhost_add_used_and_signal(&net->dev, vq, head, 0); 268 vhost_add_used_and_signal(&net->dev, vq, head, 0);
269 else
270 vhost_zerocopy_signal_used(vq);
269 total_len += len; 271 total_len += len;
270 if (unlikely(total_len >= VHOST_NET_WEIGHT)) { 272 if (unlikely(total_len >= VHOST_NET_WEIGHT)) {
271 vhost_poll_queue(&vq->poll); 273 vhost_poll_queue(&vq->poll);