[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200326092316.GA31648@infradead.org>
Date: Thu, 26 Mar 2020 02:23:16 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Jacob Pan <jacob.jun.pan@...ux.intel.com>
Cc: Joerg Roedel <joro@...tes.org>,
Alex Williamson <alex.williamson@...hat.com>,
Lu Baolu <baolu.lu@...ux.intel.com>,
iommu@...ts.linux-foundation.org,
LKML <linux-kernel@...r.kernel.org>,
David Woodhouse <dwmw2@...radead.org>,
Jean-Philippe Brucker <jean-philippe@...aro.com>,
"Tian, Kevin" <kevin.tian@...el.com>,
Raj Ashok <ashok.raj@...el.com>
Subject: Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities
On Wed, Mar 25, 2020 at 04:17:05PM -0700, Jacob Pan wrote:
> Having a single UAPI version to govern the user-kernel data structures
> makes compatibility check straightforward. On the contrary, supporting
> combinations of multiple versions of the data can be a nightmare to
> maintain.
>
> This patch defines a unified UAPI version to be used for compatibility
> checks between user and kernel.
This is bullshit. Version numbers don't scale and we've avoided them
everywhere. You need need flags specifying specific behavior.
> +#define IOMMU_UAPI_VERSION 1
> +static inline int iommu_get_uapi_version(void)
> +{
> + return IOMMU_UAPI_VERSION;
> +}
Also inline functions like this in UAPI headers that actually get
included by userspace programs simply don't work.
Powered by blists - more mailing lists