DragonFly BSD
DragonFly submit List (threaded) for 2005-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: ALTQ


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Thu, 10 Feb 2005 20:02:21 +0100
Mail-followup-to: submit@crater.dragonflybsd.org

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.

Joerg



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