From owner-freebsd-current@FreeBSD.ORG Tue Dec 15 09:55:06 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D866A1065694 for ; Tue, 15 Dec 2009 09:55:06 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 8D53E8FC0A for ; Tue, 15 Dec 2009 09:55:06 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id EFE3941C7A5; Tue, 15 Dec 2009 10:55:05 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id 6Foc-XtXGQXA; Tue, 15 Dec 2009 10:55:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 8CA6941C7A4; Tue, 15 Dec 2009 10:55:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 2CBE34448EC; Tue, 15 Dec 2009 09:51:19 +0000 (UTC) Date: Tue, 15 Dec 2009 09:51:19 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Luigi Rizzo In-Reply-To: <20091214075725.GA80173@onelab2.iet.unipi.it> Message-ID: <20091215095044.J86040@maildrop.int.zabbadoz.net> References: <20091214075725.GA80173@onelab2.iet.unipi.it> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD current mailing list Subject: Re: need clarifications on net/radix.c usage X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2009 09:55:06 -0000 On Mon, 14 Dec 2009, Luigi Rizzo wrote: Hi Luigi, > Hi, > i am revising the code in net/radix.c and there are a few > things that are not completely clear to me and I would like > to understand and possibly fix. > > I know that this code has been untouched in 15 years so it > probably reflects old requirements or design ideas that have > changed since then. > > Initial list of things: > > - struct radix_node_head has a number of fields that are never used > (rnh_addpkt and friends, rnh_addrsize, rnh_pktsize) > Unless there are objections I'd like to remove the unused fields. > > - there are some static variables in radix.c (max_keylen, mask_rnhead, > the freelist, the allzero and allone masks, 'last_zeroed' in a function) > which would probably deserve becoming members of radix_node_head, > last not least for correctness of operation -- some of those fields > are read-write, but there are now multiple instances of radix_node_head > running under different locks. > Again, if there are no objections, I'd like to move those variables > into radix_node_head. I think the chances to get feedback on this might be better on net@. /bz -- Bjoern A. Zeeb It will not break if you know what you are doing.