spliting kernel ipfw source ? (also involves sctp)

Luigi Rizzo rizzo at iet.unipi.it
Thu Mar 12 05:39:34 PDT 2009


On Thu, Mar 12, 2009 at 11:21:38AM +0000, Vadim Goncharov wrote:
> Hi Luigi Rizzo! 
...
> > In practical terms, ip_fw.h might lose the definition of
> > struct ip_fw_args, or the prototypes for the various kernel
> > functions. The #ifdef _KERNEL part of ip_dummynet.h should
> > also go to some other file.
> 
> > If you want to contact me, on the list or offline, to discuss what
> > you want to do or what kind of 'modules' (kernel or userland ?) are
> > you thinking about, i'd be more than happy to help.
> 
> I do not know whether this will be polite to discuss in details while
> Foundation has not yet announced my work :-/ I hope they'll do it in a week

I see no reason to keep things secret.  In fact, I'd try to be as
open as possible as there is plenty of people on this list with
with a lot of experience on the various issues at hand, and could
give you valuable feedback.

> or so... I could say that at least dynamic rules and userland API/ABI will
> go under serious incompatible changes, so any your changing headers is OK,
> but what do you want to change inside kernel *.c is interesting to me.

First of all I want to split the files because ip_fw.2 is currently
too large to be effectively maintained.

There are more things that should be addressed, after proper
performance assessment, e.g replacing the huge switch with a table
of function pointers, fixing the way information is passed up
in the "ipfw show" and "pipe show" commands,
replacing the custom hash table with something already in
the kernel, and perhaps a better hash function.

Even more work (but this is not something I plan to do) involves
the locking: there is contention on the rule counters (which I am
not sure if/how is handled now) and contention on the dynamic rules,
which possibly might be reduced by locking on the individual buckets.

	cheers
	luigi


More information about the freebsd-arch mailing list