lkml.org 
[lkml]   [2020]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities
On Mon, Apr 13, 2020 at 04:21:29PM -0600, Alex Williamson wrote:
> Is the objection to a global version or to any version fields? I don't
> really understand the global version, I'd think a mechanism to check
> extensions plus a per structure flags/version would be preferred. The
> former should resolve how userspace can test support for features
> requiring multiple interfaces. A global version also implies that
> we're only ever adding features and never removing. For example,
> feature Foo is added in version 4, but it's replaced by feature Bar in
> version 5, now userspace can't simply test version >= 4 must include
> feature Foo.

The objection is to versions vs the much more sensible struct size +
capability flags. Making it global just increases the problems with
a version for all of the above reasons.

> It seems to me that version and flags can also be complimentary, for
> example a field might be defined by a version but a flag could indicate
> if it's implemented. With only the flag, we'd infer the field from the
> flag, with only the version we'd need to assume the field is always
> implemented. So I have a hard time making a blanket statement that all
> versions fields should be avoided.

s/version/struct size/, but otherwise agreed.

\
 
 \ /
  Last update: 2020-04-14 10:15    [W:0.293 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site