Discussion of the VIRTIO specification
 help / color / mirror / Atom feed
* Max number of descriptors in a virtio-blk chain
@ 2026-04-22  8:02 Demi Marie Obenour
  2026-04-22 15:38 ` Matias Ezequiel Vara Larsen
  0 siblings, 1 reply; 3+ messages in thread
From: Demi Marie Obenour @ 2026-04-22  8:02 UTC (permalink / raw)
  To: virtio-comment


[-- Attachment #1.1.1: Type: text/plain, Size: 301 bytes --]

Is there a limit to the number of descriptors that a virtio-blk driver
can use in a request?  In at least Cloud Hypervisor's implementation,
and I suspect others, the device must allocate an array of iovecs as
long as the number of descriptors.
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Max number of descriptors in a virtio-blk chain
  2026-04-22  8:02 Max number of descriptors in a virtio-blk chain Demi Marie Obenour
@ 2026-04-22 15:38 ` Matias Ezequiel Vara Larsen
  2026-04-22 18:11   ` Stefan Hajnoczi
  0 siblings, 1 reply; 3+ messages in thread
From: Matias Ezequiel Vara Larsen @ 2026-04-22 15:38 UTC (permalink / raw)
  To: Demi Marie Obenour; +Cc: virtio-comment

Hello,

On Wed, Apr 22, 2026 at 04:02:06AM -0400, Demi Marie Obenour wrote:
> Is there a limit to the number of descriptors that a virtio-blk driver
> can use in a request?  In at least Cloud Hypervisor's implementation,

I think this is limited to the number of descriptors that you expose to
the device in the descriptor ring. In addition, I think the index is 16
bits long.

Matias

> and I suspect others, the device must allocate an array of iovecs as
> long as the number of descriptors.
> -- 
> Sincerely,
> Demi Marie Obenour (she/her/hers)






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Max number of descriptors in a virtio-blk chain
  2026-04-22 15:38 ` Matias Ezequiel Vara Larsen
@ 2026-04-22 18:11   ` Stefan Hajnoczi
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2026-04-22 18:11 UTC (permalink / raw)
  To: Matias Ezequiel Vara Larsen; +Cc: Demi Marie Obenour, virtio-comment

[-- Attachment #1: Type: text/plain, Size: 896 bytes --]

On Wed, Apr 22, 2026 at 05:38:56PM +0200, Matias Ezequiel Vara Larsen wrote:
> Hello,
> 
> On Wed, Apr 22, 2026 at 04:02:06AM -0400, Demi Marie Obenour wrote:
> > Is there a limit to the number of descriptors that a virtio-blk driver
> > can use in a request?  In at least Cloud Hypervisor's implementation,
> 
> I think this is limited to the number of descriptors that you expose to
> the device in the descriptor ring. In addition, I think the index is 16
> bits long.

Virtqueue size is the upper limit. There are also additional
Configuration Space fields that limit virtio-blk requests:

- seg_max: max number of descriptors in a request
- max_discard_seg: max number of descriptors for discard requests
- max_write_zeroes_seg: max number of descriptors for write zeroes
  requests
- max_secure_erase_seg: max number of descriptors for secure erase
  requests

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-22 18:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-22  8:02 Max number of descriptors in a virtio-blk chain Demi Marie Obenour
2026-04-22 15:38 ` Matias Ezequiel Vara Larsen
2026-04-22 18:11   ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox