From owner-cvs-all@FreeBSD.ORG Tue Apr 10 09:20:11 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6FAB016A409; Tue, 10 Apr 2007 09:20:11 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from heff.fud.org.nz (203-109-251-39.static.bliink.ihug.co.nz [203.109.251.39]) by mx1.freebsd.org (Postfix) with ESMTP id E192E13C43E; Tue, 10 Apr 2007 09:20:10 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: by heff.fud.org.nz (Postfix, from userid 1001) id 9031D1CC58; Tue, 10 Apr 2007 21:20:09 +1200 (NZST) Date: Tue, 10 Apr 2007 21:20:09 +1200 From: Andrew Thompson To: Gleb Smirnoff Message-ID: <20070410092009.GA4081@heff.fud.org.nz> References: <200704100027.l3A0RQGq007340@repoman.freebsd.org> <20070410083131.GG46002@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070410083131.GG46002@FreeBSD.org> User-Agent: Mutt/1.5.13 (2006-08-11) 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 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Apr 2007 09:20:11 -0000 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