Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Apr 2007 21:20:09 +1200
From:      Andrew Thompson <thompsa@freebsd.org>
To:        Gleb Smirnoff <glebius@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sbin/ifconfig iftrunk.c src/share/man/man4 trunk.4 src/sys/net ieee8023ad_lacp.c ieee8023ad_lacp.h if.c if_ethersubr.c if_trunk.c if_trunk.h if_var.h src/sys/sys priv.h
Message-ID:  <20070410092009.GA4081@heff.fud.org.nz>
In-Reply-To: <20070410083131.GG46002@FreeBSD.org>
References:  <200704100027.l3A0RQGq007340@repoman.freebsd.org> <20070410083131.GG46002@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 10, 2007 at 12:31:31PM +0400, Gleb Smirnoff wrote:
>   Andrew and others,
> 
>   what do you think about using a flags fielf + union field for
> different kinds of glue? I mean that if_vlantrunk, if_trunk, if_bridge
> and may be some future glues are mutually exclusive.
> 
> If we put them under one union and add an integer field that identifies
> what is stored in the union, then we will:
> 
> 1) keep the structure smaller
> 2) structure won't grow in future, when adding more glues
> 3) easier to avoid bugs like attaching to bridge and vlan trunk
>    simultaneously

That could be good as thats already three pointers in the struct and im
sure the next pseudo interface type is just around the corner. A bit of
care would need to be taken to make sure that all the different
combinations of interfaces still work. For instance you can easily put
all three of those together in a valid config of trunk<-vlan<-bridge,
but for that each pointer would be on a different ifnet.


Andrew



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