ifnet cloning changes
Sam Leffler
sam at errno.com
Sat Apr 8 01:07:36 UTC 2006
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
More information about the freebsd-arch
mailing list