jmatthew@ and I thought I had broken trunk(4) because we could never get
it to come up on our new boxes, while aggr(4) always worked fine. It
turns out we were only ever testing it with new drivers like ixl(4) or
mcx(4), and we hadn't added code to them to properly report baudrate.

This tickled an edge condition in the trunk lacp code where it would
effectively only select aggregators with a baudrate. This diff tweaks
the test so an interface with baudrate 0 can be selected if no other
aggregator already exists.

This should also make it more likely that things like etherip or egre
will work with trunk(4) in lacp mode, but there may still be issues with
how they report link state which might make trunk(4) unhappy.

We've also fixed ixl and mcx so they do report baudrate, but I still
think trunk(4) should cope.

ok?

Index: trunklacp.c
===================================================================
RCS file: /cvs/src/sys/net/trunklacp.c,v
retrieving revision 1.31
diff -u -p -r1.31 trunklacp.c
--- trunklacp.c 29 Apr 2019 03:54:52 -0000      1.31
+++ trunklacp.c 2 Oct 2019 00:28:00 -0000
@@ -919,7 +919,7 @@ lacp_select_active_aggregator(struct lac
                 *  or, the total aggregated speed is higher
                 *  or, it is already the chosen aggregator
                 */
-               if ((best_la != NULL && LACP_SYS_PRI(la->la_partner) <
+               if ((best_la == NULL || LACP_SYS_PRI(la->la_partner) <
                     LACP_SYS_PRI(best_la->la_partner)) ||
                    speed > best_speed ||
                    (speed == best_speed &&

Reply via email to