netdev
[Top] [All Lists]

Re: [RFC] Extend netlink error codes

To: Thomas Graf <tgraf@xxxxxxx>
Subject: Re: [RFC] Extend netlink error codes
From: Andi Kleen <ak@xxxxxxx>
Date: Sat, 11 Sep 2004 17:58:39 +0200
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20040910225158.GO20088@xxxxxxxxxxxxxx>
References: <20040910225158.GO20088@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Sat, Sep 11, 2004 at 12:51:58AM +0200, Thomas Graf wrote:
> The current situation with error codes sent back to a netlink
> application is unsatisfactory. Most often, the application
> receives EINVAL but has no idea what was wrong.

[...]

IMHO it would be far better to just pass text errors
in a variable length packet back.  It's a bit plan9ish,
but it would work nicely here and be a bit improvement
(especially for the qdiscs) 

Otherwise you will end up with a mainteance nightmare of a
long list of error codes that needs to be updated for every new
subsystem.  And everybody who has a patch to add a new netlink
user would always fight with conflicts in this file.

I don't think an very specific error like
"CFQ subsystem parameter X is FOO, can be only upto BAR" 
can be nicely put into a global error file.
And most errors can only be handled by passing them to the user anyways,
text errors would be fine for that.

There could be still an errno provided for easy success/failure
checking.

-Andi

<Prev in Thread] Current Thread [Next in Thread>