Decode the "LACP Fast Timeout" LAGG option flag
r286700 added the "lacp_fast_timeout" option to `ifconfig', but we forgot to include the new option in the string used to decode the option bits. Add "LACP_FAST_TIMO" to LAGG_OPT_BITS. Also, s/LAGG_OPT_LACP_TIMEOUT/LAGG_OPT_LACP_FAST_TIMO/g , to be clearer that the flag indicates "Fast Timeout" mode. Reported by: Greg Foster <gfoster at panasas dot com> Reviewed by: jpaetzel MFC after: 1 week Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D25239
This commit is contained in:
parent
d06110e566
commit
2a73c8f5e1
@ -141,8 +141,8 @@ setlaggsetopt(const char *val, int d, int s, const struct afswtch *afp)
|
||||
case -LAGG_OPT_LACP_TXTEST:
|
||||
case LAGG_OPT_LACP_RXTEST:
|
||||
case -LAGG_OPT_LACP_RXTEST:
|
||||
case LAGG_OPT_LACP_TIMEOUT:
|
||||
case -LAGG_OPT_LACP_TIMEOUT:
|
||||
case LAGG_OPT_LACP_FAST_TIMO:
|
||||
case -LAGG_OPT_LACP_FAST_TIMO:
|
||||
break;
|
||||
default:
|
||||
err(1, "Invalid lagg option");
|
||||
@ -316,8 +316,8 @@ static struct cmd lagg_cmds[] = {
|
||||
DEF_CMD("-lacp_txtest", -LAGG_OPT_LACP_TXTEST, setlaggsetopt),
|
||||
DEF_CMD("lacp_rxtest", LAGG_OPT_LACP_RXTEST, setlaggsetopt),
|
||||
DEF_CMD("-lacp_rxtest", -LAGG_OPT_LACP_RXTEST, setlaggsetopt),
|
||||
DEF_CMD("lacp_fast_timeout", LAGG_OPT_LACP_TIMEOUT, setlaggsetopt),
|
||||
DEF_CMD("-lacp_fast_timeout", -LAGG_OPT_LACP_TIMEOUT, setlaggsetopt),
|
||||
DEF_CMD("lacp_fast_timeout", LAGG_OPT_LACP_FAST_TIMO, setlaggsetopt),
|
||||
DEF_CMD("-lacp_fast_timeout", -LAGG_OPT_LACP_FAST_TIMO, setlaggsetopt),
|
||||
DEF_CMD_ARG("flowid_shift", setlaggflowidshift),
|
||||
DEF_CMD_ARG("rr_limit", setlaggrr_limit),
|
||||
};
|
||||
|
@ -1246,7 +1246,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
if (lsc->lsc_strict_mode != 0)
|
||||
ro->ro_opts |= LAGG_OPT_LACP_STRICT;
|
||||
if (lsc->lsc_fast_timeout != 0)
|
||||
ro->ro_opts |= LAGG_OPT_LACP_TIMEOUT;
|
||||
ro->ro_opts |= LAGG_OPT_LACP_FAST_TIMO;
|
||||
|
||||
ro->ro_active = sc->sc_active;
|
||||
} else {
|
||||
@ -1305,8 +1305,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
case -LAGG_OPT_LACP_RXTEST:
|
||||
case LAGG_OPT_LACP_STRICT:
|
||||
case -LAGG_OPT_LACP_STRICT:
|
||||
case LAGG_OPT_LACP_TIMEOUT:
|
||||
case -LAGG_OPT_LACP_TIMEOUT:
|
||||
case LAGG_OPT_LACP_FAST_TIMO:
|
||||
case -LAGG_OPT_LACP_FAST_TIMO:
|
||||
valid = lacp = 1;
|
||||
break;
|
||||
default:
|
||||
@ -1366,14 +1366,14 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
case -LAGG_OPT_LACP_STRICT:
|
||||
lsc->lsc_strict_mode = 0;
|
||||
break;
|
||||
case LAGG_OPT_LACP_TIMEOUT:
|
||||
case LAGG_OPT_LACP_FAST_TIMO:
|
||||
LACP_LOCK(lsc);
|
||||
LIST_FOREACH(lp, &lsc->lsc_ports, lp_next)
|
||||
lp->lp_state |= LACP_STATE_TIMEOUT;
|
||||
LACP_UNLOCK(lsc);
|
||||
lsc->lsc_fast_timeout = 1;
|
||||
break;
|
||||
case -LAGG_OPT_LACP_TIMEOUT:
|
||||
case -LAGG_OPT_LACP_FAST_TIMO:
|
||||
LACP_LOCK(lsc);
|
||||
LIST_FOREACH(lp, &lsc->lsc_ports, lp_next)
|
||||
lp->lp_state &= ~LACP_STATE_TIMEOUT;
|
||||
|
@ -148,7 +148,7 @@ struct lagg_reqopts {
|
||||
#define LAGG_OPT_LACP_STRICT 0x10 /* LACP strict mode */
|
||||
#define LAGG_OPT_LACP_TXTEST 0x20 /* LACP debug: txtest */
|
||||
#define LAGG_OPT_LACP_RXTEST 0x40 /* LACP debug: rxtest */
|
||||
#define LAGG_OPT_LACP_TIMEOUT 0x80 /* LACP timeout */
|
||||
#define LAGG_OPT_LACP_FAST_TIMO 0x80 /* LACP fast timeout */
|
||||
#define LAGG_OPT_RR_LIMIT 0x100 /* RR stride */
|
||||
u_int ro_count; /* number of ports */
|
||||
u_int ro_active; /* active port count */
|
||||
@ -162,7 +162,7 @@ struct lagg_reqopts {
|
||||
|
||||
#define LAGG_OPT_BITS "\020\001USE_FLOWID\003USE_NUMA" \
|
||||
"\005LACP_STRICT\006LACP_TXTEST" \
|
||||
"\007LACP_RXTEST"
|
||||
"\007LACP_RXTEST\010LACP_FAST_TIMO"
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user