From 70e4cb9aafb3caa9e5eb25614a5bc40b0ffa9ffd Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Thu, 1 Nov 2012 09:16:37 +0000 Subject: 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 Signed-off-by: David S. Miller --- drivers/vhost/vhost.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'drivers/vhost/vhost.h') diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 2de4ce2fec4..b6538eef746 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -13,9 +13,15 @@ #include #include -/* This is for zerocopy, used buffer len is set to 1 when lower device DMA - * done */ -#define VHOST_DMA_DONE_LEN 1 +/* + * For transmit, used buffer len is unused; we override it to track buffer + * status internally; used for zerocopy tx only. + */ +/* Lower device DMA done */ +#define VHOST_DMA_DONE_LEN 2 +/* Lower device DMA in progress */ +#define VHOST_DMA_IN_PROGRESS 1 +/* Buffer unused */ #define VHOST_DMA_CLEAR_LEN 0 struct vhost_device; -- cgit v1.2.3