svn commit: r243458 - in user/andre/tcp_workqueue/sys: net netinet

Andre Oppermann andre at freebsd.org
Mon Nov 26 13:10:33 UTC 2012


On 23.11.2012 17:11, Ermal Luçi wrote:
> On Fri, Nov 23, 2012 at 4:27 PM, Gleb Smirnoff <glebius at freebsd.org <mailto:glebius at freebsd.org>> wrote:
>
>        Frankly speaking, the fact that the list can't be set directly
>     in one sysctl oid:
>
>              sysctl net.inet.pfil_in.hooks="pf,ipfw,ipfilter"
>
>     , but can only be set via suppling pointless numeric values to N
>     oids looks very poor from perspective of an average user. He might
>     think something like "oh, FreeBSD developers were too lazy to parse
>     a string", or "they designed an interface not for people but for nerds".
>
>        Interface must be easier! If you don't like parsing strings in kernel,
>     then /sbin/pfilctl can be introduced. The utility eventually may grow
>     more functionality.
>
> I already gave a link to already existing patch for this.
> Not sure why andre@ decided the other way around.

I wanted to have a pre-determined default order of pfil modules
especially with the IPSec pfil hook I've started working on.
That's the reason for the ordering value.  This ordering value
has to be carried along somehow.  Also I'm no fan of kernel side
parsing, even if there are instances where it can't be avoided.

So the default pfil hook ordering should lessen the need to reorder
pfil hooks at runtime.

Would you mind having a pfilctl at Gleb suggested?  That way we could
abstract the whole thing away and also gain flexibility in the kernel
implementation for the future.

Another question: In your patch you have a pfil hook disable option
directly in the hook mechanism.  What is the reason for that versus
having the pfil consumer unhook itself when not enabled or in use?

-- 
Andre



More information about the svn-src-user mailing list