From owner-freebsd-arch@FreeBSD.ORG Thu Mar 12 12:39:34 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26613106567A for ; Thu, 12 Mar 2009 12:39:34 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id DAE4A8FC26 for ; Thu, 12 Mar 2009 12:39:33 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 63B4A73098; Thu, 12 Mar 2009 13:44:46 +0100 (CET) Date: Thu, 12 Mar 2009 13:44:46 +0100 From: Luigi Rizzo To: Vadim Goncharov Message-ID: <20090312124446.GB28491@onelab2.iet.unipi.it> References: <20090301153010.GA58942@onelab2.iet.unipi.it> <49AAFD92.105@elischer.org> <8EBEEE24-6473-411D-AE3F-C4D1D3897E51@gmail.com> <20090302190157.GA33704@onelab2.iet.unipi.it> <20090306161028.GA12322@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-arch@freebsd.org Subject: Re: spliting kernel ipfw source ? (also involves sctp) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2009 12:39:34 -0000 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