third_party/linux: fix LACP issues
This fixes two major issues with the Linux LACP implementation:
First, the bond interface indicates carrier availability before any port
is even in aggregation state. It pretty much only cares about underlying
port carrier state which is not meaningful in LACP-controlled
aggregation.
Second, individual ports are added to the list of transmitting ports
immediately after coming up. This causes packets to be transmitted
before the LACP state indicates that this should happen.
Fix both of these issues by only enabling ports when the LACP state
machine places them in collecting/distributing state and making the bond
carrier state dependent on ports being enabled. This makes the interface
also behave logically consistent, i.e. it can transmit packets when its
carrier is reported up and not when its carrier is reported down.
While in there, fix some timer-related annoyances which make convergence
unnecessarily slow.
This also comes with a ktest which can be used for testing and
verification of these changes.
Change-Id: I60d0ed483f4f4ccea4d582b80e2bb29ff741783d
Reviewed-on: https://review.monogon.dev/c/monogon/+/3073
Reviewed-by: Serge Bazanski <serge@monogon.tech>
Tested-by: Jenkins CI
diff --git a/third_party/linux/linux-metropolis.config b/third_party/linux/linux-metropolis.config
index 07f150e..59e8d6f 100644
--- a/third_party/linux/linux-metropolis.config
+++ b/third_party/linux/linux-metropolis.config
@@ -1285,7 +1285,7 @@
# CONFIG_NET_SCH_ETF is not set
# CONFIG_NET_SCH_TAPRIO is not set
# CONFIG_NET_SCH_GRED is not set
-# CONFIG_NET_SCH_NETEM is not set
+CONFIG_NET_SCH_NETEM=y
# CONFIG_NET_SCH_DRR is not set
# CONFIG_NET_SCH_MQPRIO is not set
# CONFIG_NET_SCH_SKBPRIO is not set