OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Network Device virtqueue numbering


Hello virtio-comment,

This is a comment on section "5.1.2 Network Device: virtqueues" of
virtio 1.0 spec CS 04, copied below.

The numbers don't add up. For 1-based N, receiveqN is at index 2N-2,
transmitqN at index 2N-1 and controlq (if present) at index 2N.
Specifically for the N=1 special case mentioned in the paragraph,
controlq would be at index 2 and not 2*1+2 = 4.

This could be fixed either by using the correct queue indices [2N-2,
2N-1, 2N] instead of [2N, 2N+1, 2N+2] or by switching to 0-based
receiveq/transmitq numbering.

Thanks!
Ladi


5.1.2 Virtqueues

0
    receiveq1
1
    transmitq1
…
2N
    receiveqN
2N+1
    transmitqN
2N+2
    controlq

N=1 if VIRTIO_NET_F_MQ is not negotiated, otherwise N is set by
max_virtqueue_pairs.

controlq only exists if VIRTIO_NET_F_CTRL_VQ set.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]