Skip to contentSkip to conversation

content: document speed, dupex

PATCH In review Michael S. Tsirkin 3 participants 3 messages Nov 1, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 content: document speed, dupex

Document as used by Linux.

---
 content.tex | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
content.tex +25 -0
index bff80d0..e89ae44 100644
@@ -2951,12 +2951,29 @@ \subsection{Device configuration layout}\label{sec:Device Types / Network Device
 VIRTIO_NET_F_MTU is set. This field specifies the maximum MTU for the driver to
 use.
 
+The following two fields, \field{speed} and \field{duplex} only
+exist if VIRTIO_NET_F_SPEED_DUPLEX is set.
+
+\field{speed} is the device speed, in units of 1MByte, 0 to
+0x7FFFF. Driver MUST also treat any
+other value as representing an unknown duplex state.
+
+\field{duplex} has the values of 0x00 for full duplex, 0x01 for
+half duplex and 0xff for unknown. Driver MUST also treat any
+other value as representing an unknown duplex state.
+
+Neither \field{speed} not \field{duplex} changes as long as
+VIRTIO_NET_S_LINK_UP is set.
+
 \begin{lstlisting}
 struct virtio_net_config {
         u8 mac[6];
         le16 status;
         le16 max_virtqueue_pairs;
         le16 mtu;
+        le32 speed;
+        u8 duplex;
+
 };
 \end{lstlisting}
 
@@ -2985,6 +3002,10 @@ \subsection{Device configuration layout}\label{sec:Device Types / Network Device
 If the driver negotiates the VIRTIO_NET_F_STANDBY feature, the device MAY act
 as a standby device for a primary device with the same MAC address.
 
+Device MUST NOT change the \field{speed} and \field{duplex}
+fields as long as VIRTIO_NET_S_LINK_UP is set in the
+\field{status}.
+
 \drivernormative{\subsubsection}{Device configuration layout}{Device Types / Network Device / Device configuration layout}
 
 A driver SHOULD negotiate VIRTIO_NET_F_MAC if the device offers it.
@@ -3009,6 +3030,10 @@ \subsection{Device configuration layout}\label{sec:Device Types / Network Device
 
 A driver SHOULD negotiate the VIRTIO_NET_F_STANDBY feature if the device offers it.
 
+A driver MUST treat a value of \field{speed} above
+0x000000007fffffff as well as a value of \field{duplex} not
+matching 0x0 or 0x1 as an unknown value.
+
 \subsubsection{Legacy Interface: Device configuration layout}\label{sec:Device Types / Network Device / Device configuration layout / Legacy Interface: Device configuration layout}
 \label{sec:Device Types / Block Device / Feature bits / Device configuration layout / Legacy Interface: Device configuration layout}
 When using the legacy interface, transitional devices and drivers
Signature · 7 lines
MST


---------------------------------------------------------------------
To unsubscribe from this mail list, you must leave the OASIS TC that
generates this mail.  Follow this link to all your TCs in OASIS at:
https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
#1 lore raw
Quoted 12 lines · Michael S. Tsirkin

Document as used by Linux.

---
 content.tex | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
content.tex +0 -0
index bff80d0..e89ae44 100644

content.tex \subsection{Device configuration layout}\label{sec:Device Types / Network Device · line 2959

Quoted 9 lines
content.tex +6 -0
@@ -2951,12 +2951,29 @@ \subsection{Device configuration layout}\label{sec:Device Types / Network Device
 VIRTIO_NET_F_MTU is set. This field specifies the maximum MTU for the driver to
 use.
 
+The following two fields, \field{speed} and \field{duplex} only
+exist if VIRTIO_NET_F_SPEED_DUPLEX is set.
+
+\field{speed} is the device speed, in units of 1MByte, 0 to
+0x7FFFF. Driver MUST also treat any
+other value as representing an unknown duplex state.

This should be "an unknown speed"?

content.tex \subsection{Device configuration layout}\label{sec:Device Types / Network Device · line 2967

Quoted 8 lines
content.tex +8 -0
+
+\field{duplex} has the values of 0x00 for full duplex, 0x01 for
+half duplex and 0xff for unknown. Driver MUST also treat any
+other value as representing an unknown duplex state.
+
+Neither \field{speed} not \field{duplex} changes as long as
+VIRTIO_NET_S_LINK_UP is set.
+

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

#2 lore raw
In reply to Michael S. Tsirkin

On Fri, 1 Nov 2019 04:23:45 -0400
"Michael S. Tsirkin" <[email protected]> wrote:

$SUBJECT: s/dupex/duplex/

Quoted 12 lines

Document as used by Linux.

---
 content.tex | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
content.tex +0 -0
index bff80d0..e89ae44 100644

content.tex \subsection{Device configuration layout}\label{sec:Device Types / Network Device · line 2954

Quoted 4 lines
content.tex +1 -0
@@ -2951,12 +2951,29 @@ \subsection{Device configuration layout}\label{sec:Device Types / Network Device
 VIRTIO_NET_F_MTU is set. This field specifies the maximum MTU for the driver to
 use.
 
+The following two fields, \field{speed} and \field{duplex} only

Comma after "duplex"?

content.tex \subsection{Device configuration layout}\label{sec:Device Types / Network Device · line 2957

Quoted 3 lines
content.tex +3 -0
+exist if VIRTIO_NET_F_SPEED_DUPLEX is set.
+
+\field{speed} is the device speed, in units of 1MByte, 0 to

s/is/contains/

s/1MByte/1 MByte/ (Have we specified the format for that somewhere, btw?)

content.tex \subsection{Device configuration layout}\label{sec:Device Types / Network Device · line 2958

Quoted 1 line
content.tex +1 -0
+0x7FFFF. Driver MUST also treat any

s/Driver MUST also treat/The driver MUST treat/

(Is this a conformance section? Sorry, a bit lost.)

content.tex \subsection{Device configuration layout}\label{sec:Device Types / Network Device · line 2962

Quoted 4 lines
content.tex +4 -0
+other value as representing an unknown duplex state.
+
+\field{duplex} has the values of 0x00 for full duplex, 0x01 for
+half duplex and 0xff for unknown. Driver MUST also treat any

Comma after "half duplex"?

s/Driver MUST also treat/The driver MUST treat/

Quoted 18 lines
content.tex +8 -0
+other value as representing an unknown duplex state.
+
+Neither \field{speed} not \field{duplex} changes as long as
+VIRTIO_NET_S_LINK_UP is set.
+
 \begin{lstlisting}
 struct virtio_net_config {
         u8 mac[6];
         le16 status;
         le16 max_virtqueue_pairs;
         le16 mtu;
+        le32 speed;
+        u8 duplex;
+
 };
 \end{lstlisting}
 

content.tex \subsection{Device configuration layout}\label{sec:Device Types / Network Device · line 3005

Quoted 4 lines
content.tex +1 -0
@@ -2985,6 +3002,10 @@ \subsection{Device configuration layout}\label{sec:Device Types / Network Device
 If the driver negotiates the VIRTIO_NET_F_STANDBY feature, the device MAY act
 as a standby device for a primary device with the same MAC address.
 
+Device MUST NOT change the \field{speed} and \field{duplex}

s/Device/The device/

content.tex \subsection{Device configuration layout}\label{sec:Device Types / Network Device · line 3033

Quoted 11 lines
content.tex +4 -0
+fields as long as VIRTIO_NET_S_LINK_UP is set in the
+\field{status}.
+
 \drivernormative{\subsubsection}{Device configuration layout}{Device Types / Network Device / Device configuration layout}
 
 A driver SHOULD negotiate VIRTIO_NET_F_MAC if the device offers it.
@@ -3009,6 +3030,10 @@ \subsection{Device configuration layout}\label{sec:Device Types / Network Device
 
 A driver SHOULD negotiate the VIRTIO_NET_F_STANDBY feature if the device offers it.
 
+A driver MUST treat a value of \field{speed} above

s/a value/any value/ ? (also in the next line)

content.tex \subsection{Device configuration layout}\label{sec:Device Types / Network Device · line 3039

Quoted 6 lines
content.tex +3 -0
+0x000000007fffffff as well as a value of \field{duplex} not
+matching 0x0 or 0x1 as an unknown value.
+
 \subsubsection{Legacy Interface: Device configuration layout}\label{sec:Device Types / Network Device / Device configuration layout / Legacy Interface: Device configuration layout}
 \label{sec:Device Types / Block Device / Feature bits / Device configuration layout / Legacy Interface: Device configuration layout}
 When using the legacy interface, transitional devices and drivers

---------------------------------------------------------------------
To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail. Follow this link to all your TCs in OASIS at:
https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php