Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net/lagg Set SYNC bit of LACPDU when the interface is on...
details: https://anonhg.NetBSD.org/src/rev/c28c38fe9051
branches: trunk
changeset: 1026270:c28c38fe9051
user: yamaguchi <yamaguchi%NetBSD.org@localhost>
date: Tue Nov 16 04:01:11 2021 +0000
description:
Set SYNC bit of LACPDU when the interface is on STANDBY state
diffstat:
sys/net/lagg/if_lagg_lacp.c | 24 +++++++++++++++++++-----
1 files changed, 19 insertions(+), 5 deletions(-)
diffs (60 lines):
diff -r 8c9d629ef991 -r c28c38fe9051 sys/net/lagg/if_lagg_lacp.c
--- a/sys/net/lagg/if_lagg_lacp.c Mon Nov 15 21:45:46 2021 +0000
+++ b/sys/net/lagg/if_lagg_lacp.c Tue Nov 16 04:01:11 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_lagg_lacp.c,v 1.6 2021/10/19 07:52:33 yamaguchi Exp $ */
+/* $NetBSD: if_lagg_lacp.c,v 1.7 2021/11/16 04:01:11 yamaguchi Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause-NetBSD
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.6 2021/10/19 07:52:33 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.7 2021/11/16 04:01:11 yamaguchi Exp $");
#ifdef _KERNEL_OPT
#include "opt_lagg.h"
@@ -79,6 +79,7 @@
enum lacp_mux_state {
LACP_MUX_DETACHED,
LACP_MUX_WAITING,
+ LACP_MUX_STANDBY,
LACP_MUX_ATTACHED,
LACP_MUX_COLLECTING,
LACP_MUX_DISTRIBUTING,
@@ -2118,6 +2119,7 @@
LACP_AGGREGATE_WAIT_TIME);
lacpp->lp_pending++;
break;
+ case LACP_MUX_STANDBY:
case LACP_MUX_ATTACHED:
lacp_port_attached(lsc, lacpp);
lacp_disable_collecting(lacpp);
@@ -2173,10 +2175,22 @@
"lp_pending=%d, timer=%d", lacpp->lp_pending,
!LACP_TIMER_ISARMED(lacpp, LACP_TIMER_WAIT_WHILE));
- if (selected == LACP_SELECTED &&
- lacpp->lp_pending == 0) {
+ if (selected == LACP_UNSELECTED) {
+ next_state = LACP_MUX_DETACHED;
+ } else if (lacpp->lp_pending == 0) {
+ if (selected == LACP_SELECTED) {
+ next_state = LACP_MUX_ATTACHED;
+ } else if (selected == LACP_STANDBY) {
+ next_state = LACP_MUX_STANDBY;
+ } else {
+ next_state = LACP_MUX_DETACHED;
+ }
+ }
+ break;
+ case LACP_MUX_STANDBY:
+ if (selected == LACP_SELECTED) {
next_state = LACP_MUX_ATTACHED;
- } else if (selected == LACP_UNSELECTED) {
+ } else if (selected != LACP_STANDBY) {
next_state = LACP_MUX_DETACHED;
}
break;
Home |
Main Index |
Thread Index |
Old Index