summaryrefslogtreecommitdiffstats
path: root/sys/net/ieee8023ad_lacp.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r290450:smh2015-11-131-2/+7
| | | | | | Add sysctl to control LACP strict compliance default Sponsored by: Multiplay
* MFC r286700hiren2015-09-151-1/+1
| | | | Make LAG LACP fast timeout tunable through IOCTL.
* MFC 272159,272161,272386,272446,272547,272548,273210:hrs2015-09-121-69/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make lagg protos a enum. - When reconfiguring protocol on a lagg, first set it to LAGG_PROTO_NONE, then drop lock, run the attach routines, and then set it to specific proto. This removes tons of WITNESS warnings. - Make lagg protocol attach handlers not failing and allocate memory with M_WAITOK. - Virtualize lagg(4) cloner. This change fixes a panic when tearing down if_lagg(4) interfaces which were cloned in a vnet jail. Sysctl nodes which are dynamically generated for each cloned interface (net.link.lagg.N.*) have been removed, and use_flowid and flowid_shift ifconfig(8) parameters have been added instead. Flags and per-interface statistics counters are displayed in "ifconfig -v". - Separate option handling from SIOC[SG]LAGG to SIOC[SG]LAGGOPTS for backward compatibility with old ifconfig(8). - Move L2 addr configuration for the primary port to a taskqueue. This fixes LOR of softc rmlock in iflladdr_event handlers. - Call if_delmulti_ifma() after LACP_UNLOCK(). This fixes another LOR. - Fix a panic in lacp_transit_expire(). - Fix a panic in lagg_input() upon shutting down a port. - Use printb() for boolean flags in ro_opts and actor_state for LACP. - Fix lladdr configuration which could prevent LACP mode from working. - Fix LORs when a laggport interface has an IPv6 LLA.
* MFC r281236 -- extended media types in if_media.h.erj2015-05-291-0/+42
| | | | Approved by: jfv (mentor)
* MFC r275358 r275483 r276982 - Removing M_FLOWID by hps@hiren2015-04-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r275358: Start process of removing the use of the deprecated "M_FLOWID" flag from the FreeBSD network code. The flag is still kept around in the "sys/mbuf.h" header file, but does no longer have any users. Instead the "m_pkthdr.rsstype" field in the mbuf structure is now used to decide the meaning of the "m_pkthdr.flowid" field. To modify the "m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX" macros as defined in the "sys/mbuf.h" header file. This patch introduces new behaviour in the transmit direction. Previously network drivers checked if "M_FLOWID" was set in "m_flags" before using the "m_pkthdr.flowid" field. This check has now now been replaced by checking if "M_HASHTYPE_GET(m)" is different from "M_HASHTYPE_NONE". In the future more hashtypes will be added, for example hashtypes for hardware dedicated flows. "M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is valid and has no particular type. This change removes the need for an "if" statement in TCP transmit code checking for the presence of a valid flowid value. The "if" statement mentioned above is now a direct variable assignment which is then later checked by the respective network drivers like before. r275483: Remove M_FLOWID from SCTP code. r276982: Remove no longer used "M_FLOWID" flag from mbuf.h and update the netisr manpage. Note: The FreeBSD version has been bumped. Reviewed by: hps, tuexen Sponsored by: Limelight Networks
* MFC r265232asomers2014-10-061-2/+12
| | | | | | | | | | | Fix a panic caused by doing "ifconfig -am" while a lagg is being destroyed. The thread that is destroying the lagg has already set sc->sc_psc=NULL when the "ifconfig -am" thread gets to lacp_req(). It tries to dereference sc->sc_psc and panics. The solution is for lacp_req() to check the value of sc->sc_psc. If NULL, harmlessly return an lacp_opreq structure full of zeros. Full details in GNATS. PR: 189003
* MFC r260070scottl2014-01-021-1/+1
| | | | | | | | | | | Multi-queue NIC drivers and multi-port lagg tend to use the same lower bits of the flowid as each other, resulting in a poor distribution of packets among queues in certain cases. Work around this by adding a set of sysctls for controlling a bit-shift on the flowid when doing multi-port aggrigation in lagg and lacp. By default, lagg/lacp will now use bits 16 and higher instead of 0 and higher. Obtained from: Netflix
* MFC r256689:ae2013-11-111-2/+39
| | | | | | | | | | | | | | Use the same actor key for media types of the same speed. PR: 176097 MFC r256832: Add a note that lacp_compose_key() should be updated, when new media types will be added. Submitted by: melifaro Approved by: re (hrs)
* Break out the static, global LACP debug options into a per-lagg unitadrian2013-07-261-18/+54
| | | | | | | | | | | | | | | sysctl tree. * Create a net.link.lagg.X.lacp node * Add a debug node under that for tx_test and rx_test * Add lacp_strict_mode, defaulting to 1 tx_test and rx_test are still a bitmap of unit numbers for now. At some point it would be nice to create child nodes of the lagg bundle for each sub-interface, and then populate those with various knobs and statistics. Sponsored by: Netflix
* Fix typo.adrian2013-07-251-1/+1
| | | | Sponsored by: Netflix
* Bring over some link aggregation / LACP protocol improvements and debuggingadrian2013-07-131-17/+64
| | | | | | | | | | | | | | | | | | | additions. * Add some new tracing events to aid in debugging. * Add in a debugging mode to drop transmit and received frames, specifically to test whether seeing or hearing heartbeats correctly cause LACP to drop the port. * Add in (and make default) a strict LACP mode, which requires the heartbeat on a port to be heard before it's used. Sometimes vendor ports will hang but the link layer stays up, resulting in hung traffic. * Add logging the number of link status flaps, again to aid in debugging badly behaving switch ports. * Calculate the lagg interface port speed as the multiple of the configured ports, rather than the largest. Obtained from: Netflix MFC after: 2 weeks
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-051-2/+2
| | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually
* Turn LACP debugging from a compile time option to a sysctl, it is very handy tothompsa2012-05-261-43/+37
| | | | | | | be able to turn it on when negotiation to a switch misbehaves. Submitted by: Andrew Boyer MFC after: 3 days
* Add the ability to set which packet layers are used for the load balance hashthompsa2012-03-061-1/+1
| | | | calculation.
* Using the flowid in the mbuf assumes the network card is giving a good hash forthompsa2012-02-221-1/+1
| | | | | | | | | the traffic flow, this may not be the case giving poor traffic distribution. Add a sysctl which allows us to fall back to our own flow hash code. PR: kern/164901 Submitted by: Eugene Grosbein MFC after: 1 week
* Use the flowid if its available for selecting the tx port.thompsa2009-04-301-1/+4
|
* Update the interface baudrate taking into account the max speed for thethompsa2008-12-171-0/+2
| | | | different aggregation protocols.
* Switch the LACP state machine over to its own mutex to protect the internals,thompsa2008-03-161-124/+103
| | | | | | | this means that it no longer grabs the lagg rwlock. Use two port table arrays which list the active ports for Tx and switch between them with an atomic op. Now the lagg rwlock is only exclusively locked for management (ioctls) and queuing of lacp control frames isnt needed.
* Pass any unmatched slowprotocols frames up the stack instead of dropping them,thompsa2007-12-311-5/+5
| | | | there are more subtypes than just LACP.
* Use the safer callout_init_rw() to allow the softclock to grab thethompsa2007-11-211-5/+2
| | | | rwlock for us.
* Allow the LACP state to be queried from userland which at the moment is thethompsa2007-07-051-0/+50
| | | | | | | actor and partner peer info. Print out the active aggregator and per port data in verbose mode from ifconfig. Approved by: re (mux)
* non-functional cleanupthompsa2007-06-121-56/+36
| | | | | | | - remove dead code - use consistent variable names - gc unused defines - whitespace cleanup
* Compare the partner system priority when choosing the aggregator.thompsa2007-05-191-1/+9
|
* Implement the Marker Protocol. A marker frame is placed on the interface queuethompsa2007-05-191-8/+103
| | | | | | | | | | | | | of each port and any further packets are blocked, when the all the marker frames have been returned to us from the remote network device then we can be sure that all interface queues are empty. This is needed when a port is added or removed from the aggregation since it will affect the hash based distribution, if the queues are not empty then a packet from an existing connection may be placed on a different interface and arrive out of order. This was previously achieved by suppressing transmission for 1 second, now that there is an active feedback this timeout as been increased to 3 seconds and used as a fallback.
* Fix locking assert where we should hold the reader lock.thompsa2007-05-181-1/+1
|
* Change from a mutex to a read/write lock. This allows the tx port to bethompsa2007-05-151-15/+80
| | | | | selected simultaneously by multiple senders and transmit/receive is not serialised between aggregated interfaces.
* Avoid touching various unsafe parts if the interface is disappearing.thompsa2007-05-071-1/+3
|
* Change from using if_delmulti() to if_delmulti_ifma() as it simplifies the codethompsa2007-05-071-15/+3
| | | | | | and is safe to use if the ifp has disappeared. Suggested by: bms
* - Add a disabled state for ports that can not be aggregatedthompsa2007-05-031-5/+18
| | | | - Refine check for lacp links, set to disabled if not suitable
* Test for IFM_FDX rather than IFM_HDX as the half-duplex bit may not be set eventhompsa2007-05-021-1/+1
| | | | if the link is not full-duplex.
* Rename the trunk(4) driver to lagg(4) as it is too similar to vlan trunking.thompsa2007-04-171-73/+73
| | | | | | | | | | | The name trunk is misused as the networking term trunk means carrying multiple VLANs over a single connection. The IEEE standard for link aggregation (802.3 section 3) does not talk about 'trunk' at all while it is used throughout IEEE 802.1Q in describing vlans. The lagg(4) driver provides link aggregation, failover and fault tolerance. Discussed on: current@
* Add the trunk(4) driver for providing link aggregation, failover and faultthompsa2007-04-101-0/+1763
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.
OpenPOWER on IntegriCloud