All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio-net: Define configuration field layout before its description
@ 2023-02-03 14:43 Parav Pandit
  2023-02-07 13:49 ` [virtio-comment] " Cornelia Huck
  0 siblings, 1 reply; 8+ messages in thread
From: Parav Pandit @ 2023-02-03 14:43 UTC (permalink / raw)
  To: mst, virtio-dev, cohuck; +Cc: virtio-comment, shahafs, Parav Pandit

Currently some fields of the virtio_net_config structure are defined
before introducing the structure and some are defined after
introducing virtio_net_config.
Better to define the configuration layout first followed by
description of all the fields.

Device configuration fields are described in the section. Change wording
from 'listed' to 'described' as suggested in patch [1].

[1] https://lists.oasis-open.org/archives/virtio-dev/202302/msg00004.html

Signed-off-by: Parav Pandit <parav@nvidia.com>
---
 device-types/net/description.tex | 39 +++++++++++++++++---------------
 1 file changed, 21 insertions(+), 18 deletions(-)

diff --git a/device-types/net/description.tex b/device-types/net/description.tex
index dedd6b1..d4f598b 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -154,11 +154,27 @@ \subsubsection{Legacy Interface: Feature bits}\label{sec:Device Types / Network
 \subsection{Device configuration layout}\label{sec:Device Types / Network Device / Device configuration layout}
 \label{sec:Device Types / Block Device / Feature bits / Device configuration layout}
 
-Device configuration fields are listed below, they are read-only for a driver. 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.
+Device configuration fields are described below, they are read-only for a driver.
+
+\begin{lstlisting}
+struct virtio_net_config {
+        u8 mac[6];
+        le16 status;
+        le16 max_virtqueue_pairs;
+        le16 mtu;
+        le32 speed;
+        u8 duplex;
+        u8 rss_max_key_size;
+        le16 rss_max_indirection_table_length;
+        le32 supported_hash_types;
+};
+\end{lstlisting}
+
+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.
 
 \begin{lstlisting}
 #define VIRTIO_NET_S_LINK_UP     1
@@ -188,19 +204,6 @@ \subsection{Device configuration layout}\label{sec:Device Types / Network Device
 is expected to re-read these values after receiving a
 configuration change notification.
 
-\begin{lstlisting}
-struct virtio_net_config {
-        u8 mac[6];
-        le16 status;
-        le16 max_virtqueue_pairs;
-        le16 mtu;
-        le32 speed;
-        u8 duplex;
-        u8 rss_max_key_size;
-        le16 rss_max_indirection_table_length;
-        le32 supported_hash_types;
-};
-\end{lstlisting}
 The following field, \field{rss_max_key_size} only exists if VIRTIO_NET_F_RSS or VIRTIO_NET_F_HASH_REPORT is set.
 It specifies the maximum supported length of RSS key in bytes.
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-02-07 22:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-03 14:43 [PATCH] virtio-net: Define configuration field layout before its description Parav Pandit
2023-02-07 13:49 ` [virtio-comment] " Cornelia Huck
2023-02-07 15:02   ` Parav Pandit
2023-02-07 15:12     ` Michael S. Tsirkin
2023-02-07 15:49     ` [virtio-comment] " Cornelia Huck
2023-02-07 21:33       ` Parav Pandit
2023-02-07 21:58         ` Michael S. Tsirkin
2023-02-07 22:45           ` Parav Pandit

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.