From owner-svn-src-stable-11@freebsd.org Wed Feb 1 04:53:53 2017 Return-Path: Delivered-To: svn-src-stable-11@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 B4221CCA8CE; Wed, 1 Feb 2017 04:53:53 +0000 (UTC) (envelope-from rpokala@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 78D21C0D; Wed, 1 Feb 2017 04:53:53 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v114rq3e073903; Wed, 1 Feb 2017 04:53:52 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v114rqdG073902; Wed, 1 Feb 2017 04:53:52 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201702010453.v114rqdG073902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Wed, 1 Feb 2017 04:53:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313038 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 04:53:53 -0000 Author: rpokala Date: Wed Feb 1 04:53:52 2017 New Revision: 313038 URL: https://svnweb.freebsd.org/changeset/base/313038 Log: MFC r312678: Eliminate misleading comments and dead code in lacp_port_create() Variables "fast" and "active" are both constant in lacp_port_create(), but comments mispleadingly suggest that "fast" can be changed via ioctl. The constant values control the value of "lp->lp_state", so it too is constant, and the code for assigning different value to it is essentially dead. Remove both "fast" and "active", and set "lp->lp_state" unconditionally; that gets rid of the dead code and misleading comments. Modified: stable/11/sys/net/ieee8023ad_lacp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/11/sys/net/ieee8023ad_lacp.c Wed Feb 1 03:32:49 2017 (r313037) +++ stable/11/sys/net/ieee8023ad_lacp.c Wed Feb 1 04:53:52 2017 (r313038) @@ -526,9 +526,6 @@ lacp_port_create(struct lagg_port *lgp) struct ifmultiaddr *rifma = NULL; int error; - boolean_t active = TRUE; /* XXX should be configurable */ - boolean_t fast = FALSE; /* Configurable via ioctl */ - link_init_sdl(ifp, (struct sockaddr *)&sdl, IFT_ETHER); sdl.sdl_alen = ETHER_ADDR_LEN; @@ -557,9 +554,7 @@ lacp_port_create(struct lagg_port *lgp) lacp_fill_actorinfo(lp, &lp->lp_actor); lacp_fill_markerinfo(lp, &lp->lp_marker); - lp->lp_state = - (active ? LACP_STATE_ACTIVITY : 0) | - (fast ? LACP_STATE_TIMEOUT : 0); + lp->lp_state = LACP_STATE_ACTIVITY; lp->lp_aggregator = NULL; lacp_sm_rx_set_expired(lp); LACP_UNLOCK(lsc);