aboutsummaryrefslogtreecommitdiff
path: root/lib/bond.c
AgeCommit message (Collapse)Author
2012-03-08bond: Incorrectly reported an error in appctl.Ethan Jackson
The bond/enable-slave and bond/disable-slave ovs-appctl commands incorrectly reported the 501 error code upon success. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2011-11-18bond: Remove dead conditional.Ethan Jackson
2011-11-04bond: Only drop packets that indicate moves on SLB bonds.Ben Pfaff
SLB bonds, for important reasons, drop most incoming packets that indicate that a MAC has moved to the bond from another port. These reasons do not apply to other types of bonds, but until now OVS has still dropped them. This fixes the problem. It changes behavior of active-backup bonds and stable bonds, neither of which has the same problem as SLB. Behavior of SLB bonds and TCP bonds in SLB fallback mode is unaffected. Bug #7928.
2011-11-02ofproto-dpif: Use send_packet() instead of netdev_send().Jesse Gross
netdev_send() directly sends a packet using Linux mechanisms, skipping our kernel module. Several upper layer abstractions are built on top of the kernel module, so this means that we loose stats, sFlow, etc. on these packets. This changes bonding, LACP, and STP to use send_packet() as CFM does, which uses the standard kernel mechanisms and provides a single place that needs to be updated.
2011-10-17bond: Demote active-backup WARN to DBG.Ben Pfaff
This log message comes up for packets that are flooded through the network. If the upstream switch doesn't realize that an active-backup bond is in use, and there is significant packet flooding in the network, then we will get a lot of these messages. (This message doesn't get logged for multicast or broadcast packets since they get dropped earlier in the function.) Reported-by: Eivind Bulie Haanaes Bug-report: http://forums.citrix.com/thread.jspa?messageID=1589125 CC: Paul Fazzone <pfazzone@nicira.com>
2011-09-29ovs-appctl: Print command arguments for "help".Justin Pettit
2011-09-26ofproto-dpif: Get rid of OFP_VLAN_NONE pollution.Ben Pfaff
OFP_VLAN_NONE used to be convenient as a value for struct dst's 'vlan' member, because it ended up being used in actions anyway, but now it's much better to just use 0.
2011-09-23bond: Remove spurious blank line.Ben Pfaff
2011-09-09datapath: VLAN actions should use push/pop semanticsPravin Shelar
Currently the kernel vlan actions mirror those used by OpenFlow 1.0. i.e. MODIFY and STRIP. More flexible approach is to have an action to push a tag and pop a tag off, so that it can handle multiple levels of vlan tags. Plus it aligns with newer version of OpenFlow. As this patch replaces MODIFY with PUSH semantic, action mapping done in userpace is fixed accordingly. GSO handling for multiple levels of vlan tags is also added as Jesse suggested before. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
2011-08-08netdev: Get rid of struct netdev_options and netdev_open_default().Ben Pfaff
Now that netdev_options only has two members, we might as well pass them directly as parameters.
2011-06-29bond: Drop packets on slaves disabled by LACP.Ethan Jackson
Theoretically, when LACP is configured, a bond shouldn't receive any packets on disabled slaves. This patch enforces that invariant.
2011-06-27bond: Drop packets on backup slaves.Ethan Jackson
Currently, OVS accepts incoming traffic on all slaves participating in a bond. In Linux active-backup bonding, all traffic which comes in on backup slaves is dropped. This patch causes OVS to do the same. Bug #6125.
2011-05-31bond: Discontinue use of netdev_monitor.Ethan Jackson
2011-05-23bond: Always use L4 hash for stable bonds.Ethan Jackson
Stable bonds are used in such specialized cases that it doesn't make sense to require LACP negotiations to use L4 hashing.
2011-05-20bond: Use CFM for slave status.Ethan Jackson
With this patch, if CFM is configured on a slave, and in a faulted state, it will be disabled by the bond module.
2011-05-20bond: Remove useless slave->up flag.Ethan Jackson
Theres no longer any reason not to simply call netdev_get_carrier().
2011-05-20netdev: Take responsibility for polling MII registers.Ethan Jackson
This patch moves miimon logic from the bond module to netdev-linux. This greatly simplifies the bonding code while adding minimal complexity to netdev-linux. The bonding code is so high level, it really has no business worrying about how precisely slave status is determined.
2011-05-19bond: Remove write-only variable.Ben Pfaff
2011-05-18Merge 'next' into 'master'.Ben Pfaff
I know already that this breaks the statsfixes that were implemented by the following commits: 827ab71c97f "ofproto: Datapath statistics accounted twice." 6f1435fc8f7 "ofproto: Resubmit statistics improperly account during..." These were already broken in a previous merge. I will work on a fix.
2011-05-17bond: Bonds never sleep if carrier changes.Ethan Jackson
The bonding code neglected to call netdev_monitor_poll() on its monitor during bond_run(). Thus carrier changes would be permanently queued in the monitor, preventing it from ever allowing poll_loop to sleep.
2011-05-16Fix incorrect byte order annotations.Ben Pfaff
These are not actual bugs, just deceptive use of the wrong function or type. Found by sparse.
2011-05-12Merge 'master' into 'next'.Ben Pfaff
2011-05-06bond: Convert stb_id to 32bit parameter.Ethan Jackson
The 16 bits currently in use is artificially restrictive.
2011-05-04bond: New function bond_slave_set_netdev().Ben Pfaff
To be used by an upcoming change.
2011-04-26bond: New bond-hash-basis setting.Ethan Jackson
2011-04-21bond: Be more careful about adding and removing netdevs in the monitor.Ben Pfaff
The code was careless about updating the netdev_monitor. Newly added slaves weren't added to the monitor until the next bond_reconfigure() call, and netdevs were never removed from the monitor.
2011-04-21bond: BM_STABLE consistent hashing.Ethan Jackson
This patch converts stable bonds from modulo n based hashing to Highest Random Weight based hashing. This hashing strategy only redistributes 1/n_slaves traffic when a slave is enabled or disabled. It also turns out to have a vastly simpler implementation.
2011-04-21bond: New flag "bond_revalidate".Ethan Jackson
Used in future patches.
2011-04-20bond: Revalidate no_slaves_tag when revalidating everything.Ethan Jackson
2011-04-20bond: Give stable bonds one tag.Ethan Jackson
Stable bonds require all flows to be revalidated when anything changes. Instead of giving each slave a tag, and ORing them together. This commit creates one tag representing the entire bond. This will cause less false positives when deciding which flows to revalidate.
2011-04-19bond: bond_stb_enable_slave() never triggered.Ethan Jackson
bond_stb_enable_slave() depended on bond->stb_slaves being nonnull. However, bond_stb_enable_slave() is responsible for initializing this parameter. Thus none of it's logic ever ran.
2011-04-18bond: Fix ugly warnings at slave registration.Ethan Jackson
Before this patch, when a slave was registered for this first time the following warning would display. interface (null): enabled This is because the slave was enabled before having its name configured.
2011-04-18bond: Properly indent appctl output.Ethan Jackson
2011-04-15bond: Completely pull LACP module out of bond.Ethan Jackson
The bonding code only needs to know whether a given slave may be enabled, and whether LACP has been negotiated on the bond. Instead of passing in the LACP handle and letting the bond query this information. This patch passes in the information directly.
2011-04-15bond: Create new 'stable_id' parameter.Ethan Jackson
For BM_STABLE bonds, instead of choosing the sort key in the qsort() comparator, this patch makes it a configuration setting of each slave. This will help wrest LACP out of the bonding code further in future patches.
2011-04-15bond: Give bridge control over LACP module.Ethan Jackson
Before this patch, the bonding code had taken over responsibility for running the LACP module. However, the bonding code only needs the LACP module for some basic status queries. LACP and bonding are actually logically parallel modules and do not really have a parent child relationship. Furthermore, we need to be able to run LACP on non-bonded interfaces which the existing approach prevented. This patch gives control of the LACP module back to the bridge.
2011-04-14lacp: Remove enabled flag.Ethan Jackson
The enabled flag in the LACP module was only used to set the Collecting and Distributing flags in the LACP protocol. It was intended to be set by the bonding code to mimic its enabled flag. The spec is relatively vague on the precise meaning of these flags, and most implementations do something completely different with them. For these reasons, it seems acceptable to remove the enabled flag for the sake of simplicity. A slave is now Collecting and Distributing if it is attached, or LACP couldn't be negotiated.
2011-04-14bond: New bonding mode "stable".Ethan Jackson
Stable bonds attempt to assign a given flow to the same slave consistently.
2011-04-13bond: New function bond_is_balanced().Ethan Jackson
As new bond modes are added, it will be nice to have the logic indicating whether or not a given bond mode requires rebalancing in one place.
2011-04-13bond: Use bond_enable_slave at slave registration.Ethan Jackson
Slave registration should go through the normal slave enabling facilities instead of doing it by hand. Before this patch, newly created slaves would have no tag associated with them. Furthermore, any further changes to how slaves are enabled would not be picked up by the registration code.
2011-04-13bond: Reset bond_entry's during massive flow revalidations.Ethan Jackson
When all flows in a bond are revalidated, stale bond_entry's can cause incorrect load balancing. These issues will naturally resolve themselves overtime. However, it's better to deal with them immediately.
2011-04-13bond: Revalidate flows when bond_is_tcp_hash() changes;Ethan Jackson
If LACP causes the return of bond_is_tcp_hash to change for whatever reason, all flows should be revalidated because they will have a different hash result.
2011-04-12bond: Reconfigure flows when bond mode changes.Ethan Jackson
Changes in the bonding mode can cause drastic changes in flow assignments to slaves. This commit causes all flows in a bridge to be revalidated when bond_reconfigure() changes its bonding mode. This approach is a bit aggressive, but bond reconfiguration shouldn't happen often.
2011-04-04bond: Choose slaves randomly.Ethan Jackson
When the bonding library encounters a flow it hasn't seen before, it assigns it to the active slave and waits for load balancing to move it to a more appropriate place. This commit causes it to first attempt a random slave.
2011-04-01bridge: Break bonding implementation out into library.Ben Pfaff
This removes over 1000 lines of code from bridge.c and will make it easier to moving the bonding implementation into ofproto as part of future development.