[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-comment] Re: [PATCH 0/3] Rename queue index to queue number
On Mon, 27 Feb 2023 12:39:39 -0500 "Michael S. Tsirkin" <mst@redhat.com> wrote: > > This series is on top of [2]. > > > > [1] https://github.com/oasis-tcs/virtio-spec/issues/163 > > [2] https://lists.oasis-open.org/archives/virtio-dev/202302/msg00527.html > > What about RSS description in net? That says: > > description.tex:Field \field{unclassified_queue} contains the 0-based index of > > is the index same as vq number? or something different? It is something different. The full paragraph sound like this """ Field \field{unclassified_queue} contains the 0-based index of the receive virtqueue to place unclassified packets in. Index 0 corresponds to receiveq1. """ Here follows the explanation. Disclaimer: For a brief math background see [1] and [2]. Here the index set the set of natural numbers (which includes 0, the neutral element for the addition operation). The indexed set is the set of receive virtqueues, each member of that set is associated with an unique member of the index set. """ \subsection{Virtqueues}\label{sec:Device Types / Network Device / Virtqueues} \begin{description} \item[0] receiveq1 \item[1] transmitq1 \item[\ldots] \item[2(N-1)] receiveqN \item[2(N-1)+1] transmitqN \item[2N] controlq \end{description} """ But, as seen above, we happen to also use an other index set for the receive queues of an virtio-net device. I guess the intention is to use these as names, in any case the set is { "receiveq1", "receiveq2", ... } (yes, I'm a little sloppy here). Thus we can say that: * the virtqueue index 2*(N-1) * the recieve virtqueue index N-1, and the * virtqueue name receiveqN refer to the very same virtqueue (for each N > 0) And it depends on the context which scheme do we use. As far as I remember the names are not a part of any virtio interface. I.e. they are only there for the convenience of the spec and the reader. We could get rid of those. Although the possibility of corresponding to some network device, Linux network device or tooling naming convention is also to consider. But AFAIU Linux uses 0 based indexing for the rx and tx queues. If the 1 based naming is really just constrained to the spec, we can change it without problem. Regards, Halil [1] https://en.wikipedia.org/wiki/Index_set [2] https://en.wikipedia.org/wiki/Indexed_family
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]