On Wed, Aug 22, 2007 at 03:42:49PM +0200, Matthias Hopf wrote:
> On Aug 20, 07 19:51:31 +0300, Daniel Stone wrote:
> > On Mon, Aug 20, 2007 at 05:27:43PM +0200, Matthias Hopf wrote:
> > > On Aug 12, 07 17:50:12 +0200, [EMAIL PROTECTED] wrote:
> > > Please be sure that if you design this using ioctls the design should be
> > > forward and backward compatible.
> > > 
> > > AFAICS the only way to ensure this is some sort of tag-based parameter
> > > space (parameters are a list of tag,value pairs, terminated by a special
> > > tag). Otherwise you're stuck with one parameter list, which you cannot
> > > enhance easily, and version control both in user and kernel space will
> > > be a nightmare. With tags you can just ignore the tags you don't know
> > > about.
> > 
> > Well, either that, or you can have a version field as the very first
> > member (think: X11 requests), or simply bump the ioctl number every time
> > you change the API (think: shared libraries).
> 
> But that exactly makes version control difficult (lots of cases,
> especially if the exact requirements aren't clear from day one).

I honestly don't understand the problem.  Your ioctl number is _that_
request.  It's not referring to a vague concept, but a single structure
you've already specified.

If you have ioctl number 32, your next free one is 43, and you want to
change the semantics of UPDATE_WINDOW, then you rename 32 to
UPDATE_WINDOW_OLD, create UPDATE_WINDOW as 43 with the new structure,
and handle both cases.

This is what we've done for ioctl BC in our kernel tree, and it's worked
fine.

> Without a version field, this is made impossible, something that must be
> avoided at all costs.

Except that your ioctl then becomes variably-sized unless you add loads
of padding and hope for the best.

Cheers,
Daniel

Attachment: signature.asc
Description: Digital signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to