From owner-svn-src-all@FreeBSD.ORG Wed Oct 20 17:42:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F6E31065697; Wed, 20 Oct 2010 17:42:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2267E8FC1B; Wed, 20 Oct 2010 17:42:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9KHgBjU064308; Wed, 20 Oct 2010 17:42:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9KHgBDs064304; Wed, 20 Oct 2010 17:42:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201010201742.o9KHgBDs064304@svn.freebsd.org> From: Xin LI Date: Wed, 20 Oct 2010 17:42:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214111 - in stable/8: share/man/man4 sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2010 17:42:11 -0000 Author: delphij Date: Wed Oct 20 17:42:10 2010 New Revision: 214111 URL: http://svn.freebsd.org/changeset/base/214111 Log: MFC r212100 (emaste),213632,214066: Add a new syslog knob, net.link.lagg.failover_rx_all, to control whether to accept input packets on any link in a failover lagg, and add the corresponding documentation. Modified: stable/8/share/man/man4/lagg.4 stable/8/sys/net/if_lagg.c Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man4/lagg.4 ============================================================================== --- stable/8/share/man/man4/lagg.4 Wed Oct 20 16:47:09 2010 (r214110) +++ stable/8/share/man/man4/lagg.4 Wed Oct 20 17:42:10 2010 (r214111) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 29, 2009 +.Dd October 18, 2010 .Dt LAGG 4 .Os .Sh NAME @@ -73,11 +73,19 @@ The interface link state is used to vali not. .Bl -tag -width loadbalance .It Ic failover -Sends and receives traffic only through the master port. +Sends traffic only through the active port. If the master port becomes unavailable, the next active port is used. The first interface added is the master port; any interfaces added after that are used as failover devices. +.Pp +By default, received traffic is only accepted when they are received +through the active port. +This constraint can be relaxed by setting the +.Va net.link.lagg.failover_rx_all +.Xr sysctl 8 +variable to a nonzero value, +which is useful for certain bridged network setups. .It Ic fec Supports Cisco EtherChannel. This is a static setup and does not negotiate aggregation with the peer or @@ -153,6 +161,7 @@ device as a workaround.) .Sh SEE ALSO .Xr ng_fec 4 , .Xr ng_one2many 4 , +.Xr sysctl 8 , .Xr ifconfig 8 .Sh HISTORY The Modified: stable/8/sys/net/if_lagg.c ============================================================================== --- stable/8/sys/net/if_lagg.c Wed Oct 20 16:47:09 2010 (r214110) +++ stable/8/sys/net/if_lagg.c Wed Oct 20 17:42:10 2010 (r214111) @@ -159,6 +159,14 @@ static const struct { { LAGG_PROTO_NONE, NULL } }; +SYSCTL_DECL(_net_link); +SYSCTL_NODE(_net_link, OID_AUTO, lagg, CTLFLAG_RW, 0, "Link Aggregation"); + +static int lagg_failover_rx_all = 0; /* Allow input on any failover links */ +SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW, + &lagg_failover_rx_all, 0, + "Accept input from any interface in a failover lagg"); + static int lagg_modevent(module_t mod, int type, void *data) { @@ -1498,7 +1506,7 @@ lagg_fail_input(struct lagg_softc *sc, s struct ifnet *ifp = sc->sc_ifp; struct lagg_port *tmp_tp; - if (lp == sc->sc_primary) { + if (lp == sc->sc_primary || lagg_failover_rx_all) { m->m_pkthdr.rcvif = ifp; return (m); }