Date: Thu, 22 Apr 2004 16:13:40 +0200 From: Andre Oppermann <andre@freebsd.org> To: Brooks Davis <brooks@one-eyed-alien.net> Cc: net@freebsd.org Subject: Re: RFC: if_clone overhaul Message-ID: <4087D314.F5ED2344@freebsd.org> References: <20040421042453.GA8866@Odin.AC.HMC.Edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Brooks Davis wrote: > > Please test/review the following patch to the network interface cloneing > code. This code is a major overhaul of the cloning infrastructure. > > The significant include: > - Split the code out into if_clone.[ch]. > - Locked struct if_clone. Derived from work by Maurycy > Pawlowski-Wieronski <maurycy at fouk.org> > - Add a per-cloner match function rather then simply matching names of > the form <name><unit> and <name>. > - Use the match function to allow creation of <interface>.<tag> > vlan interfaces. The old way is preserved unchanged! > - Also the match function to allow creation of stf(4) interfaces named > stf0, stf, or 6to4. This is the only major user visiable change in > that "ifconfig stf" creates the interface stf rather then stf0 and > does not print "stf0" to stdout. > - Allow destroy functions to fail so they can refuse to delete > interfaces. Currently, we forbid the deletion of interfaces which > were created in the init function, particularly lo0, pflog0, and > pfsync0. In the case of lo0 this was a panic implemenation so it > does not count as a user visiable change. :-) > - Since most interfaces do not need the new functionality, an family of > wrapper functions, ifc_simple_*(), were created to wrap old style > cloner functions. > - The IF_CLONE_INITIALIZER macro is replaced with a new incompatable > IFC_CLONE_INITALIZER and ifc_simple consumers use IFC_SIMPLE_DECLARE > instead. > > TODO: > - Integrate vlan changes into /etc/rc* (add support for interfaces with > '.' in their name). > - Document new vlan syntax in vlan(4). Looks good and I like it! ;-) Some comments: o in net/if_clone.h you can remove the 3rd Regents copyright clause. o in net/if_clone.h, is ## really a legal character in variables? Looks strange for sure! o in net/if_clone.c you can remove the 3rd Regents copyright clause. o how far does the cloning code scale? I'm asking because with the work on the l2tp stuff you'll get machines with possibly 10'000 or more ppp over l2tp connections acting as LAC. o I haven't run the code or applied the patch because I have too many modifications in my tree which I need to get committed first. :-) Good work! -- Andre
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4087D314.F5ED2344>