diff options
author | rpokala <rpokala@FreeBSD.org> | 2017-02-01 04:54:23 +0000 |
---|---|---|
committer | rpokala <rpokala@FreeBSD.org> | 2017-02-01 04:54:23 +0000 |
commit | fff555f1c38b463fad6db9bf58798e78af22a0aa (patch) | |
tree | 75669e5825b87529532623ce24d3a6ec1d22c838 | |
parent | 66719a9a68fedee2a31540dbb147c992ac787574 (diff) | |
download | FreeBSD-src-fff555f1c38b463fad6db9bf58798e78af22a0aa.zip FreeBSD-src-fff555f1c38b463fad6db9bf58798e78af22a0aa.tar.gz |
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.
-rw-r--r-- | sys/net/ieee8023ad_lacp.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/net/ieee8023ad_lacp.c b/sys/net/ieee8023ad_lacp.c index 36665ca..7ba5423 100644 --- a/sys/net/ieee8023ad_lacp.c +++ b/sys/net/ieee8023ad_lacp.c @@ -523,9 +523,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 */ - bzero((char *)&sdl, sizeof(sdl)); sdl.sdl_len = sizeof(sdl); sdl.sdl_family = AF_LINK; @@ -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); |