diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2018-03-09 23:23:38 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2018-03-20 02:29:10 +0200 |
commit | 911127631f58da756a109121a62a75894b38480b (patch) | |
tree | c9679ef43f155ada62db54eb3bcb4243b4c18af6 | |
parent | 1f4a79e1e37e3eaa653d437eb644f11f9be7ff45 (diff) |
packed-ring: add in order support
Support in-order requests for packed rings.
This allows selective write-out of used descriptors.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
-rw-r--r-- | packed-ring.tex | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/packed-ring.tex b/packed-ring.tex index ebdba09..4b3d9d9 100644 --- a/packed-ring.tex +++ b/packed-ring.tex @@ -272,6 +272,30 @@ Buffer ID is also reserved and is ignored by the device. In Descriptors with VIRTQ_DESC_F_INDIRECT set VIRTQ_DESC_F_WRITE is reserved and is ignored by the device. +\subsection{In-order use of descriptors} +\label{sec:Packed Virtqueues / In-order use of descriptors} + +Some devices always use descriptors in the same order in which +they have been made available. These devices can offer the +VIRTIO_F_IN_ORDER feature. If negotiated, this knowledge allows +devices to notify the use of a batch of buffers to the driver by +only writing out a single used descriptor with the Buffer ID +corresponding to the last descriptor in the batch. + +Device then skips forward in the ring according to the size of +the batch. Driver needs to look up the used Buffer ID and +calculate the batch size to be able to advance to where the next +used descriptor will be written by the device. + +This will result in the used descriptor overwriting the first +available descriptor in the batch, the used descriptor for the +next batch overwriting the first available descriptor in the next +batch, etc. + +The skipped buffers (for which no used descriptor was written) +are assumed to have been used (read or written) by the +device completely. + \subsection{Multi-buffer requests} \label{sec:Packed Virtqueues / Multi-buffer requests} Some devices combine multiple buffers as part of processing of a |