virtio-comment.lists.oasis-open.org archive mirror
 help / color / mirror / Atom feed
From: Parav Pandit <parav@nvidia.com>
To: Halil Pasic <pasic@linux.ibm.com>
Cc: "mst@redhat.com" <mst@redhat.com>,
	"virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	"cohuck@redhat.com" <cohuck@redhat.com>,
	"sgarzare@redhat.com" <sgarzare@redhat.com>,
	"virtio-comment@lists.oasis-open.org"
	<virtio-comment@lists.oasis-open.org>,
	Shahaf Shuler <shahafs@nvidia.com>,
	Max Gurtovoy <mgurtovoy@nvidia.com>, Jiri Pirko <jiri@nvidia.com>
Subject: RE: [virtio-comment] [PATCH v10 2/8] transport-pci: Refer to the vq by its number
Date: Thu, 30 Mar 2023 19:00:34 +0000	[thread overview]
Message-ID: <PH0PR12MB54816E90836D80B4DBB9CA45DC8E9@PH0PR12MB5481.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20230330191019.5a7a10c9.pasic@linux.ibm.com>


> From: Halil Pasic <pasic@linux.ibm.com>
> Sent: Thursday, March 30, 2023 1:10 PM

> > -        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...
> 
Instead of vqn, it is just q identifier.
Sometimes is vqn, sometimes its q config data.
Currently wording has taken care of it.
But a better field name can also do it in future.

> >          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.
> 
Not sure I follow. It is the vqn of above case in trivial case.

> > @@ -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.
> 
The current wording is written bit simpler than above multiple if-else. :)

> 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.
> 
And also, the upcoming patches to use either one of them that uses vqn at multiple places.
And you have already voted for vqn in the new patches ballot yesterday.

> For b) we are going down a different route calling those receive queue ids
> (AFAIR), and for the notifications part see my comments above.
> 
This would be done anyway regardless of picking "index" vs "number".

> 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.

I think the filed name "vqn" in the notification area can be improved.
The main reason I didn't touch it much, because CONFIG_DATA has rare usage in most virtualized world, real devices will not implement it.
After 2+ years of introduction in the spec, no open-source user has find it useful yet.
May be some use it there.
So if there is motivation, we can rename the vqn field and further improve the language.

I will surely read through other proposal anyway.
Thanks for taking time into this.

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/


  reply	other threads:[~2023-03-30 19:00 UTC|newest]

Thread overview: 30+ 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-comment] [PATCH v10 1/8] content: Add vq number text Parav Pandit
2023-03-30  7:44   ` [virtio-comment] " 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-30 17:10   ` Halil Pasic
2023-03-30 19:00     ` Parav Pandit [this message]
2023-03-29 21:23 ` [virtio-comment] [PATCH v10 3/8] transport-mmio: Rename QueueNum register 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-comment] [PATCH v10 5/8] transport-ccw: Rename queue depth/size to other transports 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-30  7:48   ` [virtio-comment] " Cornelia Huck
2023-03-29 21:23 ` [virtio-comment] [PATCH v10 7/8] virtio-net: Avoid duplicate receive queue example Parav Pandit
2023-03-30  7:53   ` [virtio-comment] " 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-30  9:17   ` [virtio-comment] " Cornelia Huck
2023-04-03 22:29     ` [virtio-comment] " Parav Pandit
2023-04-04  8:15       ` Cornelia Huck
2023-04-04 16:11         ` 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 19:13   ` [virtio-comment] " Parav Pandit
2023-04-04  1:36     ` [virtio-comment] " Halil Pasic
2023-04-04  2:57       ` Parav Pandit
2023-04-04  6:33         ` Michael S. Tsirkin
2023-04-04 16:44           ` Halil Pasic
2023-04-04  7:07         ` Michael S. Tsirkin
2023-04-04 15:55           ` Halil Pasic
2023-04-04 16:08             ` Cornelia Huck
2023-04-04  7:13         ` Michael S. Tsirkin
2023-03-31  8:13   ` Cornelia Huck
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=PH0PR12MB54816E90836D80B4DBB9CA45DC8E9@PH0PR12MB5481.namprd12.prod.outlook.com \
    --to=parav@nvidia.com \
    --cc=cohuck@redhat.com \
    --cc=jiri@nvidia.com \
    --cc=mgurtovoy@nvidia.com \
    --cc=mst@redhat.com \
    --cc=pasic@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).