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 active when the port is distributing
details: https://anonhg.NetBSD.org/src/rev/f344cde4977f
branches: trunk
changeset: 364601:f344cde4977f
user: yamaguchi <yamaguchi%NetBSD.org@localhost>
date: Thu Mar 31 03:05:41 2022 +0000
description:
set active when the port is distributing
diffstat:
sys/net/lagg/if_laggproto.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diffs (44 lines):
diff -r 8254f18013b9 -r f344cde4977f sys/net/lagg/if_laggproto.c
--- a/sys/net/lagg/if_laggproto.c Thu Mar 31 03:04:04 2022 +0000
+++ b/sys/net/lagg/if_laggproto.c Thu Mar 31 03:05:41 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_laggproto.c,v 1.3 2022/03/31 02:07:26 yamaguchi Exp $ */
+/* $NetBSD: if_laggproto.c,v 1.4 2022/03/31 03:05:41 yamaguchi Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause-NetBSD
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_laggproto.c,v 1.3 2022/03/31 02:07:26 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_laggproto.c,v 1.4 2022/03/31 03:05:41 yamaguchi Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -470,16 +470,19 @@
pport = lp->lp_proto_ctx;
if (pport->lpp_active) {
- SET(resp->rp_flags, LAGG_PORT_ACTIVE);
- if (fovr->fo_rx_all) {
- SET(resp->rp_flags, LAGG_PORT_COLLECTING);
- }
-
lp0 = lagg_link_active(psc, NULL, &psref);
if (lp0 == lp) {
SET(resp->rp_flags,
- LAGG_PORT_COLLECTING | LAGG_PORT_DISTRIBUTING);
+ (LAGG_PORT_ACTIVE |
+ LAGG_PORT_COLLECTING |
+ LAGG_PORT_DISTRIBUTING));
+ } else {
+ if (fovr->fo_rx_all) {
+ SET(resp->rp_flags,
+ LAGG_PORT_COLLECTING);
+ }
}
+
if (lp0 != NULL)
lagg_port_putref(lp0, &psref);
}
Home |
Main Index |
Thread Index |
Old Index