Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Feb 2017 04:53:52 +0000 (UTC)
From:      Ravi Pokala <rpokala@FreeBSD.org>
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
Message-ID:  <201702010453.v114rqdG073902@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702010453.v114rqdG073902>