All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: virtio@lists.oasis-open.org, virtio-dev@lists.oasis-open.org
Cc: Cornelia Huck <cohuck@redhat.com>,
	Halil Pasic <pasic@linux.vnet.ibm.com>,
	Tiwei Bie <tiwei.bie@intel.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	"Dhanoa, Kully" <kully.dhanoa@intel.com>
Subject: [PATCH v8 09/16] content: in-order buffer use
Date: Fri, 16 Feb 2018 09:24:41 +0200	[thread overview]
Message-ID: <20180216092441-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1518765602-8739-1-git-send-email-mst@redhat.com>

Using descriptors in-order is sometimes beneficial.  Add an option for
that - per-format detail allowing more optimizations will be added by
follow-up patches.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 content.tex | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/content.tex b/content.tex
index 73f40b7..c57a918 100644
--- a/content.tex
+++ b/content.tex
@@ -245,6 +245,15 @@ a device event - i.e. send an interrupt to the driver.
 Device reports the number of bytes it has written to memory for
 each buffer it uses. This is referred to as ``used length''.
 
+Device is not generally required to use buffers in
+the same order in which they have been made available
+by the driver.
+
+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
+might allow optimizations or simplify driver and/or device code.
+
 Each virtqueue can consist of up to 3 parts:
 \begin{itemize}
 \item Descriptor Area - used for describing buffers
@@ -5248,6 +5257,9 @@ Descriptors} and \ref{sec:Packed Virtqueues / Indirect Flag: Scatter-Gather Supp
   \item[VIRTIO_F_RING_PACKED(34)] This feature indicates
   support for the packed virtqueue layout as described in
   \ref{sec:Basic Facilities of a Virtio Device / Packed Virtqueues}~\nameref{sec:Basic Facilities of a Virtio Device / Packed Virtqueues}.
+  \item[VIRTIO_F_IN_ORDER(35)] This feature indicates
+  that all buffers are used by the device in the same
+  order in which they have been made available.
 \end{description}
 
 \drivernormative{\section}{Reserved Feature Bits}{Reserved Feature Bits}
@@ -5273,6 +5285,9 @@ translates bus addresses from the device into physical addresses in memory.
 A device MAY fail to operate further if VIRTIO_F_IOMMU_PLATFORM is not
 accepted.
 
+If VIRTIO_F_IN_ORDER has been negotiated, a device MUST use
+buffers in the same order in which they have been available.
+
 \section{Legacy Interface: Reserved Feature Bits}\label{sec:Reserved Feature Bits / Legacy Interface: Reserved Feature Bits}
 
 Transitional devices MAY offer the following:
-- 
MST


  parent reply	other threads:[~2018-02-16  7:24 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1518765602-8739-1-git-send-email-mst@redhat.com>
2018-02-16  7:21 ` [PATCH v8 01/16] content: move 1.0 queue format out to a separate section Michael S. Tsirkin
2018-02-16  7:21 ` [PATCH v8 02/16] content: move ring text out to a separate file Michael S. Tsirkin
2018-02-16  7:21 ` [PATCH v8 03/16] content: move virtqueue operation description Michael S. Tsirkin
2018-02-16  7:22 ` [PATCH v8 04/16] content: replace mentions of len with used length Michael S. Tsirkin
2018-02-16 16:35   ` [virtio] " Cornelia Huck
2018-02-16  7:22 ` [PATCH v8 05/16] content: generalize transport ring part naming Michael S. Tsirkin
2018-02-16  7:24 ` [PATCH v8 08/16] packed virtqueues: more efficient virtqueue layout Michael S. Tsirkin
2018-02-16 17:01   ` [virtio] " Cornelia Huck
2018-02-24  5:17   ` [virtio-dev] " Tiwei Bie
2018-02-25 18:49     ` [virtio] " Michael S. Tsirkin
2018-02-26 10:51       ` [virtio-dev] " Tiwei Bie
2018-02-26 20:38         ` [virtio] " Michael S. Tsirkin
2018-02-27  1:49           ` Tiwei Bie
2018-02-27 20:17             ` [virtio] " Michael S. Tsirkin
2018-02-28  9:19               ` Tiwei Bie
2018-02-28 15:20                 ` [virtio] " Michael S. Tsirkin
2018-02-28 16:09                   ` Cornelia Huck
2018-02-28 20:35             ` Michael S. Tsirkin
2018-02-26 17:19   ` [virtio] " Halil Pasic
2018-02-26 21:05     ` Michael S. Tsirkin
2018-02-27 10:23       ` [virtio-dev] " Jens Freimann
2018-02-27 11:29         ` [virtio] " Halil Pasic
2018-02-28 13:42           ` Jens Freimann
2018-02-28 13:59             ` [virtio] " Halil Pasic
2018-02-28 15:40               ` Michael S. Tsirkin
2018-02-28 16:29                 ` Halil Pasic
2018-02-28 22:03               ` Michael S. Tsirkin
2018-02-28 22:01           ` Michael S. Tsirkin
2018-02-27 11:53       ` [virtio] " Halil Pasic
2018-02-27 14:11         ` Michael S. Tsirkin
2018-02-27 17:03           ` Halil Pasic
2018-02-28 13:25             ` [virtio-dev] " Jens Freimann
2018-02-28 22:10             ` [virtio] " Michael S. Tsirkin
2018-02-16  7:24 ` Michael S. Tsirkin [this message]
2018-02-16  7:25 ` [PATCH v8 10/16] packed-ring: add in order support Michael S. Tsirkin
2018-02-16  7:25 ` [PATCH v8 11/16] split-ring: in order feature Michael S. Tsirkin
2018-02-16  7:25 ` [PATCH v8 12/16] makediff: update to show diff from master Michael S. Tsirkin
2018-02-16 16:45   ` [virtio] " Cornelia Huck
2018-02-16  7:26 ` [PATCH v8 13/16] REVISION: set to 1.1 wd07 Michael S. Tsirkin
2018-02-16  7:26 ` [PATCH v8 14/16] VIRTIO_F_NOTIFICATION_DATA: extra data to devices Michael S. Tsirkin
2018-02-16 17:00   ` [virtio] " Cornelia Huck
2018-02-16  7:26 ` [PATCH v8 15/16] conformance: link the new conformance clause Michael S. Tsirkin
2018-02-16 16:46   ` [virtio] " Cornelia Huck
2018-02-16  7:27 ` [PATCH v8 16/16] REVISION: set for packed-wd07.pdf Michael S. Tsirkin
2018-02-16 16:47   ` [virtio] " Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180216092441-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=kully.dhanoa@intel.com \
    --cc=pasic@linux.vnet.ibm.com \
    --cc=stefanha@redhat.com \
    --cc=tiwei.bie@intel.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtio@lists.oasis-open.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.