summaryrefslogtreecommitdiffstats
path: root/drivers/vhost/net.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-11-01 09:16:37 +0000
committerDavid S. Miller <davem@davemloft.net>2012-11-02 21:29:57 -0400
commit70e4cb9aafb3caa9e5eb25614a5bc40b0ffa9ffd (patch)
treef3b88279253e04599ac949e393ee0820ceaa5f57 /drivers/vhost/net.c
parent149d36f7187cbd10beff88e4e20f93e51a34827e (diff)
downloadlinux-70e4cb9aafb3caa9e5eb25614a5bc40b0ffa9ffd.tar.bz2
vhost-net: cleanup macros for DMA status tracking
Better document macros for DMA tracking. Add an explicit one for DMA in progress instead of relying on user supplying len != 1. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/vhost/net.c')
-rw-r--r--drivers/vhost/net.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 072cbbadbc36..f80ae5fc9b00 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -237,7 +237,8 @@ static void handle_tx(struct vhost_net *net)
} else {
struct ubuf_info *ubuf = &vq->ubuf_info[head];
- vq->heads[vq->upend_idx].len = len;
+ vq->heads[vq->upend_idx].len =
+ VHOST_DMA_IN_PROGRESS;
ubuf->callback = vhost_zerocopy_callback;
ubuf->ctx = vq->ubufs;
ubuf->desc = vq->upend_idx;