From: Victor Kaplansky <victork@redhat.com>
To: virtio-dev@lists.oasis-open.org
Cc: mst@redhat.com, jasowang@redhat.com, netdev@vger.kernel.org,
virtualization@lists.linux-foundation.org
Subject: [PATCH v2 1/2] virtio-net: rephrase devconf fields description
Date: Sun, 16 Aug 2015 16:42:21 +0300 [thread overview]
Message-ID: <1439732494-29765-2-git-send-email-victork@redhat.com> (raw)
In-Reply-To: <1439732494-29765-1-git-send-email-victork@redhat.com>
Clarify general description of the mac, status and
max_virtqueue_pairs fields. Specifically, the old description is
vague about configuration layout and fields offsets when some of
the fields are non valid.
Also clarify that validity of two status bits depends on two
different feature flags.
Signed-off-by: Victor Kaplansky <victork@redhat.com>
---
content.tex | 42 +++++++++++++++++++++++++++++++-----------
1 file changed, 31 insertions(+), 11 deletions(-)
diff --git a/content.tex b/content.tex
index d989d98..342183b 100644
--- a/content.tex
+++ b/content.tex
@@ -3115,23 +3115,14 @@ were needed.
\subsection{Device configuration layout}\label{sec:Device Types / Network Device / Device configuration layout}
\label{sec:Device Types / Block Device / Feature bits / Device configuration layout}
-Three driver-read-only configuration fields are currently defined. The \field{mac} address field
-always exists (though is only valid if VIRTIO_NET_F_MAC is set), and
-\field{status} only exists if VIRTIO_NET_F_STATUS is set. Two
-read-only bits (for the driver) are currently defined for the status field:
-VIRTIO_NET_S_LINK_UP and VIRTIO_NET_S_ANNOUNCE.
+
+The following configuration fields are currently defined:
\begin{lstlisting}
#define VIRTIO_NET_S_LINK_UP 1
#define VIRTIO_NET_S_ANNOUNCE 2
\end{lstlisting}
-The following driver-read-only field, \field{max_virtqueue_pairs} only exists if
-VIRTIO_NET_F_MQ is set. This field specifies the maximum number
-of each of transmit and receive virtqueues (receiveq1\ldots receiveqN
-and transmitq1\ldots transmitqN respectively) that can be configured once VIRTIO_NET_F_MQ
-is negotiated.
-
\begin{lstlisting}
struct virtio_net_config {
u8 mac[6];
@@ -3140,6 +3131,35 @@ struct virtio_net_config {
};
\end{lstlisting}
+\field{mac}, \field{status}, \field{max_virtqueue_pairs} are
+driver-read-only. \field{default_mtu} can also be written
+by the driver after negotiation.
+
+\begin{description}
+\item [\field{mac}] is MAC address assigned by the device and is valid
+ only if VIRTIO_NET_F_MAC is offered.
+
+\item [\field{status}] consists of two driver-read-only status bits:
+
+\begin{description}
+
+\item VIRTIO_NET_S_LINK_UP is valid if VIRTIO_NET_F_STATUS is
+ offered.
+
+\item VIRTIO_NET_S_ANNOUNCE is valid if
+ VIRTIO_NET_F_GUEST_ANNOUNCE is offered.
+
+\end{description}
+
+\item [\field{max_virtqueue_pairs}] tells the driver the maximum
+ number of each of virtqueues (receiveq1\ldots receiveqN and
+ transmitq1\ldots transmitqN respectively) that can be configured
+ on the device once VIRTIO_NET_F_MQ is negotiated.
+ \field{max_virtqueue_pairs} is valid only if VIRTIO_NET_F_MQ is
+ set and can be read by the driver.
+
+\end{description}
+
\devicenormative{\subsubsection}{Device configuration layout}{Device Types / Network Device / Device configuration layout}
The device MUST set \field{max_virtqueue_pairs} to between 1 and 0x8000 inclusive,
--
--Victor
next prev parent reply other threads:[~2015-08-16 13:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-16 13:42 [PATCH v2 0/2] virtio-net: default_mtu - new conf. field Victor Kaplansky
2015-08-16 13:42 ` Victor Kaplansky [this message]
2015-08-17 2:43 ` [PATCH v2 1/2] virtio-net: rephrase devconf fields description Jason Wang
2015-08-19 11:54 ` Victor Kaplansky
2015-08-20 2:46 ` Jason Wang
2015-08-16 13:42 ` [PATCH v2 2/2] virtio-net: add default_mtu configuration field Victor Kaplansky
2015-08-17 3:07 ` Jason Wang
2015-08-19 11:31 ` Victor Kaplansky
2015-08-20 2:48 ` Jason Wang
2015-08-20 19:31 ` Flavio Leitner
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=1439732494-29765-2-git-send-email-victork@redhat.com \
--to=victork@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtio-dev@lists.oasis-open.org \
--cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).