Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Apr 2006 18:07:34 -0700
From:      Sam Leffler <sam@errno.com>
To:        arch@freebsd.org
Subject:   ifnet cloning changes
Message-ID:  <44370CD6.9090006@errno.com>

next in thread | raw e-mail | index | archive | help
The patch here:

http://www.freebsd.org/~sam/clone.patch

modifies the SIOCIFCREATE api in the kernel so that an opaque parameter 
block can be passed down to ifnet cloning routines (actually the user 
address is passed down and the caller must do the copyin since it alone 
knows the size of the parameter block).  This allows you to specify 
parameters at the time a clone is done which can greatly simplify the 
handling of cloned ifnets.  This change is a prerequisite to bringing in 
my 802.11 virtual ap work which depends on this to fix vap configuration 
state at the time the vap is created.

Only vlans use this new mechanism with the patch.  It appears some other 
cloners could use it but are left unchanged.

The second part of the patch alters ifconfig to optionally handle 
cloning requests with a callback.  The vlan code uses this mechanism to 
collect cloning parameters (tag and parent device) from the command line 
parameters before getting called back to do the create call at which 
point it can pass all the parameters in to the call.  These changes also 
simplify the code a bit.

I've been waiting for 6.1 to get tagged before proposing this as the 
change will make head incompatible with releng6.  If compatibility is 
important we could define a new ioctl instead and preserve the current 
handling of SIOCIFCREATE.

	Sam



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44370CD6.9090006>