From: Halil Pasic <pasic@linux.ibm.com>
To: Parav Pandit <parav@nvidia.com>
Cc: <mst@redhat.com>, <virtio-dev@lists.oasis-open.org>,
<cohuck@redhat.com>, <sgarzare@redhat.com>,
<virtio-comment@lists.oasis-open.org>, <shahafs@nvidia.com>,
Max Gurtovoy <mgurtovoy@nvidia.com>, Jiri Pirko <jiri@nvidia.com>,
Halil Pasic <pasic@linux.ibm.com>
Subject: Re: [virtio-comment] [PATCH v10 2/8] transport-pci: Refer to the vq by its number
Date: Thu, 30 Mar 2023 19:10:19 +0200 [thread overview]
Message-ID: <20230330191019.5a7a10c9.pasic@linux.ibm.com> (raw)
In-Reply-To: <20230329212341.465843-3-parav@nvidia.com>
On Thu, 30 Mar 2023 00:23:35 +0300
Parav Pandit <parav@nvidia.com> wrote:
> Currently specification uses virtqueue index and
> number interchangeably to refer to the virtqueue.
>
> Instead refer to it by its number.
>
> Fixes: https://github.com/oasis-tcs/virtio-spec/issues/163
> Reviewed-by: Cornelia Huck <cohuck@redhat.com>
> Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Parav Pandit <parav@nvidia.com>
> ---
[..]
> transport-pci.tex | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/transport-pci.tex b/transport-pci.tex
> index b07a822..0f3a48b 100644
> --- a/transport-pci.tex
> +++ b/transport-pci.tex
> @@ -390,13 +390,14 @@ \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport
>
> \item[\field{queue_notify_data}]
> This field exists only if VIRTIO_F_NOTIF_CONFIG_DATA has been negotiated.
> - The driver will use this value to put it in the 'virtqueue number' field
> + The driver uses this value in the field \field{vqn}
This is one of the problems with this approach...
> in the available buffer notification structure.
> See section \ref{sec:Virtio Transport Options / Virtio Over PCI Bus / PCI-specific Initialization And Device Operation / Available Buffer Notifications}.
> \begin{note}
> This field provides the device with flexibility to determine how virtqueues
> will be referred to in available buffer notifications.
> - In a trivial case the device can set \field{queue_notify_data}=vqn. Some devices
> + In a trivial case the device can set
> + \field{queue_notify_data} to the vq number. Some devices
... the 'vq' number here is not the same vqn above which renders the usage
of vqn ambiguous.
> @@ -1053,7 +1054,7 @@ \subsubsection{Available Buffer Notifications}\label{sec:Virtio Transport Option
> If VIRTIO_F_NOTIF_CONFIG_DATA has been negotiated:
> \begin{itemize}
> \item If VIRTIO_F_NOTIFICATION_DATA has not been negotiated, the driver MUST use the
> -\field{queue_notify_data} value instead of the virtqueue index.
> +\field{queue_notify_data} value instead of the vq number.
> \item If VIRTIO_F_NOTIFICATION_DATA has been negotiated, the driver MUST set the
> \field{vqn} field to the \field{queue_notify_data} value.
And here it is really obvious: if VIRTIO_F_NOTIF_CONFIG_DATA has been negotiated
the field \field{vqn} does not hold a virtqueue number/vq nuber/vqn but
a device supplied identifier which may or may not be same as the vqn.
So we went
from:
if !VIRTIO_F_NOTIF_CONFIG_DATA then vqn is the virtqueue index
if !!VIRTIO_F_NOTIF_CONFIG_DATA then vqn is queue_notify_data which may
or may not be the same as the virtqueue index
to
if !VIRTIO_F_NOTIF_CONFIG_DATA then vqn is the vq number
if !!VIRTIO_F_NOTIF_CONFIG_DATA then vqn is queue_notify_data which may
or may not be the same as the vq number.
Which is my opinion less clear that what we had before. And in my opinion
calling the very same thing virtqueue und vq number interchangeably is
not helpful either -- makes grepping harder.
I don't see the benefit of replacing virtqueue index with virtqueue
number. AFAIR the supposed benefit was to:
a) harmonize the terminology in the notifications part with the rest of
the spec
b) to resolve the RSS problematic with its receive virtqueue indexes.
For b) we are going down a different route calling those receive queue
ids (AFAIR), and for the notifications part see my comments above.
I'm about to reply to the cover letter, and make my argument against
standardizing virtqueue nuber (and in favor of standardizing on the
on virtqueue index) along with a diff that is supposed to act as
a counter proposal. If that doesn't work I will give up and make peace
with vq number and vqn.
Regards,
Halil
> \end{itemize}
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/
WARNING: multiple messages have this Message-ID (diff)
From: Halil Pasic <pasic@linux.ibm.com>
To: Parav Pandit <parav@nvidia.com>
Cc: <mst@redhat.com>, <virtio-dev@lists.oasis-open.org>,
<cohuck@redhat.com>, <sgarzare@redhat.com>,
<virtio-comment@lists.oasis-open.org>, <shahafs@nvidia.com>,
Max Gurtovoy <mgurtovoy@nvidia.com>, Jiri Pirko <jiri@nvidia.com>,
Halil Pasic <pasic@linux.ibm.com>
Subject: [virtio-dev] Re: [virtio-comment] [PATCH v10 2/8] transport-pci: Refer to the vq by its number
Date: Thu, 30 Mar 2023 19:10:19 +0200 [thread overview]
Message-ID: <20230330191019.5a7a10c9.pasic@linux.ibm.com> (raw)
In-Reply-To: <20230329212341.465843-3-parav@nvidia.com>
On Thu, 30 Mar 2023 00:23:35 +0300
Parav Pandit <parav@nvidia.com> wrote:
> Currently specification uses virtqueue index and
> number interchangeably to refer to the virtqueue.
>
> Instead refer to it by its number.
>
> Fixes: https://github.com/oasis-tcs/virtio-spec/issues/163
> Reviewed-by: Cornelia Huck <cohuck@redhat.com>
> Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Parav Pandit <parav@nvidia.com>
> ---
[..]
> transport-pci.tex | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/transport-pci.tex b/transport-pci.tex
> index b07a822..0f3a48b 100644
> --- a/transport-pci.tex
> +++ b/transport-pci.tex
> @@ -390,13 +390,14 @@ \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport
>
> \item[\field{queue_notify_data}]
> This field exists only if VIRTIO_F_NOTIF_CONFIG_DATA has been negotiated.
> - The driver will use this value to put it in the 'virtqueue number' field
> + The driver uses this value in the field \field{vqn}
This is one of the problems with this approach...
> in the available buffer notification structure.
> See section \ref{sec:Virtio Transport Options / Virtio Over PCI Bus / PCI-specific Initialization And Device Operation / Available Buffer Notifications}.
> \begin{note}
> This field provides the device with flexibility to determine how virtqueues
> will be referred to in available buffer notifications.
> - In a trivial case the device can set \field{queue_notify_data}=vqn. Some devices
> + In a trivial case the device can set
> + \field{queue_notify_data} to the vq number. Some devices
... the 'vq' number here is not the same vqn above which renders the usage
of vqn ambiguous.
> @@ -1053,7 +1054,7 @@ \subsubsection{Available Buffer Notifications}\label{sec:Virtio Transport Option
> If VIRTIO_F_NOTIF_CONFIG_DATA has been negotiated:
> \begin{itemize}
> \item If VIRTIO_F_NOTIFICATION_DATA has not been negotiated, the driver MUST use the
> -\field{queue_notify_data} value instead of the virtqueue index.
> +\field{queue_notify_data} value instead of the vq number.
> \item If VIRTIO_F_NOTIFICATION_DATA has been negotiated, the driver MUST set the
> \field{vqn} field to the \field{queue_notify_data} value.
And here it is really obvious: if VIRTIO_F_NOTIF_CONFIG_DATA has been negotiated
the field \field{vqn} does not hold a virtqueue number/vq nuber/vqn but
a device supplied identifier which may or may not be same as the vqn.
So we went
from:
if !VIRTIO_F_NOTIF_CONFIG_DATA then vqn is the virtqueue index
if !!VIRTIO_F_NOTIF_CONFIG_DATA then vqn is queue_notify_data which may
or may not be the same as the virtqueue index
to
if !VIRTIO_F_NOTIF_CONFIG_DATA then vqn is the vq number
if !!VIRTIO_F_NOTIF_CONFIG_DATA then vqn is queue_notify_data which may
or may not be the same as the vq number.
Which is my opinion less clear that what we had before. And in my opinion
calling the very same thing virtqueue und vq number interchangeably is
not helpful either -- makes grepping harder.
I don't see the benefit of replacing virtqueue index with virtqueue
number. AFAIR the supposed benefit was to:
a) harmonize the terminology in the notifications part with the rest of
the spec
b) to resolve the RSS problematic with its receive virtqueue indexes.
For b) we are going down a different route calling those receive queue
ids (AFAIR), and for the notifications part see my comments above.
I'm about to reply to the cover letter, and make my argument against
standardizing virtqueue nuber (and in favor of standardizing on the
on virtqueue index) along with a diff that is supposed to act as
a counter proposal. If that doesn't work I will give up and make peace
with vq number and vqn.
Regards,
Halil
> \end{itemize}
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2023-03-30 17:10 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 21:23 [virtio-comment] [PATCH v10 0/8] Rename queue index to queue number Parav Pandit
2023-03-29 21:23 ` [virtio-dev] " Parav Pandit
2023-03-29 21:23 ` [virtio-comment] [PATCH v10 1/8] content: Add vq number text Parav Pandit
2023-03-29 21:23 ` [virtio-dev] " Parav Pandit
2023-03-30 7:44 ` [virtio-comment] " Cornelia Huck
2023-03-30 7:44 ` [virtio-dev] " Cornelia Huck
2023-03-29 21:23 ` [virtio-comment] [PATCH v10 2/8] transport-pci: Refer to the vq by its number Parav Pandit
2023-03-29 21:23 ` [virtio-dev] " Parav Pandit
2023-03-30 17:10 ` Halil Pasic [this message]
2023-03-30 17:10 ` [virtio-dev] Re: [virtio-comment] " Halil Pasic
2023-03-30 19:00 ` Parav Pandit
2023-03-30 19:00 ` [virtio-dev] " Parav Pandit
2023-03-29 21:23 ` [virtio-comment] [PATCH v10 3/8] transport-mmio: Rename QueueNum register Parav Pandit
2023-03-29 21:23 ` [virtio-dev] " Parav Pandit
2023-03-29 21:23 ` [virtio-comment] [PATCH v10 4/8] transport-mmio: Refer to the vq by its number Parav Pandit
2023-03-29 21:23 ` [virtio-dev] " Parav Pandit
2023-03-29 21:23 ` [virtio-comment] [PATCH v10 5/8] transport-ccw: Rename queue depth/size to other transports Parav Pandit
2023-03-29 21:23 ` [virtio-dev] " Parav Pandit
2023-03-29 21:23 ` [virtio-comment] [PATCH v10 6/8] transport-ccw: Refer to the vq by its number Parav Pandit
2023-03-29 21:23 ` [virtio-dev] " Parav Pandit
2023-03-30 7:48 ` [virtio-comment] " Cornelia Huck
2023-03-30 7:48 ` [virtio-dev] " Cornelia Huck
2023-03-29 21:23 ` [virtio-comment] [PATCH v10 7/8] virtio-net: Avoid duplicate receive queue example Parav Pandit
2023-03-29 21:23 ` [virtio-dev] " Parav Pandit
2023-03-30 7:53 ` [virtio-comment] " Cornelia Huck
2023-03-30 7:53 ` [virtio-dev] " Cornelia Huck
2023-03-29 21:23 ` [virtio-comment] [PATCH v10 8/8] virtio-net: Describe RSS using rss rq id Parav Pandit
2023-03-29 21:23 ` [virtio-dev] " Parav Pandit
2023-03-30 9:17 ` [virtio-comment] " Cornelia Huck
2023-03-30 9:17 ` [virtio-dev] " Cornelia Huck
2023-04-03 22:29 ` [virtio-comment] " Parav Pandit
2023-04-03 22:29 ` [virtio-dev] " Parav Pandit
2023-04-04 8:15 ` [virtio-comment] " Cornelia Huck
2023-04-04 8:15 ` [virtio-dev] " Cornelia Huck
2023-04-04 16:11 ` Parav Pandit
2023-04-04 16:11 ` [virtio-dev] " Parav Pandit
2023-03-30 17:11 ` [virtio-comment] Re: [virtio-dev] [PATCH v10 0/8] Rename queue index to queue number Halil Pasic
2023-03-30 17:11 ` Halil Pasic
2023-03-30 19:13 ` [virtio-comment] " Parav Pandit
2023-03-30 19:13 ` Parav Pandit
2023-04-04 1:36 ` [virtio-comment] " Halil Pasic
2023-04-04 1:36 ` Halil Pasic
2023-04-04 2:57 ` [virtio-comment] " Parav Pandit
2023-04-04 2:57 ` Parav Pandit
2023-04-04 6:33 ` [virtio-comment] " Michael S. Tsirkin
2023-04-04 6:33 ` Michael S. Tsirkin
2023-04-04 16:44 ` [virtio-comment] " Halil Pasic
2023-04-04 16:44 ` [virtio-dev] " Halil Pasic
2023-04-04 7:07 ` Michael S. Tsirkin
2023-04-04 7:07 ` Michael S. Tsirkin
2023-04-04 15:55 ` [virtio-comment] " Halil Pasic
2023-04-04 15:55 ` Halil Pasic
2023-04-04 16:08 ` [virtio-comment] " Cornelia Huck
2023-04-04 16:08 ` [virtio-dev] " Cornelia Huck
2023-04-04 7:13 ` Michael S. Tsirkin
2023-04-04 7:13 ` Michael S. Tsirkin
2023-03-31 8:13 ` [virtio-comment] " Cornelia Huck
2023-03-31 8:13 ` Cornelia Huck
2023-04-04 6:34 ` [virtio-comment] " Michael S. Tsirkin
2023-04-04 6:34 ` 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=20230330191019.5a7a10c9.pasic@linux.ibm.com \
--to=pasic@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=jiri@nvidia.com \
--cc=mgurtovoy@nvidia.com \
--cc=mst@redhat.com \
--cc=parav@nvidia.com \
--cc=sgarzare@redhat.com \
--cc=shahafs@nvidia.com \
--cc=virtio-comment@lists.oasis-open.org \
--cc=virtio-dev@lists.oasis-open.org \
/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 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.