From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
Devin Heitmueller <dheitmueller@kernellabs.com>,
Jesper Juhl <jj@chaosbits.net>,
LKML <linux-kernel@vger.kernel.org>,
trivial@kernel.org, linux-media@vger.kernel.org,
ceph-devel@vger.kernel.org, Sage Weil <sage@newdream.net>
Subject: Re: [RFC] Don't use linux/version.h anymore to indicate a per-driver version - Was: Re: [PATCH 03/37] Remove unneeded version.h includes from include/
Date: Fri, 24 Jun 2011 20:34:04 +0200 [thread overview]
Message-ID: <20110624203404.7a3f6f6a@stein> (raw)
In-Reply-To: <4E04A122.2080002@infradead.org>
On Jun 24 Mauro Carvalho Chehab wrote:
> Em 24-06-2011 10:54, Hans Verkuil escreveu:
> > On Friday, June 24, 2011 15:45:59 Devin Heitmueller wrote:
> >> The versions are increased at the discretion of the driver maintainer,
> >> usually when there is some userland visible change in driver behavior.
> >> I assure you the application developers don't *want* to rely on such
> >> a mechanism, but there have definitely been cases in the past where
> >> there was no easy way to detect the behavior of the driver from
> >> userland.
> >>
> >> It lets application developers work around things like violations of
> >> the V4L2 standard which get fixed in newer revisions of the driver.
> >> It provides them the ability to put a hack in their code that says "if
> >> (version < X) then this driver feature is broken and I shouldn't use
> >> it."
> >
> > Indeed. Ideally we shouldn't need it. But reality is different.
> >
> > What we have right now works and I see no compelling reason to change the
> > behavior.
>
> A per-driver version only works if the user is running a vanilla kernel without
> any stable patches applied.
>
> I doubt that this covers the large amount of the users: they'll either use an
> stable patched kernel or a distribution-specific one. On both cases, the driver
> version is not associated with a bug fix, as the driver maintainers just take
> care of increasing the driver version once per each new kernel version (when
> they care enough).
>
> Also, a git blame for the V4L2 drivers shows that only a few drivers have their
> version increased as changes are applied there. So, relying on cap->version
> has a minimal chance of working only with a few drivers, with vanilla *.0 kernels.
If the "driver version" is in fact an ABI version, then the driver author
should really increase it only when ABI behavior is changed (and only if
the behavior change can only be communicated by version number --- e.g.
addition of an ioctl is not among such reasons). And the author should
commit behavior changing implementation and version number change in a
single changeset.
And anybody who backmerges such an ABI behavior change into another kernel
branch (stable, longterm, distro...) must backmerge the associated version
number change too.
Of course sometimes people realize this only after the fact. Or driver
authors don't have a clear understanding of ABI versioning to begin with.
I am saying so because I had to learn it too; I certainly wasn't born
with an instinct knowledge how to do it properly.
(Disclaimer: I have no stake in drivers/media/ ABIs. But I am involved
in maintaining a userspace ABI elsewhere in drivers/firewire/, and one of
the userspace libraries that use this ABI.)
--
Stefan Richter
-=====-==-== -==- ==---
http://arcgraph.de/sr/
next prev parent reply other threads:[~2011-06-24 18:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LNX.2.00.1106232344480.17688@swampdragon.chaosbits.net>
2011-06-23 21:58 ` [PATCH 03/37] Remove unneeded version.h includes from include/ Jesper Juhl
2011-06-23 22:15 ` Sage Weil
2011-06-24 11:21 ` [RFC] Don't use linux/version.h anymore to indicate a per-driver version - Was: " Mauro Carvalho Chehab
2011-06-24 11:26 ` Hans Verkuil
2011-06-24 12:20 ` Devin Heitmueller
2011-06-24 13:29 ` Mauro Carvalho Chehab
2011-06-24 13:45 ` Devin Heitmueller
2011-06-24 13:54 ` Hans Verkuil
2011-06-24 14:37 ` Mauro Carvalho Chehab
2011-06-24 18:25 ` [PATCH] [media] Stop using linux/version.h on most drivers Mauro Carvalho Chehab
2011-06-25 10:09 ` Hans Verkuil
2011-06-25 12:14 ` Mauro Carvalho Chehab
2011-06-27 0:59 ` Laurent Pinchart
2011-06-24 18:34 ` Stefan Richter [this message]
2011-06-24 18:48 ` [RFC] Don't use linux/version.h anymore to indicate a per-driver version - Was: Re: [PATCH 03/37] Remove unneeded version.h includes from include/ Devin Heitmueller
2011-06-24 21:04 ` Andy Walls
2011-06-24 21:20 ` Stefan Richter
2011-06-24 21:22 ` Devin Heitmueller
2011-06-24 21:49 ` Mauro Carvalho Chehab
2011-06-24 22:39 ` Stefan Richter
2011-06-24 23:02 ` Mauro Carvalho Chehab
2011-06-24 22:16 ` Mauro Carvalho Chehab
2011-06-24 22:57 ` Andy Walls
2011-06-24 21:10 ` Stefan Richter
2011-06-24 21:52 ` Mauro Carvalho Chehab
2011-06-24 21:44 ` Mauro Carvalho Chehab
2011-06-29 21:54 ` Mauro Carvalho Chehab
2011-06-23 22:11 ` [PATCH 10/37] Remove unneeded version.h includes from drivers/media/dvb/ Jesper Juhl
2011-06-23 22:14 ` [PATCH 11/37] Remove unneeded version.h includes (and add where needed) for drivers/media/radio/ Jesper Juhl
2011-06-23 22:17 ` [PATCH 12/37] Remove unneeded version.h includes (and add where needed) for drivers/media/video/ Jesper Juhl
2011-06-24 8:52 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110624203404.7a3f6f6a@stein \
--to=stefanr@s5r6.in-berlin.de \
--cc=ceph-devel@vger.kernel.org \
--cc=dheitmueller@kernellabs.com \
--cc=hverkuil@xs4all.nl \
--cc=jj@chaosbits.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=sage@newdream.net \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox