Date: Tue, 10 Apr 2007 12:31:31 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Andrew Thompson <thompsa@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: <20070410083131.GG46002@FreeBSD.org> In-Reply-To: <200704100027.l3A0RQGq007340@repoman.freebsd.org> References: <200704100027.l3A0RQGq007340@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070410083131.GG46002>