All of lore.kernel.org
 help / color / mirror / Atom feed
* [virtio-comment] [PATCH] virtio-net: Add device migration context fields
@ 2023-11-02 13:19 Parav Pandit
  2023-11-02 13:55 ` [virtio-comment] " Michael S. Tsirkin
  0 siblings, 1 reply; 3+ messages in thread
From: Parav Pandit @ 2023-11-02 13:19 UTC (permalink / raw)
  To: virtio-comment, mst, cohuck
  Cc: sburla, shahafs, maorg, yishaih, lingshan.zhu, jasowang,
	Parav Pandit

Expand device migration context for fields such as
mac table, vlan table, mq config, rss config.

All of them utilizes already defined infrastructure.

This patch is on top of [1].

[1] https://lists.oasis-open.org/archives/virtio-comment/202310/msg00469.html

Signed-off-by: Parav Pandit <parav@nvidia.com>
---
 device-context.tex                  |  2 +-
 device-types/net/description.tex    |  2 +
 device-types/net/device-context.tex | 58 +++++++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 1 deletion(-)
 create mode 100644 device-types/net/device-context.tex

diff --git a/device-context.tex b/device-context.tex
index ab19fc9..348bb25 100644
--- a/device-context.tex
+++ b/device-context.tex
@@ -57,7 +57,7 @@ \section{Device Context}\label{sec:Basic Facilities of a Virtio Device / Device
 \hline
 0x1000 & VIRTIO_DEV_CTX_DEV_CFG & Provides device specific configuration \\
 \hline
-0x1001 - 0x1FFF & - & Device type specific range reserved for future \\
+0x1001 - 0x1FFF & - & Device type specific range defined by the specific device type \\
 \hline
 \hline
 0x2000 - 0xFFFF & - & Reserved for future \\
diff --git a/device-types/net/description.tex b/device-types/net/description.tex
index 76585b0..13490ec 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -1805,6 +1805,8 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi
 
 Upon reset, a device MUST initialize all coalescing parameters to 0.
 
+\input{device-types/net/device-context.tex}
+
 \subsubsection{Legacy Interface: Framing Requirements}\label{sec:Device
 Types / Network Device / Legacy Interface: Framing Requirements}
 
diff --git a/device-types/net/device-context.tex b/device-types/net/device-context.tex
new file mode 100644
index 0000000..b78cf37
--- /dev/null
+++ b/device-types/net/device-context.tex
@@ -0,0 +1,58 @@
+\subsection{Device Context}\label{sec:Device Types / Network Device / Device Operation / Device Context}
+
+\begin{table}
+\caption{\label{tab:Network Device Context Fields} Network Device Context Fields}
+\begin{tabularx}{\textwidth}{ |l||l|X| }
+\hline
+Type & Name & Description \\
+\hline \hline
+\hline
+0x1001 & VIRTIO_DEV_CTX_NET_MAC_ADDR_FILTER_TABLE & Provides MAC Address filter table \\
+\hline
+0x1002 & VIRTIO_DEV_CTX_NET_VLAN_FILTER_TABLE & Provides VLAN filter table \\
+\hline
+0x1003 & VIRTIO_DEV_CTX_NET_MQ_PAIRS & Provides multi queue configuration \\
+\hline
+0x1004 & VIRTIO_DEV_CTX_NET_RSS_CONFIG & Provides RSS configuration \\
+\hline
+0x1005 - 0x1FFF & - & reserved for future \\
+\hline
+\hline
+\end{tabularx}
+\end{table}
+
+\subsubsection{MAC Address Filter Table Context}\label{sec:Device Types / Network Device / Device Operation / Device Context / MAC Address Filter Table Context}
+
+For the field VIRTIO_DEV_CTX_NET_MAC_TABLE, \field{type} is set to 0x1001.
+The \field{value} is in format of \field{struct virtio_net_ctrl_mac} as listed
+in section
+\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Setting MAC Address Filtering}.
+The \field{length} is the length of \field{struct virtio_net_ctrl_mac}.
+
+\subsubsection{VLAN Filter Table Context}\label{sec:Device Types / Network Device / Device Operation / Device Context / VLAN Filter Table Context}
+
+For the field VIRTIO_DEV_CTX_NET_VLAN_FILTER_TABLE, \field{type} is set to 0x1002.
+The \field{value} is in format of \field{struct virtio_dev_ctx_net_vlan_table}.
+The \field{length} is the length of \field{struct virtio_dev_ctx_net_vlan_table}.
+
+\begin{lstlisting}
+struct virtio_dev_ctx_net_vlan_table {
+        le16 vlan[];
+};
+\end{lstlisting}
+
+\subsubsection{Multiqueue Pairs Context}\label{sec:Device Types / Network Device / Device Operation / Device Context / Multiqueue Pairs Context}
+
+For the field VIRTIO_DEV_CTX_NET_MQ_PAIRS, \field{type} is set to 0x1003.
+The \field{value} is in format of \field{struct virtio_net_ctrl_mq_pairs_set} as listed
+in section
+\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Automatic receive steering in multiqueue mode}.
+The \field{length} is the length of \field{struct virtio_net_ctrl_mq_pairs_set}.
+
+\subsubsection{Receive Side Scaling Context}\label{sec:Device Types / Network Device / Device Operation / Device Context / Receive Side Scaling Context}
+
+For the field VIRTIO_DEV_CTX_NET_RSS_CONFIG, \field{type} is set to 0x1004.
+The \field{value} is in format of \field{struct virtio_net_rss_config} as listed
+in section
+\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Receive-side scaling (RSS) / Setting RSS parameters}.
+The \field{length} is the length of \field{struct virtio_net_rss_config}.
-- 
2.34.1


This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


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

* [virtio-comment] Re: [PATCH] virtio-net: Add device migration context fields
  2023-11-02 13:19 [virtio-comment] [PATCH] virtio-net: Add device migration context fields Parav Pandit
@ 2023-11-02 13:55 ` Michael S. Tsirkin
  2023-11-02 14:10   ` [virtio-comment] " Parav Pandit
  0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2023-11-02 13:55 UTC (permalink / raw)
  To: Parav Pandit
  Cc: virtio-comment, cohuck, sburla, shahafs, maorg, yishaih,
	lingshan.zhu, jasowang

On Thu, Nov 02, 2023 at 03:19:46PM +0200, Parav Pandit wrote:
> Expand device migration context for fields such as
> mac table, vlan table, mq config, rss config.
> 
> All of them utilizes already defined infrastructure.
> 
> This patch is on top of [1].
> 
> [1] https://lists.oasis-open.org/archives/virtio-comment/202310/msg00469.html
> 
> Signed-off-by: Parav Pandit <parav@nvidia.com>
> ---
>  device-context.tex                  |  2 +-
>  device-types/net/description.tex    |  2 +
>  device-types/net/device-context.tex | 58 +++++++++++++++++++++++++++++
>  3 files changed, 61 insertions(+), 1 deletion(-)
>  create mode 100644 device-types/net/device-context.tex
> 
> diff --git a/device-context.tex b/device-context.tex
> index ab19fc9..348bb25 100644
> --- a/device-context.tex
> +++ b/device-context.tex
> @@ -57,7 +57,7 @@ \section{Device Context}\label{sec:Basic Facilities of a Virtio Device / Device
>  \hline
>  0x1000 & VIRTIO_DEV_CTX_DEV_CFG & Provides device specific configuration \\
>  \hline
> -0x1001 - 0x1FFF & - & Device type specific range reserved for future \\
> +0x1001 - 0x1FFF & - & Device type specific range defined by the specific device type \\
>  \hline
>  \hline
>  0x2000 - 0xFFFF & - & Reserved for future \\
> diff --git a/device-types/net/description.tex b/device-types/net/description.tex
> index 76585b0..13490ec 100644
> --- a/device-types/net/description.tex
> +++ b/device-types/net/description.tex
> @@ -1805,6 +1805,8 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi
>  
>  Upon reset, a device MUST initialize all coalescing parameters to 0.
>  
> +\input{device-types/net/device-context.tex}
> +

I don't think we need to split this to a separate file.

>  \subsubsection{Legacy Interface: Framing Requirements}\label{sec:Device
>  Types / Network Device / Legacy Interface: Framing Requirements}
>  
> diff --git a/device-types/net/device-context.tex b/device-types/net/device-context.tex
> new file mode 100644
> index 0000000..b78cf37
> --- /dev/null
> +++ b/device-types/net/device-context.tex
> @@ -0,0 +1,58 @@
> +\subsection{Device Context}\label{sec:Device Types / Network Device / Device Operation / Device Context}
> +
> +\begin{table}
> +\caption{\label{tab:Network Device Context Fields} Network Device Context Fields}
> +\begin{tabularx}{\textwidth}{ |l||l|X| }
> +\hline
> +Type & Name & Description \\
> +\hline \hline
> +\hline
> +0x1001 & VIRTIO_DEV_CTX_NET_MAC_ADDR_FILTER_TABLE & Provides MAC Address filter table \\
> +\hline
> +0x1002 & VIRTIO_DEV_CTX_NET_VLAN_FILTER_TABLE & Provides VLAN filter table \\
> +\hline
> +0x1003 & VIRTIO_DEV_CTX_NET_MQ_PAIRS & Provides multi queue configuration \\
> +\hline
> +0x1004 & VIRTIO_DEV_CTX_NET_RSS_CONFIG & Provides RSS configuration \\
> +\hline
> +0x1005 - 0x1FFF & - & reserved for future \\
> +\hline
> +\hline

Where are these 0x1XXX values coming from?


> +\end{tabularx}
> +\end{table}
> +
> +\subsubsection{MAC Address Filter Table Context}\label{sec:Device Types / Network Device / Device Operation / Device Context / MAC Address Filter Table Context}
> +
> +For the field VIRTIO_DEV_CTX_NET_MAC_TABLE, \field{type} is set to 0x1001.
> +The \field{value} is in format of \field{struct virtio_net_ctrl_mac} as listed
> +in section
> +\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Setting MAC Address Filtering}.
> +The \field{length} is the length of \field{struct virtio_net_ctrl_mac}.
> +
> +\subsubsection{VLAN Filter Table Context}\label{sec:Device Types / Network Device / Device Operation / Device Context / VLAN Filter Table Context}
> +
> +For the field VIRTIO_DEV_CTX_NET_VLAN_FILTER_TABLE, \field{type} is set to 0x1002.
> +The \field{value} is in format of \field{struct virtio_dev_ctx_net_vlan_table}.
> +The \field{length} is the length of \field{struct virtio_dev_ctx_net_vlan_table}.

in bytes?

> +
> +\begin{lstlisting}
> +struct virtio_dev_ctx_net_vlan_table {
> +        le16 vlan[];
> +};
> +\end{lstlisting}


are you going to document this or do you think this is self-explanatory?

> +
> +\subsubsection{Multiqueue Pairs Context}\label{sec:Device Types / Network Device / Device Operation / Device Context / Multiqueue Pairs Context}
> +
> +For the field VIRTIO_DEV_CTX_NET_MQ_PAIRS, \field{type} is set to 0x1003.
> +The \field{value} is in format of \field{struct virtio_net_ctrl_mq_pairs_set} as listed
> +in section
> +\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Automatic receive steering in multiqueue mode}.
> +The \field{length} is the length of \field{struct virtio_net_ctrl_mq_pairs_set}.
> +
> +\subsubsection{Receive Side Scaling Context}\label{sec:Device Types / Network Device / Device Operation / Device Context / Receive Side Scaling Context}
> +
> +For the field VIRTIO_DEV_CTX_NET_RSS_CONFIG, \field{type} is set to 0x1004.
> +The \field{value} is in format of \field{struct virtio_net_rss_config} as listed
> +in section
> +\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Receive-side scaling (RSS) / Setting RSS parameters}.
> +The \field{length} is the length of \field{struct virtio_net_rss_config}.




> -- 
> 2.34.1


This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


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

* [virtio-comment] RE: [PATCH] virtio-net: Add device migration context fields
  2023-11-02 13:55 ` [virtio-comment] " Michael S. Tsirkin
@ 2023-11-02 14:10   ` Parav Pandit
  0 siblings, 0 replies; 3+ messages in thread
From: Parav Pandit @ 2023-11-02 14:10 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: virtio-comment@lists.oasis-open.org, cohuck@redhat.com,
	sburla@marvell.com, Shahaf Shuler, Maor Gottlieb, Yishai Hadas,
	lingshan.zhu@intel.com, jasowang@redhat.com


> From: Michael S. Tsirkin <mst@redhat.com>
> Sent: Thursday, November 2, 2023 7:25 PM
> 
> On Thu, Nov 02, 2023 at 03:19:46PM +0200, Parav Pandit wrote:
> > Expand device migration context for fields such as mac table, vlan
> > table, mq config, rss config.
> >
> > All of them utilizes already defined infrastructure.
> >
> > This patch is on top of [1].
> >
> > [1]
> > https://lists.oasis-open.org/archives/virtio-comment/202310/msg00469.h
> > tml
> >
> > Signed-off-by: Parav Pandit <parav@nvidia.com>
> > ---
> >  device-context.tex                  |  2 +-
> >  device-types/net/description.tex    |  2 +
> >  device-types/net/device-context.tex | 58
> > +++++++++++++++++++++++++++++
> >  3 files changed, 61 insertions(+), 1 deletion(-)  create mode 100644
> > device-types/net/device-context.tex
> >
> > diff --git a/device-context.tex b/device-context.tex index
> > ab19fc9..348bb25 100644
> > --- a/device-context.tex
> > +++ b/device-context.tex
> > @@ -57,7 +57,7 @@ \section{Device Context}\label{sec:Basic Facilities
> > of a Virtio Device / Device  \hline
> >  0x1000 & VIRTIO_DEV_CTX_DEV_CFG & Provides device specific
> > configuration \\  \hline
> > -0x1001 - 0x1FFF & - & Device type specific range reserved for future
> > \\
> > +0x1001 - 0x1FFF & - & Device type specific range defined by the
> > +specific device type \\
> >  \hline
> >  \hline
> >  0x2000 - 0xFFFF & - & Reserved for future \\ diff --git
> > a/device-types/net/description.tex b/device-types/net/description.tex
> > index 76585b0..13490ec 100644
> > --- a/device-types/net/description.tex
> > +++ b/device-types/net/description.tex
> > @@ -1805,6 +1805,8 @@ \subsubsection{Control
> > Virtqueue}\label{sec:Device Types / Network Device / Devi
> >
> >  Upon reset, a device MUST initialize all coalescing parameters to 0.
> >
> > +\input{device-types/net/device-context.tex}
> > +
> 
> I don't think we need to split this to a separate file.
> 
I found it more maintainable but ok, will keep to one file.
> >  \subsubsection{Legacy Interface: Framing
> > Requirements}\label{sec:Device  Types / Network Device / Legacy
> > Interface: Framing Requirements}
> >
> > diff --git a/device-types/net/device-context.tex
> > b/device-types/net/device-context.tex
> > new file mode 100644
> > index 0000000..b78cf37
> > --- /dev/null
> > +++ b/device-types/net/device-context.tex
> > @@ -0,0 +1,58 @@
> > +\subsection{Device Context}\label{sec:Device Types / Network Device /
> > +Device Operation / Device Context}
> > +
> > +\begin{table}
> > +\caption{\label{tab:Network Device Context Fields} Network Device
> > +Context Fields} \begin{tabularx}{\textwidth}{ |l||l|X| } \hline Type
> > +& Name & Description \\ \hline \hline \hline
> > +0x1001 & VIRTIO_DEV_CTX_NET_MAC_ADDR_FILTER_TABLE & Provides
> MAC
> > +Address filter table \\ \hline
> > +0x1002 & VIRTIO_DEV_CTX_NET_VLAN_FILTER_TABLE & Provides VLAN
> filter
> > +table \\ \hline
> > +0x1003 & VIRTIO_DEV_CTX_NET_MQ_PAIRS & Provides multi queue
> > +configuration \\ \hline
> > +0x1004 & VIRTIO_DEV_CTX_NET_RSS_CONFIG & Provides RSS configuration
> > +\\ \hline
> > +0x1005 - 0x1FFF & - & reserved for future \\ \hline \hline
> 
> Where are these 0x1XXX values coming from?
> 
At beginning of the patch, device specific range is listed starting from 0x1000.

> 
> > +\end{tabularx}
> > +\end{table}
> > +
> > +\subsubsection{MAC Address Filter Table Context}\label{sec:Device
> > +Types / Network Device / Device Operation / Device Context / MAC
> > +Address Filter Table Context}
> > +
> > +For the field VIRTIO_DEV_CTX_NET_MAC_TABLE, \field{type} is set to
> 0x1001.
> > +The \field{value} is in format of \field{struct virtio_net_ctrl_mac}
> > +as listed in section \label{sec:Device Types / Network Device /
> > +Device Operation / Control Virtqueue / Setting MAC Address Filtering}.
> > +The \field{length} is the length of \field{struct virtio_net_ctrl_mac}.
> > +
> > +\subsubsection{VLAN Filter Table Context}\label{sec:Device Types /
> > +Network Device / Device Operation / Device Context / VLAN Filter
> > +Table Context}
> > +
> > +For the field VIRTIO_DEV_CTX_NET_VLAN_FILTER_TABLE, \field{type} is set
> to 0x1002.
> > +The \field{value} is in format of \field{struct virtio_dev_ctx_net_vlan_table}.
> > +The \field{length} is the length of \field{struct
> virtio_dev_ctx_net_vlan_table}.
> 
> in bytes?
> 
Yes, will add.

> > +
> > +\begin{lstlisting}
> > +struct virtio_dev_ctx_net_vlan_table {
> > +        le16 vlan[];
> > +};
> > +\end{lstlisting}
> 
> 
> are you going to document this or do you think this is self-explanatory?
> 
I wanted to add to the net section as it is already described there, so that it will be self-explanatory here.
Will cover there in v2.

> > +
> > +\subsubsection{Multiqueue Pairs Context}\label{sec:Device Types /
> > +Network Device / Device Operation / Device Context / Multiqueue Pairs
> > +Context}
> > +
> > +For the field VIRTIO_DEV_CTX_NET_MQ_PAIRS, \field{type} is set to 0x1003.
> > +The \field{value} is in format of \field{struct
> > +virtio_net_ctrl_mq_pairs_set} as listed in section \label{sec:Device
> > +Types / Network Device / Device Operation / Control Virtqueue / Automatic
> receive steering in multiqueue mode}.
> > +The \field{length} is the length of \field{struct virtio_net_ctrl_mq_pairs_set}.
> > +
> > +\subsubsection{Receive Side Scaling Context}\label{sec:Device Types /
> > +Network Device / Device Operation / Device Context / Receive Side
> > +Scaling Context}
> > +
> > +For the field VIRTIO_DEV_CTX_NET_RSS_CONFIG, \field{type} is set to
> 0x1004.
> > +The \field{value} is in format of \field{struct
> > +virtio_net_rss_config} as listed in section \label{sec:Device Types /
> > +Network Device / Device Operation / Control Virtqueue / Receive-side
> scaling (RSS) / Setting RSS parameters}.
> > +The \field{length} is the length of \field{struct virtio_net_rss_config}.
> 
> 
> 
> 
> > --
> > 2.34.1


This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


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

end of thread, other threads:[~2023-11-02 14:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-02 13:19 [virtio-comment] [PATCH] virtio-net: Add device migration context fields Parav Pandit
2023-11-02 13:55 ` [virtio-comment] " Michael S. Tsirkin
2023-11-02 14:10   ` [virtio-comment] " 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.