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-dev] [PATCH v14] virtio-net: support the virtqueue coalescing moderation


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 

 


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