From: Heng Qi <hengqi@linux.alibaba.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: virtio-comment@lists.linux.dev, Jason Wang <jasowang@redhat.com>,
Parav Pandit <parav@nvidia.com>,
Cornelia Huck <cohuck@redhat.com>,
Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Subject: Re: [PATCH v5] virtio-net: clarify coalescing parameters settings
Date: Mon, 17 Jun 2024 10:35:38 +0800 [thread overview]
Message-ID: <1718591738.670476-6-hengqi@linux.alibaba.com> (raw)
In-Reply-To: <20240611184828-mutt-send-email-mst@kernel.org>
On Tue, 11 Jun 2024 19:03:11 -0400, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Tue, May 28, 2024 at 12:47:02PM +0800, Heng Qi wrote:
> > The device can set any initial coalescing parameters (0 or non-zero)
> > for the receive/send queue before the setting command is executed,
> > not just 0, enhancing device performance even without DIM enabled.
> >
> > So we need to clarify descriptions that don't fit the behavior.
> >
> > Fixes: https://github.com/oasis-tcs/virtio-spec/issues/194
> > Suggested-by: Jason Wang <jasowang@redhat.com>
> > Signed-off-by: Heng Qi <hengqi@linux.alibaba.com>
> > Reviewed-by: Parav Pandit <parav@nvidia.com>
> > Reviewed-by: Jason Wang <jasowang@redhat.com>
> > ---
> > v4->v5:
> > - Add RB tags from Parav and Jason. Thanks!
> >
> > v3->v4:
> > - Doesn't force the device to remember more stuff. @Parav
> >
> > v2->v3:
> > - Clarify description to be more generic. @Parav
> >
> > v1->v2:
> > - Update description. @Jason
> >
> > device-types/net/description.tex | 14 +++++++++++---
> > 1 file changed, 11 insertions(+), 3 deletions(-)
> >
> > diff --git a/device-types/net/description.tex b/device-types/net/description.tex
> > index 61cce1f..00c1b36 100644
> > --- a/device-types/net/description.tex
> > +++ b/device-types/net/description.tex
> > @@ -1803,6 +1803,14 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi
> > for an enabled transmit/receive virtqueue whose index is \field{vq_index}.
> > \end{enumerate}
> >
> > +If the VIRTIO_NET_F_NOTF_COAL or VIRTIO_NET_F_VQ_NOTF_COAL feature is negotiated,
> > +the device may apply any coalescing parameters to each transmit/receive virtqueue
> > +before the driver successfully performs one of the VIRTIO_NET_CTRL_NOTF_COAL set commands.
>
> may outside of conformance section, not good.
This is outside of the conformance section. Do you want inside?
>
> > +
> > +The driver can query the coalescing parameters of any enabled transmit/receive
> > +virtqueue using the VIRTIO_NET_CTRL_NOTF_COAL_VQ_GET command, before or after any
> > +VIRTIO_NET_CTRL_NOTF_COAL set command is done.
> > +
>
> Vague. There are just 3 set commands ust list them.
>
> > The device may generate notifications more or less frequently than specified by set commands of the VIRTIO_NET_CTRL_NOTF_COAL class.
> >
> > If coalescing parameters are being set, the device applies the last coalescing parameters set for a
>
> This needs more work but I guess we can skip the above part.
>
> > @@ -1885,17 +1893,17 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi
> > VIRTIO_NET_ERR if the designated virtqueue is not an enabled transmit or receive virtqueue.
> >
> > Upon disabling and re-enabling a transmit virtqueue, the device MUST set the coalescing parameters of the virtqueue
> > -to those configured through the VIRTIO_NET_CTRL_NOTF_COAL_TX_SET command, or, if the driver did not set any TX coalescing parameters, to 0.
> > +to those configured through the VIRTIO_NET_CTRL_NOTF_COAL_TX_SET command, or, if the driver did not set any TX coalescing parameters, the device MAY initialize them to any values.
> >
>
> If device does not initialize them then what?
The device's customized behavior, at least, does not conform to the spec.
> Actually something like
> 0 -> the default TX coalescing parameters chosen by the device?
Deefault coalescing parameters should also have a concrete "value".
>
>
> > Upon disabling and re-enabling a receive virtqueue, the device MUST set the coalescing parameters of the virtqueue
> > -to those configured through the VIRTIO_NET_CTRL_NOTF_COAL_RX_SET command, or, if the driver did not set any RX coalescing parameters, to 0.
> > +to those configured through the VIRTIO_NET_CTRL_NOTF_COAL_RX_SET command, or, if the driver did not set any RX coalescing parameters, the device MAY initialize them to any values.
> >
> > The behavior of the device in response to set commands of the VIRTIO_NET_CTRL_NOTF_COAL class is best-effort:
> > the device MAY generate notifications more or less frequently than specified.
> >
> > A device SHOULD NOT send used buffer notifications to the driver if the notifications are suppressed, even if the notification conditions are met.
> >
> > -Upon reset, a device MUST initialize all coalescing parameters to 0.
> > +Upon reset, a device MAY set any coalescing parameters for all transmit and receive virtqueues.
>
> Confusing.
> This seems to allow any vq to have a different set of parameters.
YES.
> Now if driver calls VIRTIO_NET_CTRL_NOTF_COAL_RX_SET then what?
>
Then the coalescing parameters of all RX queues are updated to the values
set by VIRTIO_NET_CTRL_NOTF_COAL_RX_SET, and the coalescing parameters of all
TX queues continue to retain the previous values.
Thanks.
>
> >
> > \paragraph{Device Statistics}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Device Statistics}
>
>
>
>
> >
> > --
> > 2.32.0.3.g01195cf9f
>
next prev parent reply other threads:[~2024-06-17 2:47 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 4:47 [PATCH v5] virtio-net: clarify coalescing parameters settings Heng Qi
2024-05-28 4:50 ` Heng Qi
2024-05-31 6:36 ` Heng Qi
2024-05-31 9:39 ` Cornelia Huck
2024-06-07 20:02 ` Halil Pasic
2024-06-08 2:34 ` Heng Qi
2024-06-10 12:46 ` Halil Pasic
2024-06-10 13:35 ` Heng Qi
2024-06-10 14:50 ` Michael S. Tsirkin
2024-06-10 15:12 ` Parav Pandit
2024-06-11 14:04 ` Cornelia Huck
2024-06-10 20:19 ` Halil Pasic
2024-06-11 10:40 ` Heng Qi
2024-06-11 16:29 ` Michael S. Tsirkin
2024-06-11 17:43 ` Parav Pandit
2024-06-13 6:13 ` Michael S. Tsirkin
2024-06-17 2:27 ` Heng Qi
2024-06-17 23:31 ` Si-Wei Liu
2024-06-20 7:40 ` Heng Qi
2024-06-21 1:21 ` Si-Wei Liu
2024-06-21 3:24 ` Heng Qi
2024-06-21 23:46 ` Si-Wei Liu
2024-06-22 1:34 ` Heng Qi
2024-06-25 4:51 ` Si-Wei Liu
2024-06-25 5:56 ` Parav Pandit
2024-06-26 1:14 ` Si-Wei Liu
2024-06-27 10:37 ` Halil Pasic
2024-06-27 11:27 ` Parav Pandit
2024-06-27 12:35 ` Michael S. Tsirkin
2024-06-27 12:45 ` Parav Pandit
2024-06-27 12:52 ` Michael S. Tsirkin
2024-06-27 13:03 ` Parav Pandit
2024-06-27 14:59 ` Michael S. Tsirkin
2024-06-27 17:27 ` Si-Wei Liu
2024-06-27 17:14 ` Si-Wei Liu
2024-06-27 22:18 ` Michael S. Tsirkin
2024-06-28 6:56 ` Si-Wei Liu
2024-06-28 8:23 ` Jason Wang
2024-06-28 19:31 ` Si-Wei Liu
2024-06-30 17:04 ` Michael S. Tsirkin
2024-07-03 6:09 ` Jason Wang
2024-07-02 20:37 ` Halil Pasic
2024-07-02 21:04 ` Michael S. Tsirkin
2024-07-03 5:01 ` Jason Wang
2024-06-29 6:47 ` Halil Pasic
2024-06-30 16:55 ` Michael S. Tsirkin
2024-07-02 21:43 ` Halil Pasic
2024-06-27 12:13 ` Parav Pandit
2024-06-27 12:42 ` Michael S. Tsirkin
2024-06-25 7:53 ` Jason Wang
2024-06-25 8:06 ` Michael S. Tsirkin
2024-06-25 8:13 ` Jason Wang
2024-06-25 8:21 ` Michael S. Tsirkin
2024-06-11 23:03 ` Michael S. Tsirkin
2024-06-17 2:35 ` Heng Qi [this message]
2024-06-25 7:26 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1718591738.670476-6-hengqi@linux.alibaba.com \
--to=hengqi@linux.alibaba.com \
--cc=cohuck@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=parav@nvidia.com \
--cc=virtio-comment@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox