diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2012-11-01 05:16:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-02 21:29:57 -0400 |
commit | 70e4cb9aafb3caa9e5eb25614a5bc40b0ffa9ffd (patch) | |
tree | f3b88279253e04599ac949e393ee0820ceaa5f57 /drivers/vhost/vhost.h | |
parent | 149d36f7187cbd10beff88e4e20f93e51a34827e (diff) |
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/vhost.h')
-rw-r--r-- | drivers/vhost/vhost.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 2de4ce2fec40..b6538eef7468 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h | |||
@@ -13,9 +13,15 @@ | |||
13 | #include <linux/virtio_ring.h> | 13 | #include <linux/virtio_ring.h> |
14 | #include <linux/atomic.h> | 14 | #include <linux/atomic.h> |
15 | 15 | ||
16 | /* This is for zerocopy, used buffer len is set to 1 when lower device DMA | 16 | /* |
17 | * done */ | 17 | * For transmit, used buffer len is unused; we override it to track buffer |
18 | #define VHOST_DMA_DONE_LEN 1 | 18 | * status internally; used for zerocopy tx only. |
19 | */ | ||
20 | /* Lower device DMA done */ | ||
21 | #define VHOST_DMA_DONE_LEN 2 | ||
22 | /* Lower device DMA in progress */ | ||
23 | #define VHOST_DMA_IN_PROGRESS 1 | ||
24 | /* Buffer unused */ | ||
19 | #define VHOST_DMA_CLEAR_LEN 0 | 25 | #define VHOST_DMA_CLEAR_LEN 0 |
20 | 26 | ||
21 | struct vhost_device; | 27 | struct vhost_device; |