From 3489e3b6396ee9944a6a2e19e675ca54c36993b4 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 22 Aug 2018 14:59:50 +0200 Subject: Update to FreeBSD head 2018-09-17 Git mirror commit 6c2192b1ef8c50788c751f878552526800b1e319. Update #3472. --- freebsd/sys/net/ieee8023ad_lacp.c | 69 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 2 deletions(-) (limited to 'freebsd/sys/net/ieee8023ad_lacp.c') diff --git a/freebsd/sys/net/ieee8023ad_lacp.c b/freebsd/sys/net/ieee8023ad_lacp.c index 2a30f4a3..9a70d6a1 100644 --- a/freebsd/sys/net/ieee8023ad_lacp.c +++ b/freebsd/sys/net/ieee8023ad_lacp.c @@ -196,13 +196,13 @@ static const char *lacp_format_portid(const struct lacp_portid *, char *, static void lacp_dprintf(const struct lacp_port *, const char *, ...) __attribute__((__format__(__printf__, 2, 3))); -static VNET_DEFINE(int, lacp_debug); +VNET_DEFINE_STATIC(int, lacp_debug); #define V_lacp_debug VNET(lacp_debug) SYSCTL_NODE(_net_link_lagg, OID_AUTO, lacp, CTLFLAG_RD, 0, "ieee802.3ad"); SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, debug, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(lacp_debug), 0, "Enable LACP debug logging (1=debug, 2=trace)"); -static VNET_DEFINE(int, lacp_default_strict_mode) = 1; +VNET_DEFINE_STATIC(int, lacp_default_strict_mode) = 1; SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, default_strict_mode, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(lacp_default_strict_mode), 0, "LACP strict protocol compliance default"); @@ -713,6 +713,8 @@ lacp_disable_distributing(struct lacp_port *lp) } lp->lp_state &= ~LACP_STATE_DISTRIBUTING; + if_link_state_change(sc->sc_ifp, + sc->sc_active ? LINK_STATE_UP : LINK_STATE_DOWN); } static void @@ -747,6 +749,9 @@ lacp_enable_distributing(struct lacp_port *lp) } else /* try to become the active aggregator */ lacp_select_active_aggregator(lsc); + + if_link_state_change(sc->sc_ifp, + sc->sc_active ? LINK_STATE_UP : LINK_STATE_DOWN); } static void @@ -1106,6 +1111,7 @@ lacp_compose_key(struct lacp_port *lp) case IFM_100_VG: case IFM_100_T2: case IFM_100_T: + case IFM_100_SGMII: key = IFM_100_TX; break; case IFM_1000_SX: @@ -1137,14 +1143,31 @@ lacp_compose_key(struct lacp_port *lp) break; case IFM_2500_KX: case IFM_2500_T: + case IFM_2500_X: key = IFM_2500_KX; break; case IFM_5000_T: + case IFM_5000_KR: + case IFM_5000_KR_S: + case IFM_5000_KR1: key = IFM_5000_T; break; case IFM_50G_PCIE: case IFM_50G_CR2: case IFM_50G_KR2: + case IFM_50G_SR2: + case IFM_50G_LR2: + case IFM_50G_LAUI2_AC: + case IFM_50G_LAUI2: + case IFM_50G_AUI2_AC: + case IFM_50G_AUI2: + case IFM_50G_CP: + case IFM_50G_SR: + case IFM_50G_LR: + case IFM_50G_FR: + case IFM_50G_KR_PAM4: + case IFM_50G_AUI1_AC: + case IFM_50G_AUI1: key = IFM_50G_PCIE; break; case IFM_56G_R4: @@ -1157,6 +1180,12 @@ lacp_compose_key(struct lacp_port *lp) case IFM_25G_LR: case IFM_25G_ACC: case IFM_25G_AOC: + case IFM_25G_T: + case IFM_25G_CR_S: + case IFM_25G_CR1: + case IFM_25G_KR_S: + case IFM_25G_AUI: + case IFM_25G_KR1: key = IFM_25G_PCIE; break; case IFM_40G_CR4: @@ -1164,14 +1193,50 @@ lacp_compose_key(struct lacp_port *lp) case IFM_40G_LR4: case IFM_40G_XLPPI: case IFM_40G_KR4: + case IFM_40G_XLAUI: + case IFM_40G_XLAUI_AC: + case IFM_40G_ER4: key = IFM_40G_CR4; break; case IFM_100G_CR4: case IFM_100G_SR4: case IFM_100G_KR4: case IFM_100G_LR4: + case IFM_100G_CAUI4_AC: + case IFM_100G_CAUI4: + case IFM_100G_AUI4_AC: + case IFM_100G_AUI4: + case IFM_100G_CR_PAM4: + case IFM_100G_KR_PAM4: + case IFM_100G_CP2: + case IFM_100G_SR2: + case IFM_100G_DR: + case IFM_100G_KR2_PAM4: + case IFM_100G_CAUI2_AC: + case IFM_100G_CAUI2: + case IFM_100G_AUI2_AC: + case IFM_100G_AUI2: key = IFM_100G_CR4; break; + case IFM_200G_CR4_PAM4: + case IFM_200G_SR4: + case IFM_200G_FR4: + case IFM_200G_LR4: + case IFM_200G_DR4: + case IFM_200G_KR4_PAM4: + case IFM_200G_AUI4_AC: + case IFM_200G_AUI4: + case IFM_200G_AUI8_AC: + case IFM_200G_AUI8: + key = IFM_200G_CR4_PAM4; + break; + case IFM_400G_FR8: + case IFM_400G_LR8: + case IFM_400G_DR4: + case IFM_400G_AUI8_AC: + case IFM_400G_AUI8: + key = IFM_400G_FR8; + break; default: key = subtype; break; -- cgit v1.2.3