add ac_trunkport to arpcom so trunks can coordinate owning an interface
Ethernet interfaces can be used by trunk(4), and i'm about to commit
a new aggr(4) driver which should not be able to use an interface
while trunk owns it and visa versa.
record when trunk takes over an interface by setting ac_trunkport
this will be used to prevent trunk and the upcoming aggr driver
from taking ownership of an Ethernet interface at the same time.
add aggr(4), a dedicated driver that implements 802.1AX link aggregation
802.1AX (formerly known as 802.3ad) describes the Link Aggregation
Control Protocol (LACP) and how to use it in a bunch of different
state machines to control when to bundle interfaces into an
technically the trunk(4) driver already implements support for
802.1AX, but it had a couple of problems i struggled to deal with
as part of that driver. firstly, i couldnt easily make the output
path in trunk mpsafe without getting bogged down, and the state
machine handling had a few hard to diagnose edge cases that i couldnt
the new driver has an mpsafe output path, and implements ifq bypass
like vlan(4) does. this means output with aggr(4) is up to twice
as fast as trunk(4). the implementation of the state machines as
per the standard means the driver behaves more correctly in edge
cases like when a physical link looks like it is up, but is logically
the code has been good enough for me to use in production, but it
does need more work. that can happen in tree now instead of carrying
a large diff around.
some testing by ccardenas@, hrvoje popovski, and jmatthew@
ok deraadt@ ccardenas@ jmatthew@
|message||wire up aggr|
add aggr, but leave it commented out for now.
it needs to be a bit more robust before making it more available to try.
tweak mtu handling and propagate mtu setting to trunkports
make setting a trunkports mtu to its current mtu a nop. set a
trunkports mtu to the aggr mtu when the port is getting added. set
the mtu on all trunkports when the aggr mtu is set so things look
consistent. restore a trunkports mtu when it is removed from an
this is mostly cosmetic since the mtu on trunkports isn't really
|message||report a port as active to userland if it is muxed|
|message||move a declaration before a statement.|
|message||init the log of tx times to somewhere in the past when adding a port.|
iterate over distributing ports when populating the tx map, not all ports
this probably explains why ive seen a box decide not to use a
distributing port, even though the state machine and all the lacp
state flags say it's fine. it may also explain why jmatthew@ has
seen a port still transmitting after it's been removed from an
initialise sc_lacp_timeout to AGGR_LACP_TIMEOUT_SLOW, not 0;
it's the same, but there was a misleading comment on the same line
which this cleans up too.
|message||fix the $OpenBSD$ tag|
|message||pretend to handle setting trunkproto, but only support setting it to lacp|
Use multi-threaded task queues to prevent deadlocks in the case where a
tasks sleeps and expects to be woken up by a task that will be submitted
to the same task queue. That scenario happens in the output hotplug code.
We probably should spend some time on tuning the number of threads but
let's make things work correctly first.
Based on some serious debugging done by Sven M. Hallberg.
Since on a SCAN each node is provided in its own event,
the limited ring for asynchronous can easily overflow.
Work around this by chaining the mbufs into a list.
Fixes a panic for jcs@
If there is no explicit device class match for a given boot device,
use DV_IFNET. This makes all network interfaces available for root
Requested by and OK patrick@
Fix vpci_bus_map() if the case where the "child" space in the "ranges"
property doesn't start at address zero.
Although the period is specified in seconds, convert to milliseconds so
uneven periods are not truncated after integer division by two.
Input and OK cheloha