From owner-svn-src-all@freebsd.org Fri Nov 13 01:04:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67311A2CADE; Fri, 13 Nov 2015 01:04:01 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BE6215CE; Fri, 13 Nov 2015 01:04:01 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAD140qS058995; Fri, 13 Nov 2015 01:04:00 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAD140e7058989; Fri, 13 Nov 2015 01:04:00 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511130104.tAD140e7058989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 13 Nov 2015 01:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290736 - in stable/10: sbin/ifconfig share/man/man4 sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Fri, 13 Nov 2015 01:04:01 -0000 Author: smh Date: Fri Nov 13 01:03:59 2015 New Revision: 290736 URL: https://svnweb.freebsd.org/changeset/base/290736 Log: MFC r290450: Add sysctl to control LACP strict compliance default Sponsored by: Multiplay Modified: stable/10/sbin/ifconfig/ifconfig.8 stable/10/share/man/man4/lagg.4 stable/10/sys/net/ieee8023ad_lacp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.8 Fri Nov 13 01:01:16 2015 (r290735) +++ stable/10/sbin/ifconfig/ifconfig.8 Fri Nov 13 01:03:59 2015 (r290736) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd September 12, 2015 +.Dd November 6, 2015 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2449,6 +2449,21 @@ which are shifted by the number of this Enable lacp fast-timeout on the interface. .It Cm -lacp_fast_timeout Disable lacp fast-timeout on the interface. +.It Cm lacp_strict +Enable lacp strict compliance on the interface. +The default value can be set via the +.Va net.link.lagg.lacp.default_strict_mode +.Xr sysctl 8 +variable. +.Li 0 +means +.Dq disabled +and +.Li 1 +means +.Dq enabled . +.It Cm -lacp_strict +Disable lacp strict compliance on the interface. .El .Pp The following parameters are specific to IP tunnel interfaces, Modified: stable/10/share/man/man4/lagg.4 ============================================================================== --- stable/10/share/man/man4/lagg.4 Fri Nov 13 01:01:16 2015 (r290735) +++ stable/10/share/man/man4/lagg.4 Fri Nov 13 01:03:59 2015 (r290736) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2014 +.Dd November 6, 2015 .Dt LAGG 4 .Os .Sh NAME @@ -156,6 +156,7 @@ Gigabit Ethernet interfaces: .Bd -literal -offset indent # ifconfig bge0 up # ifconfig bge1 up +# ifconfig lagg0 create # ifconfig lagg0 laggproto lacp laggport bge0 laggport bge1 \e 192.168.1.1 netmask 255.255.255.0 .Ed @@ -168,6 +169,7 @@ device will be used: # ifconfig em0 up # ifconfig ath0 ether 00:11:22:33:44:55 # ifconfig create wlan0 wlandev ath0 ssid my_net up +# ifconfig lagg0 create # ifconfig lagg0 laggproto failover laggport em0 laggport wlan0 \e 192.168.1.1 netmask 255.255.255.0 .Ed Modified: stable/10/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/10/sys/net/ieee8023ad_lacp.c Fri Nov 13 01:01:16 2015 (r290735) +++ stable/10/sys/net/ieee8023ad_lacp.c Fri Nov 13 01:03:59 2015 (r290736) @@ -193,6 +193,11 @@ SYSCTL_NODE(_net_link_lagg, OID_AUTO, la SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, debug, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(lacp_debug), 0, "Enable LACP debug logging (1=debug, 2=trace)"); +static VNET_DEFINE(int, lacp_default_strict_mode) = 1; +SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, default_strict_mode, CTLFLAG_RWTUN, + &VNET_NAME(lacp_default_strict_mode), 0, + "LACP strict protocol compliance default"); + #define LACP_DPRINTF(a) if (V_lacp_debug & 0x01) { lacp_dprintf a ; } #define LACP_TRACE(a) if (V_lacp_debug & 0x02) { lacp_dprintf(a,"%s\n",__func__); } #define LACP_TPRINTF(a) if (V_lacp_debug & 0x04) { lacp_dprintf a ; } @@ -765,7 +770,7 @@ lacp_attach(struct lagg_softc *sc) lsc->lsc_hashkey = arc4random(); lsc->lsc_active_aggregator = NULL; - lsc->lsc_strict_mode = 1; + lsc->lsc_strict_mode = VNET(lacp_default_strict_mode); LACP_LOCK_INIT(lsc); TAILQ_INIT(&lsc->lsc_aggregators); LIST_INIT(&lsc->lsc_ports); @@ -1703,7 +1708,7 @@ lacp_sm_rx_record_default(struct lacp_po if (lp->lp_lsc->lsc_strict_mode) lp->lp_partner = lacp_partner_admin_strict; else - lp->lp_partner = lacp_partner_admin_optimistic;; + lp->lp_partner = lacp_partner_admin_optimistic; lp->lp_state |= LACP_STATE_DEFAULTED; lacp_sm_ptx_update_timeout(lp, oldpstate); }