[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-dev] [PATCH v14] virtio-net: support the virtqueue coalescing moderation
On Wed, Apr 05, 2023 at 04:54:44PM +0200, Halil Pasic wrote: > On Wed, 5 Apr 2023 05:12:12 -0400 > "Michael S. Tsirkin" <mst@redhat.com> wrote: > > > > > it's not necessarily an identifier. can be e.g. just 0 for all vqs. > > > > whatever the device needs. > > > For driver its just an id, content doesn't matter. > > > > No, this value might or might not be somehow related to the vq but it > > does not have to identify it. So it's some data, not an id. Let's try > > to use words for what they mean in english not try to come up with our > > own language. > > I agree with Michael wholeheartedly, we should try to use words for what > they mean in English, especially in Computer Science English, and even > try to pick the most fitting and least ambiguous option if multiple > options are possible. > > In that spirit I would say that "queue_notify_data" is actually a magic > cookie. https://en.wikipedia.org/wiki/Magic_cookie A possible name > or abbreviation would be vqn_cookie like "a virtqueue > notification cookie" (I'm not sure about mixing in the direction, but > this is only about driver -> device notifications). > > > And then > > le32 { > vqn : 16; > next_off : 15; > next_wrap : 1; > }; > > could become something like > > struct vq_notif_data { > union { > le16 vqn_cookie; > le16 vq_index; > }; > le16 { > next_off : 15; > next_wrap : 1; > }; > }; > > BTW since "identifier" and "unique identifier" are not the same, in my > opinion "identifier" is still viable, if we explain that it is called > identifier because the idea behind that field is to be used to identify > the queue, but that there is in fact no requirement on selectivity let > alone uniqueness. > > > Regards, > Halil > Well "identifier" seems to come from "identity" meaning "same" so I think yes, it implies a 1:1 relationship. And more importantly, it might not identify the queue, there is in fact no requirement on how it is used at all. -- MST
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]