Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net/lagg Added a kernel option to set SYNC bit of LACP



details:   https://anonhg.NetBSD.org/src/rev/061985b9a876
branches:  trunk
changeset: 1026271:061985b9a876
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Tue Nov 16 04:48:43 2021 +0000

description:
Added a kernel option to set SYNC bit of LACP
while the lagg interface is in STANDBY state

diffstat:

 sys/net/lagg/files.lagg     |   3 ++-
 sys/net/lagg/if_lagg_lacp.c |  10 ++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diffs (45 lines):

diff -r c28c38fe9051 -r 061985b9a876 sys/net/lagg/files.lagg
--- a/sys/net/lagg/files.lagg   Tue Nov 16 04:01:11 2021 +0000
+++ b/sys/net/lagg/files.lagg   Tue Nov 16 04:48:43 2021 +0000
@@ -1,8 +1,9 @@
-#      $NetBSD: files.lagg,v 1.2 2021/10/12 08:26:47 yamaguchi Exp $
+#      $NetBSD: files.lagg,v 1.3 2021/11/16 04:48:43 yamaguchi Exp $
 
 file   net/lagg/if_lagg.c              lagg & ether    needs-flag
 file   net/lagg/if_lagg_lacp.c         lagg & ether
 file   net/lagg/if_laggproto.c         lagg
 
 defflag opt_lagg.h                     LAGG_DEBUG LACP_DEBUG
+                                       LACP_STANDBY_SYNCED
 defparam opt_lagg.h                    LAGG_SETCAPS_RETRY
diff -r c28c38fe9051 -r 061985b9a876 sys/net/lagg/if_lagg_lacp.c
--- a/sys/net/lagg/if_lagg_lacp.c       Tue Nov 16 04:01:11 2021 +0000
+++ b/sys/net/lagg/if_lagg_lacp.c       Tue Nov 16 04:48:43 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_lagg_lacp.c,v 1.7 2021/11/16 04:01:11 yamaguchi Exp $       */
+/*     $NetBSD: if_lagg_lacp.c,v 1.8 2021/11/16 04:48:43 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.7 2021/11/16 04:01:11 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.8 2021/11/16 04:48:43 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_lagg.h"
@@ -2120,6 +2120,12 @@
                lacpp->lp_pending++;
                break;
        case LACP_MUX_STANDBY:
+#ifdef LACP_STANDBY_SYNCED
+               lacp_port_attached(lsc, lacpp);
+               lacp_disable_collecting(lacpp);
+               lacp_sm_assert_ntt(lacpp);
+#endif
+               break;
        case LACP_MUX_ATTACHED:
                lacp_port_attached(lsc, lacpp);
                lacp_disable_collecting(lacpp);



Home | Main Index | Thread Index | Old Index