diff options
author | thompsa <thompsa@FreeBSD.org> | 2007-04-10 00:27:25 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2007-04-10 00:27:25 +0000 |
commit | 0f00c64853f65a32f7ca644870fd6ceba5b3ce7d (patch) | |
tree | 474c91da17bd5f3ae59c9c4351d9aafe27da1c11 /sys/net/if.c | |
parent | 84121b90712f942d2525e9acdf31d8cb47c4e6ef (diff) | |
download | FreeBSD-src-0f00c64853f65a32f7ca644870fd6ceba5b3ce7d.zip FreeBSD-src-0f00c64853f65a32f7ca644870fd6ceba5b3ce7d.tar.gz |
Add the trunk(4) driver for providing link aggregation, failover and fault
tolerance. This driver allows aggregation of multiple network interfaces as
one virtual interface using a number of different protocols/algorithms.
failover - Sends traffic through the secondary port if the master becomes
inactive.
fec - Supports Cisco Fast EtherChannel.
lacp - Supports the IEEE 802.3ad Link Aggregation Control Protocol
(LACP) and the Marker Protocol.
loadbalance - Static loadbalancing using an outgoing hash.
roundrobin - Distributes outgoing traffic using a round-robin scheduler
through all active ports.
This code was obtained from OpenBSD and this also includes 802.3ad LACP support
from agr(4) in NetBSD.
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 33adc50..5eee0d4 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -96,6 +96,7 @@ SYSCTL_INT(_net_link, OID_AUTO, log_link_state_change, CTLFLAG_RW, void (*bstp_linkstate_p)(struct ifnet *ifp, int state); void (*ng_ether_link_state_p)(struct ifnet *ifp, int state); +void (*trunk_linkstate_p)(struct ifnet *ifp, int state); struct mbuf *(*tbr_dequeue_ptr)(struct ifaltq *, int) = NULL; @@ -1378,6 +1379,10 @@ do_link_state_change(void *arg, int pending) KASSERT(bstp_linkstate_p != NULL,("if_bridge bstp not loaded!")); (*bstp_linkstate_p)(ifp, link_state); } + if (ifp->if_trunk) { + KASSERT(trunk_linkstate_p != NULL,("if_trunk not loaded!")); + (*trunk_linkstate_p)(ifp, link_state); + } devctl_notify("IFNET", ifp->if_xname, (link_state == LINK_STATE_UP) ? "LINK_UP" : "LINK_DOWN", NULL); @@ -2593,6 +2598,7 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, int len) case IFT_L2VLAN: case IFT_BRIDGE: case IFT_ARCNET: + case IFT_IEEE8023ADLAG: bcopy(lladdr, LLADDR(sdl), len); break; default: |