[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 Thu, Mar 02, 2023 at 04:06:52PM +0100, Cornelia Huck wrote: > On Wed, Mar 01 2023, "Michael S. Tsirkin" <mst@redhat.com> wrote: > > > On Wed, Mar 01, 2023 at 06:22:07PM +0100, Halil Pasic wrote: > >> On Mon, 27 Feb 2023 09:45:31 +0100 > >> Cornelia Huck <cohuck@redhat.com> wrote: > >> > >> > For the vq index/number, I'm not that sure that "virtqueue number" is > >> > better that "virtqueue index" -- actually, I'd prefer the latter. We'd > >> > need some renaming either way. > >> > >> I prefer index as well. Especially that we start indexing with 0. Also > >> seems to be the more common term for such stuff in both Mathematics and > >> CS. > >> > >> Regards, > >> Halil > > > > > > Basically I am saying that this: > > > > /* Queue size for the currently selected queue - Write Only */ > > #define VIRTIO_MMIO_QUEUE_NUM 0x038 > > > > is a bad name because queue number seems to be ambiguous. > > > > Maybe start with just getting rid of uses of QUEUE_NUM meaning size? > > Nod, that seems to be uncontroversial. > > > > > > > If we want to use queue index we need to fix RSS spec in networking > > since that seems to want to use queue index in a very weird way: > > networking has this idea of calling queues like this: > > receiveq1 receiveq2 .... > > why 1-based? I guess we wanted this to be clear even to a 5 year olds ;) > > > > And then for extra fun, in the RSS section we say "0 based index" where we > > seem to mean "this number in the queue name, but subtract 1 in your head". > > Why subtract 1? I guess we wanted these 5 year olds to practice math ... > > Heh :) > > Yeah, that looks like a mess... I don't think we should use a weird > substraction scheme. I haven't looked at the RSS stuff much, would it be > hard to fix it up? We can't change the ABI, I guess we can say that it's bits 1 to 15 of the VQ number or equivalently VQ number divided by 2 (it's always an even number for any receiveq). -- MST
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]