From owner-svn-src-projects@FreeBSD.ORG Sat Nov 8 00:09:13 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62A2C32C; Sat, 8 Nov 2014 00:09:13 +0000 (UTC) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23DB6F84; Sat, 8 Nov 2014 00:09:12 +0000 (UTC) Received: from secured.by.ipfw.ru ([95.143.220.47] helo=[10.0.0.120]) by mail.ipfw.ru with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XmpZv-00099H-BR; Fri, 07 Nov 2014 23:52:15 +0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: svn commit: r274256 - in projects/routing/sys: net netinet netinet6 netpfil/pf From: "Alexander V. Chernikov" In-Reply-To: <20141108104426.X2034@besplex.bde.org> Date: Sat, 8 Nov 2014 03:09:07 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201411072252.sA7Mq3u6006585@svn.freebsd.org> <20141108104426.X2034@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1990.1) Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org, "Alexander V. Chernikov" X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2014 00:09:13 -0000 > On 08 Nov 2014, at 02:49, Bruce Evans wrote: >=20 > On Fri, 7 Nov 2014, Alexander V. Chernikov wrote: >=20 >> Log: >> Split radix implementation and system route table structure: >> use new 'struct radix_head' for radix. >=20 >> Modified: projects/routing/sys/net/radix.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- projects/routing/sys/net/radix.c Fri Nov 7 22:02:44 2014 = (r274255) >> +++ projects/routing/sys/net/radix.c Fri Nov 7 22:52:02 2014 = (r274256) >> ... >> @@ -1132,13 +1134,13 @@ rn_inithead_internal(void **head, int of >> tt->rn_bit =3D -1 - off; >> *ttt =3D *tt; >> ttt->rn_key =3D rn_ones; >> - rnh->rnh_addaddr =3D rn_addroute; >> - rnh->rnh_deladdr =3D rn_delete; >> - rnh->rnh_matchaddr =3D rn_match; >> - rnh->rnh_lookup =3D rn_lookup; >> - rnh->rnh_walktree =3D rn_walktree; >> - rnh->rnh_walktree_from =3D rn_walktree_from; >> - rnh->rnh_treetop =3D t; >> + rnh->rnh_addaddr =3D (rn_addaddr_f_t *)rn_addroute; >> + rnh->rnh_deladdr =3D (rn_deladdr_f_t *)rn_delete; >> + rnh->rnh_matchaddr =3D (rn_matchaddr_f_t *)rn_match; >> + rnh->rnh_lookup =3D (rn_lookup_f_t *)rn_lookup; >> + rnh->rnh_walktree =3D (rn_walktree_t *)rn_walktree; >> + rnh->rnh_walktree_from =3D (rn_walktree_from_t = *)rn_walktree_from; >> + rnh->rh.rnh_treetop =3D t; >> return (1); >> } >>=20 >=20 > A previous commit added lots of function typedefs. As I feared, most = uses > of these are to give undefined behaviour by bogusly casting using the > typedefs. Unless the function types are actually the same. Then the > bogus casts have no effect. Yes, these changes are not final. Currently we use radix for the following: 1) main routing table (where we have =E2=80=9Croute entries=E2=80=9D, = =E2=80=9Cmultipath=E2=80=9D and other routing-specific stuff). We also = need to redefine some of callbacks for different address families. 2) prefix lists in NFS server, pf and ipfw firewall (and some other = places). Here we don=E2=80=99t need callback re-definition, embedded = locking and other stuff.=20 My goal is to significantly change structure/binding of radix to routing = table (change locking model, change callbacks and so on) so I=E2=80=99m = trying to decouple radix code from current routing-specific table structures as much as I = can. >=20 > These typedefs don't seem to be used to obfuscate function definitions = yet. >=20 > Bruce >=20