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 v8 8/9] admin: command list discovery


On Mon, Nov 21, 2022 at 11:06:14AM +0000, Uminski, Piotr wrote:
> Instead of a bit-coded list of supported commands, can we just use an array of supported command values? It allows us to use non-contiguous command coding and checking how big  is an array:       le32 device_admin_cmds[];

Interesting, what's the usecase exactly?
I don't really expect more than order or 200 commands - about 8 dwords.
And the operation we normally need is checking whether a given command
is supported, with a list that will be a slow lookup.

Besides with your idea driver first needs to check how many commands
are supported, then do the query - two roundtrips to device.
With the proposed interface, driver just allocates a buffer
for commands it knows about. Device truncates the buffer
to the length supplied by driver, so any commands outside
the buffer are ignored.

-- 
MST



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