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. CID: 1305692 CID: 1305734 Reported by: asomers Reviewed by: asomers MFC after: 1 week Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D9302
This commit is contained in:
parent
cc8440a569
commit
d592868ebf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=312678
@ -528,9 +528,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;
|
||||
|
||||
@ -559,9 +556,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);
|
||||
|
Loading…
Reference in New Issue
Block a user