From owner-freebsd-current@FreeBSD.ORG Mon Dec 14 07:50:05 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 533461065679 for ; Mon, 14 Dec 2009 07:50:05 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 1C8848FC0A for ; Mon, 14 Dec 2009 07:50:04 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id C6D90730A1; Mon, 14 Dec 2009 08:57:25 +0100 (CET) Date: Mon, 14 Dec 2009 08:57:25 +0100 From: Luigi Rizzo To: current@freebsd.org Message-ID: <20091214075725.GA80173@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: 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: Mon, 14 Dec 2009 07:50:05 -0000 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. cheers luigi