virtio-net: editorial: Annotate structure field
PATCH 1/1 virtio-net: editorial: Annotate structure field
Field command-specific-data is a structure field. Annotate it as a field so that generated pdf shows it accordingly.
---
changelog:v0->v1:
- addressed comments from Stefano
- fixed more places which were missing the annotation
--- device-types/net/description.tex | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-)
device-types/net/description.tex +13 -12
@@ -1217,7 +1217,7 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi #define VIRTIO_NET_ERR 1 \end{lstlisting} -The \field{class}, \field{command} and command-specific-data are set by the +The \field{class}, \field{command} and \field{command-specific-data} are set by the driver, and the device sets the \field{ack} byte and optionally \field{command-specific-result}. There is little the driver can do except issue a diagnostic if \field{ack} is not VIRTIO_NET_OK.
@@ -1255,13 +1255,13 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi commands: \begin{itemize} \item VIRTIO_NET_CTRL_RX_PROMISC turns promiscuous mode on and -off. The command-specific-data is one byte containing 0 (off) or +off. The \field{command-specific-data} is one byte containing 0 (off) or 1 (on). If promiscuous mode is on, the device SHOULD receive all incoming packets. This SHOULD take effect even if one of the other modes set by a VIRTIO_NET_CTRL_RX class command is on. \item VIRTIO_NET_CTRL_RX_ALLMULTI turns all-multicast receive on and -off. The command-specific-data is one byte containing 0 (off) or +off. The \field{command-specific-data} is one byte containing 0 (off) or 1 (on). When all-multicast receive is on the device SHOULD allow all incoming multicast packets. \end{itemize}
@@ -1271,24 +1271,24 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi commands: \begin{itemize} \item VIRTIO_NET_CTRL_RX_ALLUNI turns all-unicast receive on and -off. The command-specific-data is one byte containing 0 (off) or +off. The \field{command-specific-data} is one byte containing 0 (off) or 1 (on). When all-unicast receive is on the device SHOULD allow all incoming unicast packets. \item VIRTIO_NET_CTRL_RX_NOMULTI suppresses multicast receive. -The command-specific-data is one byte containing 0 (multicast +The \field{command-specific-data} is one byte containing 0 (multicast receive allowed) or 1 (multicast receive suppressed). When multicast receive is suppressed, the device SHOULD NOT send multicast packets to the driver. This SHOULD take effect even if VIRTIO_NET_CTRL_RX_ALLMULTI is on. This filter SHOULD NOT apply to broadcast packets. \item VIRTIO_NET_CTRL_RX_NOUNI suppresses unicast receive. -The command-specific-data is one byte containing 0 (unicast +The \field{command-specific-data} is one byte containing 0 (unicast receive allowed) or 1 (unicast receive suppressed). When unicast receive is suppressed, the device SHOULD NOT send unicast packets to the driver. This SHOULD take effect even if VIRTIO_NET_CTRL_RX_ALLUNI is on. \item VIRTIO_NET_CTRL_RX_NOBCAST suppresses broadcast receive. -The command-specific-data is one byte containing 0 (broadcast +The \field{command-specific-data} is one byte containing 0 (broadcast receive allowed) or 1 (broadcast receive suppressed). When broadcast receive is suppressed, the device SHOULD NOT send broadcast packets to the driver.
@@ -1330,7 +1330,7 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi many addresses. }. This table is set using the class VIRTIO_NET_CTRL_MAC and the command VIRTIO_NET_CTRL_MAC_TABLE_SET. The -command-specific-data is two variable length tables of 6-byte MAC +\field{command-specific-data} is two variable length tables of 6-byte MAC addresses (as described in struct virtio_net_ctrl_mac). The first table contains unicast addresses, and the second contains multicast addresses.
@@ -1339,7 +1339,7 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi accepts (and if VIRTIO_NET_F_MAC has been negotiated, this will be reflected in \field{mac} in config space). -The command-specific-data for VIRTIO_NET_CTRL_MAC_ADDR_SET is +The \field{command-specific-data} for VIRTIO_NET_CTRL_MAC_ADDR_SET is the 6-byte MAC address. \devicenormative{\subparagraph}{Setting MAC Address Filtering}{Device Types / Network Device / Device Operation / Control Virtqueue / Setting MAC Address Filtering}
@@ -1406,7 +1406,8 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi \end{lstlisting} Both the VIRTIO_NET_CTRL_VLAN_ADD and VIRTIO_NET_CTRL_VLAN_DEL -command take a little-endian 16-bit VLAN id as the command-specific-data. +command take a little-endian 16-bit VLAN id as the +\field{command-specific-data}. VIRTIO_NET_CTRL_VLAN_ADD command adds the specified VLAN to the VLAN filter table.
@@ -3036,10 +3037,10 @@ \subsubsection{Legacy Interface: Framing Requirements}\label{sec:Device \item for all commands, use a single 2-byte descriptor including the first two fields: \field{class} and \field{command} \item for all commands except VIRTIO_NET_CTRL_MAC_TABLE_SET -use a single descriptor including command-specific-data +use a single descriptor including \field{command-specific-data} with no padding. \item for the VIRTIO_NET_CTRL_MAC_TABLE_SET command use exactly -two descriptors including command-specific-data with no padding: +two descriptors including \field{command-specific-data} with no padding: the first of these descriptors MUST include the virtio_net_ctrl_mac table structure for the unicast addresses with no padding, the second of these descriptors MUST include the
Signature · 1 line
2.34.1
Quoted 5 lines · Parav Pandit
Field command-specific-data is a structure field. Annotate it as a field so that generated pdf shows it accordingly.
Signed-off-by Parav Pandit <[email protected]>
Quoted 8 lines
---
changelog:v0->v1:
- addressed comments from Stefano
- fixed more places which were missing the annotation
---
device-types/net/description.tex | 25 +++++++++++++------------1 file changed, 13 insertions(+), 12 deletions(-)
Quoted 104 lines
device-types/net/description.tex +1
-1@@ -1217,7 +1217,7 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi #define VIRTIO_NET_ERR 1 \end{lstlisting} -The \field{class}, \field{command} and command-specific-data are set by the +The \field{class}, \field{command} and \field{command-specific-data} are set by thedriver, and the device sets the \field{ack} byte and optionally \field{command-specific-result}. There is little the driver can do except issue a diagnostic if \field{ack} is not
VIRTIO_NET_OK.device-types/net/description.tex +0
-0@@ -1255,13 +1255,13 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devicommands:
\begin{itemize}
\itemVIRTIO_NET_CTRL_RX_PROMISCturns promiscuous mode on anddevice-types/net/description.tex +1
-1-off. The command-specific-data is one byte containing 0 (off) or +off. The \field{command-specific-data} is one byte containing 0 (off) or1 (on). If promiscuous mode is on, the device SHOULD receive all incoming packets.
This SHOULD take effect even if one of the other modes set by aVIRTIO_NET_CTRL_RXclass command is on.
\itemVIRTIO_NET_CTRL_RX_ALLMULTIturns all-multicast receive on anddevice-types/net/description.tex +1
-1-off. The command-specific-data is one byte containing 0 (off) or +off. The \field{command-specific-data} is one byte containing 0 (off) or1 (on). When all-multicast receive is on the device SHOULD allow all incoming multicast packets.
\end{itemize}device-types/net/description.tex +0
-0@@ -1271,24 +1271,24 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devicommands:
\begin{itemize}
\itemVIRTIO_NET_CTRL_RX_ALLUNIturns all-unicast receive on anddevice-types/net/description.tex +1
-1-off. The command-specific-data is one byte containing 0 (off) or +off. The \field{command-specific-data} is one byte containing 0 (off) or1 (on). When all-unicast receive is on the device SHOULD allow all incoming unicast packets.
\itemVIRTIO_NET_CTRL_RX_NOMULTIsuppresses multicast receive.device-types/net/description.tex +1
-1-The command-specific-data is one byte containing 0 (multicast +The \field{command-specific-data} is one byte containing 0 (multicastreceive allowed) or 1 (multicast receive suppressed). When multicast receive is suppressed, the device SHOULD NOT send multicast packets to the driver.
This SHOULD take effect even ifVIRTIO_NET_CTRL_RX_ALLMULTIis on. This filter SHOULD NOT apply to broadcast packets. \itemVIRTIO_NET_CTRL_RX_NOUNIsuppresses unicast receive.device-types/net/description.tex +1
-1-The command-specific-data is one byte containing 0 (unicast +The \field{command-specific-data} is one byte containing 0 (unicastreceive allowed) or 1 (unicast receive suppressed). When unicast receive is suppressed, the device SHOULD NOT send unicast packets to the driver.
This SHOULD take effect even ifVIRTIO_NET_CTRL_RX_ALLUNIis on. \itemVIRTIO_NET_CTRL_RX_NOBCASTsuppresses broadcast receive.device-types/net/description.tex +1
-1-The command-specific-data is one byte containing 0 (broadcast +The \field{command-specific-data} is one byte containing 0 (broadcastreceive allowed) or 1 (broadcast receive suppressed). When broadcast receive is suppressed, the device SHOULD NOT send broadcast packets to the driver.
device-types/net/description.tex +0
-0@@ -1330,7 +1330,7 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devimany addresses.
}. This table is set using the classVIRTIO_NET_CTRL_MACand the commandVIRTIO_NET_CTRL_MAC_TABLE_SET. The
-command-specific-data is two variable length tables of 6-byte MAC +\field{command-specific-data} is two variable length tables of 6-byte MAC
addresses (as described in structvirtio_net_ctrl_mac). The first table contains unicast addresses, and the second contains multicast addresses.device-types/net/description.tex +0
-0@@ -1339,7 +1339,7 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi accepts (and if VIRTIO_NET_F_MAC has been negotiated,this will be reflected in \field{mac} in config space).
device-types/net/description.tex +1
-1-The command-specific-data for VIRTIO_NET_CTRL_MAC_ADDR_SET is +The \field{command-specific-data} for VIRTIO_NET_CTRL_MAC_ADDR_SET isthe 6-byte MAC address.
\devicenormative{\subparagraph}{Setting MAC Address Filtering}{Device Types / Network Device / Device Operation / Control Virtqueue / Setting MAC Address Filtering}
device-types/net/description.tex +0
-0@@ -1406,7 +1406,8 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi \end{lstlisting}Both the
VIRTIO_NET_CTRL_VLAN_ADDandVIRTIO_NET_CTRL_VLAN_DELdevice-types/net/description.tex +2
-1-command take a little-endian 16-bit VLAN id as the command-specific-data. +command take a little-endian 16-bit VLAN id as the +\field{command-specific-data}.
VIRTIO_NET_CTRL_VLAN_ADDcommand adds the specified VLAN to the VLAN filter table.device-types/net/description.tex +0
-0@@ -3036,10 +3037,10 @@ \subsubsection{Legacy Interface: Framing Requirements}\label{sec:Device\item for all commands, use a single 2-byte descriptor including the first two
fields: \field{class} and \field{command}
\item for all commands exceptVIRTIO_NET_CTRL_MAC_TABLE_SETdevice-types/net/description.tex +1
-1-use a single descriptor including command-specific-data +use a single descriptor including \field{command-specific-data}with no padding.
\item for theVIRTIO_NET_CTRL_MAC_TABLE_SETcommand use exactlydevice-types/net/description.tex +1
-1-two descriptors including command-specific-data with no padding: +two descriptors including \field{command-specific-data} with no padding:the first of these descriptors MUST include the
virtio_net_ctrl_mactable structure for the unicast addresses with no padding, the second of these descriptors MUST include theSignature · 1 line
2.34.1