Date: Fri, 19 Jun 2020 06:35:58 +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: r362366 - in stable/11: sbin/ifconfig sys/net Message-ID: <202006190635.05J6Zwiu020015@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rpokala Date: Fri Jun 19 06:35:57 2020 New Revision: 362366 URL: https://svnweb.freebsd.org/changeset/base/362366 Log: MFC r362078: 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. Modified: stable/11/sbin/ifconfig/iflagg.c stable/11/sys/net/if_lagg.c stable/11/sys/net/if_lagg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/iflagg.c ============================================================================== --- stable/11/sbin/ifconfig/iflagg.c Fri Jun 19 06:23:55 2020 (r362365) +++ stable/11/sbin/ifconfig/iflagg.c Fri Jun 19 06:35:57 2020 (r362366) @@ -128,8 +128,8 @@ setlaggsetopt(const char *val, int d, int s, const str 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"); @@ -301,8 +301,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), }; Modified: stable/11/sys/net/if_lagg.c ============================================================================== --- stable/11/sys/net/if_lagg.c Fri Jun 19 06:23:55 2020 (r362365) +++ stable/11/sys/net/if_lagg.c Fri Jun 19 06:35:57 2020 (r362366) @@ -1194,7 +1194,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 { @@ -1238,8 +1238,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: @@ -1292,14 +1292,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; Modified: stable/11/sys/net/if_lagg.h ============================================================================== --- stable/11/sys/net/if_lagg.h Fri Jun 19 06:23:55 2020 (r362365) +++ stable/11/sys/net/if_lagg.h Fri Jun 19 06:35:57 2020 (r362366) @@ -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 */ u_int ro_count; /* number of ports */ u_int ro_active; /* active port count */ u_int ro_flapping; /* number of flapping */ @@ -160,7 +160,8 @@ struct lagg_reqopts { #define SIOCSLAGGOPTS _IOW('i', 153, struct lagg_reqopts) #define LAGG_OPT_BITS "\020\001USE_FLOWID\005LACP_STRICT" \ - "\006LACP_TXTEST\007LACP_RXTEST" + "\006LACP_TXTEST\007LACP_RXTEST" \ + "\010LACP_FAST_TIMO" #ifdef _KERNEL
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006190635.05J6Zwiu020015>