Joerg Sonnenberger joerg at
Thu Feb 10 11:04:17 PST 2005

On Thu, Feb 10, 2005 at 10:18:45AM -0800, Matthew Dillon wrote:
>     It looks ok except for the various IFQ_*() macros.  Passing a variable
>     name as an argument to a macro (e.g. err) which then assigns the 
>     variable creates a lot of confusion.  The NFSM code did this (albeit 
>     much more aggregiously) and it created a real mess.

It still makes the variable used for error handling explicit.
The macros are compatible with KAME, I'd prefer to keep the current form.
They are used in two cases which a normal network driver should not trigger.
re(4) is a bit special because it tries to test the card first.

>     Could you make those IFQ_*() macros real procedures instead of macros?
>     Or at least real inline procedures.

Real functions is not an option, because it would enforce the overhead
for all interfaces, independent of ALTQ being available or not. Inline
functions would work, but still need a macro since IFQ_ENQUEUE's pattr
attribute is not available in non-ALTQ code. I'm not sure if that makes
the code really any easier to read.


More information about the Submit mailing list