From owner-cvs-all@FreeBSD.ORG Tue Apr 10 08:31:33 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 9DF7916A400; Tue, 10 Apr 2007 08:31:33 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.freebsd.org (Postfix) with ESMTP id 23DEB13C44B; Tue, 10 Apr 2007 08:31:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.4/8.13.3) with ESMTP id l3A8VVb0066480 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Apr 2007 12:31:31 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.4/8.13.1/Submit) id l3A8VVXv066479; Tue, 10 Apr 2007 12:31:31 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 10 Apr 2007 12:31:31 +0400 From: Gleb Smirnoff To: Andrew Thompson Message-ID: <20070410083131.GG46002@FreeBSD.org> References: <200704100027.l3A0RQGq007340@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <200704100027.l3A0RQGq007340@repoman.freebsd.org> User-Agent: Mutt/1.5.6i 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 08:31:33 -0000 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 diff -u src/sys/net/if_var.h:1.112 src/sys/net/if_var.h:1.113 --- src/sys/net/if_var.h:1.112 Tue Mar 20 03:15:43 2007 +++ src/sys/net/if_var.h Tue Apr 10 00:27:25 2007 @@ -186,6 +186,7 @@ TAILQ_HEAD(, ifg_list) if_groups; /* linked list of groups per if */ /* protected by if_addr_mtx */ void *if_pf_kif; + void *if_trunk; /* trunk glue */ }; typedef void if_init_f_t(void *); -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE