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 v3 4/4] Add CCW configuration field "indirect_num"


On Fri, Mar 18 2022, Christian Schoenebeck <qemu_oss@crudebyte.com> wrote:

> On Donnerstag, 17. MÃrz 2022 15:12:42 CET Cornelia Huck wrote:
>> On Wed, Mar 16 2022, Christian Schoenebeck <qemu_oss@crudebyte.com> wrote:

>> > +Since revision 3, \field{indirect_num} exists, which is supposed to
>> > reflect the +Queue Indirect Size (i.e. the maximum length of indirect
>> > descriptor tables) +supported by device for this queue.
>> 
>> It still depends on the feature flag, though.
>> 
>> Maybe
>> 
>> "If revision 2 or lower is set, struct vq_config_block extends up to
>> \field{max_num}.
>> 
>> If revision 3 or higher is set, struct vq_config_block extends to
>> \field{max_indirect_num}. If VIRTIO_RING_F_INDIRECT_SIZE is negotiated,
>> \field{indirect_max_num} contains the maximum Queue Indirect Size
>> (i.e. the maximum length of indirect descriptor tables) supported by the
>> device for this queue; otherwise, its contents are unpredictable."
>
> Maybe rather something like this instead:
>
> "Actual size of struct vq_config_block depends on the virtio-ccw revision.
>
> If revision 2 or lower is set, struct vq_config_block extends up to
> *including* \field{max_num}.
>
> If revision 3 or higher is set, struct vq_config_block extends up to
> *including* \field{max_indirect_num}. If VIRTIO_RING_F_INDIRECT_SIZE is 
> negotiated, \field{indirect_max_num} contains the maximum Queue Indirect Size
> (i.e. the maximum length of indirect descriptor tables) supported by the
> device for this queue; otherwise, its contents are *undefined*."

Hm, I was coming from the driver's perspective here. But "undefined"
probably captures "junk in there, do not use" better.

Ack on your other points.

>> We should include a device normative statement:
>> 
>> "The device MUST NOT offer VIRTIO_RING_F_INDIRECT_SIZE, unless at least
>> revision 3 is set, and therefore \field{max_indirect_num} respectively
>> \field{indirect_num} are available."
>
> Oh, you are suggesting two different names for those two fields? 
> "max_indirect_num" vs. "indirect_num". If yes, why?

The "max_indirect_num" goes with the "max_num": this is the maximum
value that the device supports (the "maximum maximum", in a way :).
"indirect_num" is the actual upper limit while the device is in use.

>
> Otherwise about adding that normative statement in general here: sure, makes 
> sense.



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