summaryrefslogtreecommitdiff
path: root/sys/net/if_trunk.c
AgeCommit message (Collapse)Author
2009-01-27handle HW VLAN tags being passed down; from BradChristian Weisgerber
2009-01-27make the hardware/no hardware tag stripping cases consistent and don'tChristian Weisgerber
hash the VLAN priority; ok henning@
2008-12-14Allow trunk_hashmbuf() to take HW VLAN tagging into consideration.Brad Smith
ok mpf@ naddy@
2008-12-14Since trunk_hashmbuf() and thus trunk_lb_gethdr() are no longer specificBrad Smith
to the loadbalance code rename trunk_lb_gethdr() to just trunk_gethr(). ok mpf@
2008-11-28Eliminate the redundant bits of code for MTU and multicast handlingBrad Smith
from the individual drivers now that ether_ioctl() handles this. Shrinks the i386 kernels by.. RAMDISK - 2176 bytes RAMDISKB - 1504 bytes RAMDISKC - 736 bytes Tested by naddy@/okan@/sthen@/brad@/todd@/jmc@ and lots of users. Build tested on almost all archs by todd@/brad@ ok naddy@
2008-11-16Make sure to increment the the output error counter ifBrad Smith
not using TRUNK_PROTO_NONE and there are no member ports. ok mpf@
2008-11-08Take into account that our ether_input() already strips theMarco Pfatschbacher
ethernet header. This lets us actually process the incoming LACP-Packets. It should now work with a lot more switches. At least a Catalyst 3500 seems happy. OK brad@
2008-11-04Move the trunk port count check from trunk_lb_start() to trunk_start()Brad Smith
before the protocol start routine is called so as to cover all protocols with the same check. ok mpf@
2008-10-30Fix building with !INET6 kernels.Brad Smith
2008-10-28Remove return at the end of a void function.Brad Smith
2008-10-28In trunk_media_status() mark the interface as active if any ports areBrad Smith
active rather than just the primary being UP. From FreeBSD Ok mpf@
2008-10-28In trunk_lb_start() port % count will never be greater thanBrad Smith
TRUNK_MAX_PORTS so nuke the test. From FreeBSD Ok mpf@
2008-10-28Feed IPv6 flow label to hash calculation.Brad Smith
From FreeBSD Ok mpf@
2008-10-28Show the ACTIVE flag in ifconfig for the single interface that isBrad Smith
actually active in failover mode rather than all interfaces with a link. This makes it clear if the master interface is in use or one of the backup links. From FreeBSD Tested by jmc@ Ok mpf@
2008-10-02First step towards cleaning up the Ethernet driver ioctl handling.Brad Smith
Move calling ether_ioctl() from the top of the ioctl function, which at the moment does absolutely nothing, to the default switch case. Thus allowing drivers to define their own ioctl handlers and then falling back on ether_ioctl(). The only functional change this results in at the moment is having all Ethernet drivers returning the proper errno of ENOTTY instead of EINVAL/ENXIO when encountering unknown ioctl's. Shrinks the i386 kernels by.. RAMDISK - 1024 bytes RAMDISKB - 1120 bytes RAMDISKC - 832 bytes Tested by martin@/jsing@/todd@/brad@ Build tested on almost all archs by todd@/brad@ ok jsing@
2008-09-17remove dead stores and newly created unused variables.Charles Longeau
fix potential use of uninitialized value in trunk_port_ioctl() function. Found by LLVM/Clang Static Analyzer. ok mpf@ henning@
2008-08-07do not touch m after IFQ_ENQUEUE()+if_start().Damien Bergamini
ok brad@, mpf@, henning@, reyk@
2008-08-06fix trunk breakage that sneaked in with the lacp diff:Reyk Floeter
- don't use in-kernel IFMEDIA ioctls in lacp and remove two KASSERTs that caused reliable panics - the lacp key can be locally assigned and we don't need to query the media subtype here. - unbreak failover/loadbalance/broadcast status handling. Reported by brad@ ok deraadt@
2008-07-30Prevent a divide by zero panic if trunkproto loadbalance isMarco Pfatschbacher
used w/out any trunkports. Patch from Dmitri Alenitchev. OK reyk@
2008-06-15Add 802.3ad LACP support for trunk(4).Marco Pfatschbacher
Implementation from NetBSD. Ported via FreeBSD's version in trunk^Wlagg(4). This is still work in progress. Tested with a HP ProCurve 3500. OK reyk@
2008-06-14Move bpf_mtap_hdr() above the trunk_*_input() routines.Marco Pfatschbacher
This makes it easier to add trunk protocols that consume some packets. Add a special case for the failover protocol, to prevent shoving duplicates to bpf. (Not beautiful, but it has to do for the moment). OK reyk@, claudio@
2008-06-13Move the responsibility to free received packets on trunked interfacesMarco Pfatschbacher
from ether_input() into trunk_input() where it can be handled in a smarter way. OK claudio@ and reyk@ on an earlier version.
2008-06-08Use m_freem() instead of m_free() in trunk_start() to ensure that theBrad Smith
full mbuf chain is being free'd. ok reyk@
2008-05-07enable tx mitigation when putting packets on the wire by switching fromDavid Gwynne
calls to ifp->if_start to if_start(). these are the obviously right cases where we can do that, the less obvious ones may follow as theyre figured out. deraadt@ said to go for it
2008-01-10return with ENOTTY instead of EINVAL for unknown ioctl requests to trunkBrad Smith
ports. ok reyk@ dlg@
2007-11-26typos; ok jmc@Martynas Venckus
sys/netinet/in_pcb.c and sys/net/bridgestp.c ok henning@ sys/dev/pci/bktr/* ok jakemsr@
2007-11-20Fix possible mbuf leak on error. ok reyk@Can Erkin Acar
2007-10-22use the input mbuf for the first active port instead of copying it inReyk Floeter
the broadcast start routing. ok pyr@
2007-10-22Add a broadcast mode to trunk(4). This mode sends frames on allPierre-Yves Ritschard
ports and receives frame on any port. This allows interaction with some L2 configurations. with input and ok reyk@
2007-09-15malloc sweep:Henning Brauer
-remove useless casts -MALLOC/FREE -> malloc/free -use M_ZERO where appropriate instead of seperate bzero feedback & ok krw, hshoexer
2007-09-07use M_ZEROReyk Floeter
2007-09-06bump the copyright while touching these filesReyk Floeter
2007-09-06With a trunk(4) interface in fail over mode the trunk(4) interfaceReyk Floeter
will show input errors for packets received from any of the ports that are part of a fail over interface but are not the "master" port at the time. This fixes the problem by checking the error condition correctly. From brad at comstyle dot com
2007-05-26one extern seems to be better than 20 for ifqmaxlen; ok krwJason Wright
2007-04-26extend the trunk protocol API with some additional callbacks requiredReyk Floeter
for future work. also move the repeated tx start code into a common function. parts of it are merged from FreeBSD's trunk(4) port. oh, wait... they renamed it to 'lagg(4)' because a little green guy from Cizzco-Eeeh told them "trunk is for VLANs, trunk is for VLANs". Bad FreeBSD, don't listen to the little green guy from Cizzco-Eeeh! ok claudio@
2007-01-31handle the full duplex link state in trunk(4). load sharing trunksReyk Floeter
with at least two ports are always handled as full fuplex links. this change will allow trunks as edge ports in a rstp bridge(4). ok brad@ pyr@
2006-05-28check if the interface is active and UP. some, but not all, networkReyk Floeter
drivers report an active link state even if the interface is DOWN. this should fix trunk with various ethernet devices. ok brad@
2006-05-23knf and remove an unneeded debug messageReyk Floeter
2006-05-23addReyk Floeter
2006-05-20bump copyrightReyk Floeter
2006-05-20drop packets received on inactive failover ports without increasing theReyk Floeter
error counter. just silently drop them... figured out by todd@, ok brad@
2006-05-16the ifp->if_linkstatehooks may be NULL, add an extra check to avoidReyk Floeter
possible kernel panic. this happened to me by using tun(4) in layer 2 mode (link0 flag) as a trunk port for testing.
2006-03-25allow bpf(4) to ignore packets based on their direction (inbound orDamien Miller
outbound), using a new BIOCSDIRFILT ioctl; guidance, feedback and ok canacar@
2006-03-11splimp -> splnetBrad Smith
2006-03-04With the exception of two other small uncommited diffs this movesBrad Smith
the remainder of the network stack from splimp to splnet. ok miod@
2006-01-04Move bpf_mtap_hdr() after trunk_*_input() so that we hopefully see only oneBrad Smith
copy of the packet with bpf. From mcbride@ some testing by todd@, ok reyk@
2006-01-04Remove redundant calls to bpfdetach.Can Erkin Acar
ok brad@
2005-12-21knfReyk Floeter
2005-12-21fix possible NULL pointer, thanks to Marco MolteniReyk Floeter
2005-12-18Update my e-mail address in the copyright statement, no binary changes.Reyk Floeter