* [virtio-dev] [PATCH] virtio-net: support reset queue
@ 2022-02-09 9:01 Xuan Zhuo
2022-02-09 9:23 ` [virtio-dev] " Michael S. Tsirkin
0 siblings, 1 reply; 3+ messages in thread
From: Xuan Zhuo @ 2022-02-09 9:01 UTC (permalink / raw)
To: virtio-dev; +Cc: jasowang, Michael S. Tsirkin
This patch defines some requirements for virtio-net to support reset
queues.
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
---
conformance.tex | 2 ++
content.tex | 19 +++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/conformance.tex b/conformance.tex
index 42f8537..52b4879 100644
--- a/conformance.tex
+++ b/conformance.tex
@@ -136,6 +136,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
\item \ref{drivernormative:Device Types / Network Device / Device Operation / Packet Transmission}
\item \ref{drivernormative:Device Types / Network Device / Device Operation / Setting Up Receive Buffers}
\item \ref{drivernormative:Device Types / Network Device / Device Operation / Processing of Incoming Packets}
+\item \ref{drivernormative:Device Types / Network Device / Device Operation / Reset Virtqueue}
\item \ref{drivernormative:Device Types / Network Device / Device Operation / Control Virtqueue / Packet Receive Filtering}
\item \ref{drivernormative:Device Types / Network Device / Device Operation / Control Virtqueue / Setting MAC Address Filtering}
\item \ref{drivernormative:Device Types / Network Device / Device Operation / Control Virtqueue / Gratuitous Packet Sending}
@@ -396,6 +397,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
\item \ref{devicenormative:Device Types / Network Device / Device Operation / Packet Transmission}
\item \ref{devicenormative:Device Types / Network Device / Device Operation / Setting Up Receive Buffers}
\item \ref{devicenormative:Device Types / Network Device / Device Operation / Processing of Incoming Packets}
+\item \ref{devicenormative:Device Types / Network Device / Device Operation / Reset Virtqueue}
\item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Packet Receive Filtering}
\item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Setting MAC Address Filtering}
\item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Gratuitous Packet Sending}
diff --git a/content.tex b/content.tex
index c6f116c..ce8e37a 100644
--- a/content.tex
+++ b/content.tex
@@ -4000,6 +4000,25 @@ \subsubsection{Processing of Incoming Packets}\label{sec:Device Types / Network
#define VIRTIO_NET_HASH_REPORT_UDPv6_EX 9
\end{lstlisting}
+\subsubsection{Reset Virtqueue}\label{sec:Device Types / Network Device / Device Operation / Reset Virtqueue}
+
+The receive and transmission virtqueues can implement reset based on Virtqueue
+Reset (See \ref{sec:Basic Facilities of a Virtio Device / Virtqueues / Virtqueue Reset}).
+
+\drivernormative{\paragraph}{Gratuitous Packet Sending}{Device Types / Network Device / Device Operation / Reset Virtqueue}
+
+The driver MUST NOT reset the control virtqueue.
+
+\devicenormative{\paragraph}{Gratuitous Packet Sending}{Device Types / Network Device / Device Operation / Reset Virtqueue}
+
+After automatic receive steering or RSS receive steering has completed the
+selection of the queue, if the destination receive queue is in reset state,
+the device MUST re-select a different random queue. If all receive queues are in
+reset state, the device can drop the packet.
+
+A virtio-net device MUST support the above requirements in order to support
+VIRTIO_F_RING_RESET.
+
\subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue}
The driver uses the control virtqueue (if VIRTIO_NET_F_CTRL_VQ is
--
2.31.0
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [virtio-dev] Re: [PATCH] virtio-net: support reset queue
2022-02-09 9:01 [virtio-dev] [PATCH] virtio-net: support reset queue Xuan Zhuo
@ 2022-02-09 9:23 ` Michael S. Tsirkin
2022-02-09 11:27 ` Xuan Zhuo
0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2022-02-09 9:23 UTC (permalink / raw)
To: Xuan Zhuo; +Cc: virtio-dev, jasowang
On Wed, Feb 09, 2022 at 05:01:58PM +0800, Xuan Zhuo wrote:
> This patch defines some requirements for virtio-net to support reset
> queues.
>
> Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
> ---
> conformance.tex | 2 ++
> content.tex | 19 +++++++++++++++++++
> 2 files changed, 21 insertions(+)
>
> diff --git a/conformance.tex b/conformance.tex
> index 42f8537..52b4879 100644
> --- a/conformance.tex
> +++ b/conformance.tex
> @@ -136,6 +136,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
> \item \ref{drivernormative:Device Types / Network Device / Device Operation / Packet Transmission}
> \item \ref{drivernormative:Device Types / Network Device / Device Operation / Setting Up Receive Buffers}
> \item \ref{drivernormative:Device Types / Network Device / Device Operation / Processing of Incoming Packets}
> +\item \ref{drivernormative:Device Types / Network Device / Device Operation / Reset Virtqueue}
> \item \ref{drivernormative:Device Types / Network Device / Device Operation / Control Virtqueue / Packet Receive Filtering}
> \item \ref{drivernormative:Device Types / Network Device / Device Operation / Control Virtqueue / Setting MAC Address Filtering}
> \item \ref{drivernormative:Device Types / Network Device / Device Operation / Control Virtqueue / Gratuitous Packet Sending}
> @@ -396,6 +397,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
> \item \ref{devicenormative:Device Types / Network Device / Device Operation / Packet Transmission}
> \item \ref{devicenormative:Device Types / Network Device / Device Operation / Setting Up Receive Buffers}
> \item \ref{devicenormative:Device Types / Network Device / Device Operation / Processing of Incoming Packets}
> +\item \ref{devicenormative:Device Types / Network Device / Device Operation / Reset Virtqueue}
> \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Packet Receive Filtering}
> \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Setting MAC Address Filtering}
> \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Gratuitous Packet Sending}
> diff --git a/content.tex b/content.tex
> index c6f116c..ce8e37a 100644
> --- a/content.tex
> +++ b/content.tex
> @@ -4000,6 +4000,25 @@ \subsubsection{Processing of Incoming Packets}\label{sec:Device Types / Network
> #define VIRTIO_NET_HASH_REPORT_UDPv6_EX 9
> \end{lstlisting}
>
> +\subsubsection{Reset Virtqueue}\label{sec:Device Types / Network Device / Device Operation / Reset Virtqueue}
> +
> +The receive and transmission virtqueues can implement reset based on Virtqueue
> +Reset (See \ref{sec:Basic Facilities of a Virtio Device / Virtqueues / Virtqueue Reset}).
> +
> +\drivernormative{\paragraph}{Gratuitous Packet Sending}{Device Types / Network Device / Device Operation / Reset Virtqueue}
> +
> +The driver MUST NOT reset the control virtqueue.
Why not though? I am guessing if it does and command is in
progress, it won't know if it completed. So it's safest to retry
then? Reset as a way to recover from a VQ error seems useful for CVQ,
I don't like disabling it like this.
Besides, it's probably too late to make this change for 1.2 ...
> +
> +\devicenormative{\paragraph}{Gratuitous Packet Sending}{Device Types / Network Device / Device Operation / Reset Virtqueue}
> +
> +After automatic receive steering or RSS receive steering has completed the
> +selection of the queue, if the destination receive queue is in reset state,
> +the device MUST re-select a different random queue. If all receive queues are in
> +reset state, the device can drop the packet.
> +
> +A virtio-net device MUST support the above requirements in order to support
> +VIRTIO_F_RING_RESET.
> +
This is more a quality of implementation issue, no? So I'd say SHOULD
here.
> \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue}
>
> The driver uses the control virtqueue (if VIRTIO_NET_F_CTRL_VQ is
> --
> 2.31.0
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* [virtio-dev] Re: [PATCH] virtio-net: support reset queue
2022-02-09 9:23 ` [virtio-dev] " Michael S. Tsirkin
@ 2022-02-09 11:27 ` Xuan Zhuo
0 siblings, 0 replies; 3+ messages in thread
From: Xuan Zhuo @ 2022-02-09 11:27 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: virtio-dev, jasowang
On Wed, 9 Feb 2022 04:23:17 -0500, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Wed, Feb 09, 2022 at 05:01:58PM +0800, Xuan Zhuo wrote:
> > This patch defines some requirements for virtio-net to support reset
> > queues.
> >
> > Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
> > ---
> > conformance.tex | 2 ++
> > content.tex | 19 +++++++++++++++++++
> > 2 files changed, 21 insertions(+)
> >
> > diff --git a/conformance.tex b/conformance.tex
> > index 42f8537..52b4879 100644
> > --- a/conformance.tex
> > +++ b/conformance.tex
> > @@ -136,6 +136,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
> > \item \ref{drivernormative:Device Types / Network Device / Device Operation / Packet Transmission}
> > \item \ref{drivernormative:Device Types / Network Device / Device Operation / Setting Up Receive Buffers}
> > \item \ref{drivernormative:Device Types / Network Device / Device Operation / Processing of Incoming Packets}
> > +\item \ref{drivernormative:Device Types / Network Device / Device Operation / Reset Virtqueue}
> > \item \ref{drivernormative:Device Types / Network Device / Device Operation / Control Virtqueue / Packet Receive Filtering}
> > \item \ref{drivernormative:Device Types / Network Device / Device Operation / Control Virtqueue / Setting MAC Address Filtering}
> > \item \ref{drivernormative:Device Types / Network Device / Device Operation / Control Virtqueue / Gratuitous Packet Sending}
> > @@ -396,6 +397,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
> > \item \ref{devicenormative:Device Types / Network Device / Device Operation / Packet Transmission}
> > \item \ref{devicenormative:Device Types / Network Device / Device Operation / Setting Up Receive Buffers}
> > \item \ref{devicenormative:Device Types / Network Device / Device Operation / Processing of Incoming Packets}
> > +\item \ref{devicenormative:Device Types / Network Device / Device Operation / Reset Virtqueue}
> > \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Packet Receive Filtering}
> > \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Setting MAC Address Filtering}
> > \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Gratuitous Packet Sending}
> > diff --git a/content.tex b/content.tex
> > index c6f116c..ce8e37a 100644
> > --- a/content.tex
> > +++ b/content.tex
> > @@ -4000,6 +4000,25 @@ \subsubsection{Processing of Incoming Packets}\label{sec:Device Types / Network
> > #define VIRTIO_NET_HASH_REPORT_UDPv6_EX 9
> > \end{lstlisting}
> >
> > +\subsubsection{Reset Virtqueue}\label{sec:Device Types / Network Device / Device Operation / Reset Virtqueue}
> > +
> > +The receive and transmission virtqueues can implement reset based on Virtqueue
> > +Reset (See \ref{sec:Basic Facilities of a Virtio Device / Virtqueues / Virtqueue Reset}).
> > +
> > +\drivernormative{\paragraph}{Gratuitous Packet Sending}{Device Types / Network Device / Device Operation / Reset Virtqueue}
> > +
> > +The driver MUST NOT reset the control virtqueue.
>
> Why not though? I am guessing if it does and command is in
> progress, it won't know if it completed. So it's safest to retry
> then? Reset as a way to recover from a VQ error seems useful for CVQ,
> I don't like disabling it like this.
> Besides, it's probably too late to make this change for 1.2 ...
I think there should be no need to reset cvq. So this setting is added.
I will remove this in the next version.
>
> > +
> > +\devicenormative{\paragraph}{Gratuitous Packet Sending}{Device Types / Network Device / Device Operation / Reset Virtqueue}
> > +
> > +After automatic receive steering or RSS receive steering has completed the
> > +selection of the queue, if the destination receive queue is in reset state,
> > +the device MUST re-select a different random queue. If all receive queues are in
> > +reset state, the device can drop the packet.
> > +
> > +A virtio-net device MUST support the above requirements in order to support
> > +VIRTIO_F_RING_RESET.
> > +
>
> This is more a quality of implementation issue, no? So I'd say SHOULD
> here.
OK.
Thanks.
>
> > \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue}
> >
> > The driver uses the control virtqueue (if VIRTIO_NET_F_CTRL_VQ is
> > --
> > 2.31.0
>
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-09 11:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-09 9:01 [virtio-dev] [PATCH] virtio-net: support reset queue Xuan Zhuo
2022-02-09 9:23 ` [virtio-dev] " Michael S. Tsirkin
2022-02-09 11:27 ` Xuan Zhuo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox