discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] X300 PCIe issues


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] X300 PCIe issues
Date: Sun, 27 Apr 2014 17:48:00 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 04/27/2014 05:32 PM, Sylvain Munaut wrote:
While the "top side" API is
very stable so that applications hardly *ever* experience API changes
   that require on-going tedious maintenance, the same cannot be said of code
that runs in the kernel. Quite the contrary.  Linus and friends
   *routinely and regularly* change critical APIs within the kernel,
sometimes even across minor version revs of the same codebase.
Come on, it's not _that_ bad ...

Kernel API are stable inside the maintenance release, so they can only
change like every 2 month at most.

And when they change, finding the relevant commit is pretty easy with
git and it will show exactly what need to be changed in your driver
(because that commit fixed every other driver in-tree for the same
change). And searching LKML will also give all the gory details. It's
like half a day or one day of work at the most.

So 1 day of code maintenance every 2 month to keep your codebase
current is not what I'd call a nightmare.
And if you want to avoid even that, just get your module merged
upstream, it will be adapted for you free of charge when APIs change.

And wrt to maintaining the same code building for several kernel,
that's just the wrong approach. Just maintain different version in
different branches. When the code is well written, the driver specific
part will be decoupled enough from the kernel api part that there will
hardly be any conflicts. And when your driver "core function" doesn't
change (and for the NI driver, it seems it hasn't changed it's
functionality for a while AFAICT, just added new kernel support, but I
could be wrong on that), then it's even easier to just release a new
code for each new kernel.

For only a few revisions appart, you might be ok with #ifdef, but if
you're trying to go back to ancient times, like the NI module which
seems to support 2.6.0 (that's  11 years ago !!!!), yeah there is
going to be some serious changes ...

Cheers,

    Sylvain


PS: and yeah, for 2 years or so, I maintained an in-house PCIe driver
for a FPGA board, so I did experience that.

So, would we accept an applications-layer API that changed roughly every two months? I would argue, no, we wouldn't. But people developing in kernel land seem to accept it as some kind of necessary gospel. I reject that notion.

Just because kernel-land is where "all the kewl kids play" is not a good reason to break things on a regular basis.

Anyway, this thread is now going fairly far afield....


--
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]