From: "Michael S. Tsirkin" <mst@redhat.com>
To: Max Gurtovoy <mgurtovoy@nvidia.com>
Cc: Parav Pandit <parav@nvidia.com>,
"virtio-comment@lists.oasis-open.org"
<virtio-comment@lists.oasis-open.org>,
"virtio-dev@lists.oasis-open.org"
<virtio-dev@lists.oasis-open.org>,
"jasowang@redhat.com" <jasowang@redhat.com>,
"cohuck@redhat.com" <cohuck@redhat.com>,
"sgarzare@redhat.com" <sgarzare@redhat.com>,
"stefanha@redhat.com" <stefanha@redhat.com>,
"nrupal.jani@intel.com" <nrupal.jani@intel.com>,
"Piotr.Uminski@intel.com" <Piotr.Uminski@intel.com>,
"hang.yuan@intel.com" <hang.yuan@intel.com>,
"virtio@lists.oasis-open.org" <virtio@lists.oasis-open.org>,
Jiri Pirko <jiri@nvidia.com>,
Zhu Lingshan <lingshan.zhu@intel.com>,
"pasic@linux.ibm.com" <pasic@linux.ibm.com>,
Shahaf Shuler <shahafs@nvidia.com>
Subject: [virtio-comment] Re: [PATCH v12 05/10] pci: add admin vq registers to virtio over pci
Date: Thu, 27 Apr 2023 13:57:59 -0400 [thread overview]
Message-ID: <20230427135654-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <b7addd39-d913-700f-ac67-1412825d580b@nvidia.com>
On Thu, Apr 27, 2023 at 01:31:29AM +0300, Max Gurtovoy wrote:
>
>
> On 27/04/2023 1:11, Parav Pandit wrote:
> >
> > > From: Max Gurtovoy <mgurtovoy@nvidia.com>
> > > Sent: Wednesday, April 26, 2023 5:12 PM
> > >
> > > On 25/04/2023 1:14, Parav Pandit wrote:
> > > >
> > > >
> > > > On 4/24/2023 6:06 PM, Max Gurtovoy wrote:
> > > >
> > > > > > +If VIRTIO_F_ADMIN_VQ has been negotiated, and if the driver
> > > > > > +configures any administration virtqueues, the driver MUST configure
> > > > > > +the administration virtqueues using the index in the range
> > > > > > +\field{admin_queue_index} to \field{admin_queue_index} +
> > > > > > +\field{admin_queue_num} - 1 inclusive.
> > > > > > +The driver MAY configure less administration virtqueues than
> > > > > > +supported by the device.
> > > > >
> > > > > we need to say something about other virtq's indexes.
> > > > > For example, if aq index = 0 then for the vblk device the request
> > > > > queues would start from index = 1.
> > > > >
> > > > > can we address this ?
> > > >
> > > > It may slightly complicate the device implementation when device
> > > > dynamically changes the VQ indices based on the negotiation of the
> > > > feature bit.
> > > > Also the drivers with and without need a different VQ index handling.
> > > >
> > > > I am thinking that aq index should not overlap with the vq index in
> > > > range exposed by num_queues field.
> > > >
> > > > This also aligns to the exclusion of aq count from num_queues field.
> > >
> > > The namespace of the aq and other vq index is the same.
> > > And the configuration is done using the same queue_select and other registers.
> > > Thus, we need to address the above comment otherwise all the device
> > > virtqueues chapters are wrong.
> >
> > Michael has added below line in this patch in num_queues description so it covers the exclusion part.
> >
> > + This excludes administration virtqueues if any are supported.
> >
>
> This is not related to what I was talking about.
>
> For example if vnet device:
>
> 0 receiveq1
> 1 transmitq1
> ...
> 2(N-1) receiveqN
> 2(N-1)+1 transmitqN
> 2N controlq
> N=1 if neither VIRTIO_NET_F_MQ nor VIRTIO_NET_F_RSS are negotiated,
> otherwise N is set by max_-
> virtqueue_pairs.
> controlq only exists if VIRTIO_NET_F_CTRL_VQ set
>
> and in vfs device:
>
> 0 hiprio
> 1...n request queues
>
> So if one device will expose adminq that will be with index 0 the above is
> wrong description.
>
> Agree that this should be addressed ?
It's addressed by patch 9:
+If VIRTIO_F_ADMIN_VQ has been negotiated, the value
+\field{admin_queue_index} MUST be equal to, or bigger than
+\field{num_queues}; also, \field{admin_queue_num} MUST be
+smaller than, or equal to 0x10000 - \field{admin_queue_index},
+to ensure that indices of valid admin queues fit into
+a 16 bit range beyond all other virtqueues.
Thus adminq can not have index 0.
--
MST
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: "Michael S. Tsirkin" <mst@redhat.com>
To: Max Gurtovoy <mgurtovoy@nvidia.com>
Cc: Parav Pandit <parav@nvidia.com>,
"virtio-comment@lists.oasis-open.org"
<virtio-comment@lists.oasis-open.org>,
"virtio-dev@lists.oasis-open.org"
<virtio-dev@lists.oasis-open.org>,
"jasowang@redhat.com" <jasowang@redhat.com>,
"cohuck@redhat.com" <cohuck@redhat.com>,
"sgarzare@redhat.com" <sgarzare@redhat.com>,
"stefanha@redhat.com" <stefanha@redhat.com>,
"nrupal.jani@intel.com" <nrupal.jani@intel.com>,
"Piotr.Uminski@intel.com" <Piotr.Uminski@intel.com>,
"hang.yuan@intel.com" <hang.yuan@intel.com>,
"virtio@lists.oasis-open.org" <virtio@lists.oasis-open.org>,
Jiri Pirko <jiri@nvidia.com>,
Zhu Lingshan <lingshan.zhu@intel.com>,
"pasic@linux.ibm.com" <pasic@linux.ibm.com>,
Shahaf Shuler <shahafs@nvidia.com>
Subject: [virtio-dev] Re: [PATCH v12 05/10] pci: add admin vq registers to virtio over pci
Date: Thu, 27 Apr 2023 13:57:59 -0400 [thread overview]
Message-ID: <20230427135654-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <b7addd39-d913-700f-ac67-1412825d580b@nvidia.com>
On Thu, Apr 27, 2023 at 01:31:29AM +0300, Max Gurtovoy wrote:
>
>
> On 27/04/2023 1:11, Parav Pandit wrote:
> >
> > > From: Max Gurtovoy <mgurtovoy@nvidia.com>
> > > Sent: Wednesday, April 26, 2023 5:12 PM
> > >
> > > On 25/04/2023 1:14, Parav Pandit wrote:
> > > >
> > > >
> > > > On 4/24/2023 6:06 PM, Max Gurtovoy wrote:
> > > >
> > > > > > +If VIRTIO_F_ADMIN_VQ has been negotiated, and if the driver
> > > > > > +configures any administration virtqueues, the driver MUST configure
> > > > > > +the administration virtqueues using the index in the range
> > > > > > +\field{admin_queue_index} to \field{admin_queue_index} +
> > > > > > +\field{admin_queue_num} - 1 inclusive.
> > > > > > +The driver MAY configure less administration virtqueues than
> > > > > > +supported by the device.
> > > > >
> > > > > we need to say something about other virtq's indexes.
> > > > > For example, if aq index = 0 then for the vblk device the request
> > > > > queues would start from index = 1.
> > > > >
> > > > > can we address this ?
> > > >
> > > > It may slightly complicate the device implementation when device
> > > > dynamically changes the VQ indices based on the negotiation of the
> > > > feature bit.
> > > > Also the drivers with and without need a different VQ index handling.
> > > >
> > > > I am thinking that aq index should not overlap with the vq index in
> > > > range exposed by num_queues field.
> > > >
> > > > This also aligns to the exclusion of aq count from num_queues field.
> > >
> > > The namespace of the aq and other vq index is the same.
> > > And the configuration is done using the same queue_select and other registers.
> > > Thus, we need to address the above comment otherwise all the device
> > > virtqueues chapters are wrong.
> >
> > Michael has added below line in this patch in num_queues description so it covers the exclusion part.
> >
> > + This excludes administration virtqueues if any are supported.
> >
>
> This is not related to what I was talking about.
>
> For example if vnet device:
>
> 0 receiveq1
> 1 transmitq1
> ...
> 2(N-1) receiveqN
> 2(N-1)+1 transmitqN
> 2N controlq
> N=1 if neither VIRTIO_NET_F_MQ nor VIRTIO_NET_F_RSS are negotiated,
> otherwise N is set by max_-
> virtqueue_pairs.
> controlq only exists if VIRTIO_NET_F_CTRL_VQ set
>
> and in vfs device:
>
> 0 hiprio
> 1...n request queues
>
> So if one device will expose adminq that will be with index 0 the above is
> wrong description.
>
> Agree that this should be addressed ?
It's addressed by patch 9:
+If VIRTIO_F_ADMIN_VQ has been negotiated, the value
+\field{admin_queue_index} MUST be equal to, or bigger than
+\field{num_queues}; also, \field{admin_queue_num} MUST be
+smaller than, or equal to 0x10000 - \field{admin_queue_index},
+to ensure that indices of valid admin queues fit into
+a 16 bit range beyond all other virtqueues.
Thus adminq can not have index 0.
--
MST
---------------------------------------------------------------------
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-04-27 17:58 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-24 16:44 [virtio-comment] [PATCH v12 00/10] Introduce device group and device management Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-dev] " Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-comment] [PATCH v12 01/10] virtio: document forward compatibility guarantees Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-dev] " Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-comment] [PATCH v12 02/10] admin: introduce device group and related concepts Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-dev] " Michael S. Tsirkin
2023-04-24 21:02 ` [virtio-comment] " Max Gurtovoy
2023-04-24 21:47 ` Parav Pandit
2023-04-24 21:47 ` [virtio-dev] " Parav Pandit
2023-04-24 16:44 ` [virtio-comment] [PATCH v12 03/10] admin: introduce group administration commands Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-dev] " Michael S. Tsirkin
2023-04-24 21:29 ` [virtio-comment] " Max Gurtovoy
2023-04-24 21:33 ` Michael S. Tsirkin
2023-04-24 21:33 ` [virtio-dev] " Michael S. Tsirkin
2023-04-24 22:07 ` [virtio-comment] " Parav Pandit
2023-04-24 22:07 ` [virtio-dev] " Parav Pandit
2023-04-25 6:20 ` [virtio-comment] " Michael S. Tsirkin
2023-04-25 6:20 ` [virtio-dev] " Michael S. Tsirkin
2023-04-25 13:25 ` [virtio-comment] " Parav Pandit
2023-04-25 13:25 ` [virtio-dev] " Parav Pandit
2023-04-25 13:31 ` [virtio-comment] " Michael S. Tsirkin
2023-04-25 13:31 ` [virtio-dev] " Michael S. Tsirkin
2023-04-25 13:38 ` [virtio-comment] " Parav Pandit
2023-04-25 13:38 ` [virtio-dev] " Parav Pandit
2023-04-25 20:04 ` [virtio-comment] " Michael S. Tsirkin
2023-04-25 20:04 ` [virtio-dev] " Michael S. Tsirkin
2023-04-25 20:18 ` [virtio-comment] " Parav Pandit
2023-04-25 20:18 ` [virtio-dev] " Parav Pandit
2023-04-25 20:55 ` [virtio-comment] " Michael S. Tsirkin
2023-04-25 20:55 ` [virtio-dev] " Michael S. Tsirkin
2023-04-26 18:18 ` [virtio-comment] " Parav Pandit
2023-04-26 18:18 ` [virtio-dev] " Parav Pandit
2023-04-24 16:44 ` [virtio-comment] [PATCH v12 04/10] admin: introduce virtio admin virtqueues Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-dev] " Michael S. Tsirkin
2023-04-24 22:32 ` [virtio-comment] " Parav Pandit
2023-04-24 22:32 ` [virtio-dev] " Parav Pandit
2023-04-24 16:44 ` [virtio-comment] [PATCH v12 05/10] pci: add admin vq registers to virtio over pci Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-dev] " Michael S. Tsirkin
2023-04-24 22:06 ` [virtio-comment] " Max Gurtovoy
2023-04-24 22:14 ` Parav Pandit
2023-04-24 22:14 ` [virtio-dev] " Parav Pandit
2023-04-26 21:12 ` [virtio-comment] " Max Gurtovoy
2023-04-26 22:11 ` [virtio-comment] " Parav Pandit
2023-04-26 22:11 ` [virtio-dev] " Parav Pandit
2023-04-26 22:31 ` [virtio-comment] " Max Gurtovoy
2023-04-27 0:11 ` [virtio-comment] " Parav Pandit
2023-04-27 0:11 ` [virtio-dev] " Parav Pandit
2023-05-05 15:12 ` [virtio-comment] " Michael S. Tsirkin
2023-05-05 15:12 ` [virtio-dev] " Michael S. Tsirkin
2023-05-05 15:14 ` [virtio-comment] " Parav Pandit
2023-05-05 15:14 ` [virtio-dev] " Parav Pandit
2023-04-27 17:57 ` Michael S. Tsirkin [this message]
2023-04-27 17:57 ` [virtio-dev] " Michael S. Tsirkin
2023-04-27 18:50 ` [virtio-comment] " Max Gurtovoy
2023-05-05 15:22 ` Michael S. Tsirkin
2023-05-05 15:22 ` [virtio-dev] " Michael S. Tsirkin
2023-05-05 15:25 ` [virtio-comment] " Parav Pandit
2023-05-05 15:25 ` [virtio-dev] " Parav Pandit
2023-04-24 22:29 ` [virtio-comment] " Parav Pandit
2023-04-24 22:29 ` [virtio-dev] " Parav Pandit
2023-04-24 16:44 ` [virtio-comment] [PATCH v12 06/10] mmio: document ADMIN_VQ as reserved Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-dev] " Michael S. Tsirkin
2023-04-24 22:08 ` [virtio-comment] " Max Gurtovoy
2023-04-24 16:44 ` [virtio-comment] [PATCH v12 07/10] ccw: " Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-dev] " Michael S. Tsirkin
2023-04-24 22:09 ` [virtio-comment] " Max Gurtovoy
2023-04-24 16:44 ` [virtio-comment] [PATCH v12 08/10] admin: command list discovery Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-dev] " Michael S. Tsirkin
2023-04-24 22:27 ` [virtio-comment] " Parav Pandit
2023-04-24 22:27 ` [virtio-dev] " Parav Pandit
2023-04-24 16:44 ` [virtio-comment] [PATCH v12 09/10] admin: conformance clauses Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-dev] " Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-comment] [PATCH v12 10/10] ccw: document more reserved features Michael S. Tsirkin
2023-04-24 16:44 ` [virtio-dev] " Michael S. Tsirkin
2023-04-24 22:17 ` [virtio-comment] " Parav Pandit
2023-04-24 22:17 ` [virtio-dev] " Parav Pandit
2023-04-24 21:34 ` [virtio-comment] Re: [PATCH v12 00/10] Introduce device group and device management Parav Pandit
2023-04-24 21:34 ` [virtio-dev] " Parav Pandit
2023-05-02 7:51 ` [virtio-comment] Re: [virtio] " David Edmondson
2023-05-02 7:51 ` [virtio-dev] " David Edmondson
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=20230427135654-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=Piotr.Uminski@intel.com \
--cc=cohuck@redhat.com \
--cc=hang.yuan@intel.com \
--cc=jasowang@redhat.com \
--cc=jiri@nvidia.com \
--cc=lingshan.zhu@intel.com \
--cc=mgurtovoy@nvidia.com \
--cc=nrupal.jani@intel.com \
--cc=parav@nvidia.com \
--cc=pasic@linux.ibm.com \
--cc=sgarzare@redhat.com \
--cc=shahafs@nvidia.com \
--cc=stefanha@redhat.com \
--cc=virtio-comment@lists.oasis-open.org \
--cc=virtio-dev@lists.oasis-open.org \
--cc=virtio@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.