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: RE: [virtio-comment] Re: [PATCH 0/3] Rename queue index to queue number



> From: virtio-comment@lists.oasis-open.org <virtio-comment@lists.oasis-
> open.org> On Behalf Of Halil Pasic
> 
> 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.htm
> > > l
> >
> > 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.
> """
With vqn it can be as simply written as.
Field \field{unclassified_queue} contains the receive virtqueue number to use for unclassified incoming packets.

Similarly rss description can be simplified.

> 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)
> 
Receiveq1 is a name to virtuque number (currently index) 0.
And naming this way doesn't seem to be a problem in the description.

Section 5.1.2 is liste them already.
A short line tell about this mapping will suffice.

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

> If the 1 based naming is really just
> constrained to the spec, we can change it without problem.
Yes, most changes are trivial I looked at.
 



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