2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-15 14:17:18 +00:00
Commit Graph

33 Commits

Author SHA1 Message Date
Ethan Jackson
1ea241383e bond: Discontinue use of netdev_monitor. 2011-05-31 14:34:39 -07:00
Ethan Jackson
739e1050dc bond: Always use L4 hash for stable bonds.
Stable bonds are used in such specialized cases that it doesn't
make sense to require LACP negotiations to use L4 hashing.
2011-05-23 13:21:14 -07:00
Ethan Jackson
296f651909 bond: Use CFM for slave status.
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-20 15:54:08 -07:00
Ethan Jackson
c8544aa15f bond: Remove useless slave->up flag.
Theres no longer any reason not to simply call netdev_get_carrier().
2011-05-20 12:55:45 -07:00
Ethan Jackson
1670c579a8 netdev: Take responsibility for polling MII registers.
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-20 12:55:36 -07:00
Ben Pfaff
44dfa85908 bond: Remove write-only variable. 2011-05-19 10:51:45 -07:00
Ben Pfaff
b2fda3effc Merge 'next' into 'master'.
I know already that this breaks the statsfixes that were implemented by the
following commits:

827ab71c97 "ofproto: Datapath statistics accounted twice."
6f1435fc8f "ofproto: Resubmit statistics improperly account during..."

These were already broken in a previous merge.  I will work on a fix.
2011-05-18 14:01:13 -07:00
Ethan Jackson
aa77020c36 bond: Bonds never sleep if carrier changes.
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-17 14:03:05 -07:00
Ben Pfaff
d84d4b88d2 Fix incorrect byte order annotations.
These are not actual bugs, just deceptive use of the wrong function or
type.

Found by sparse.
2011-05-16 13:40:47 -07:00
Ben Pfaff
0079481775 Merge 'master' into 'next'. 2011-05-12 12:05:42 -07:00
Ethan Jackson
75135fa0b5 bond: Convert stb_id to 32bit parameter.
The 16 bits currently in use is artificially restrictive.
2011-05-06 13:48:41 -07:00
Ben Pfaff
f8ddccd285 bond: New function bond_slave_set_netdev().
To be used by an upcoming change.
2011-05-04 10:26:58 -07:00
Ethan Jackson
672d18b296 bond: New bond-hash-basis setting. 2011-04-26 11:05:28 -07:00
Ben Pfaff
a6934aa95f bond: Be more careful about adding and removing netdevs in the monitor.
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-21 16:34:51 -07:00
Ethan Jackson
7321e30ecc bond: BM_STABLE consistent hashing.
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-21 11:18:21 -07:00
Ethan Jackson
62904702ec bond: New flag "bond_revalidate".
Used in future patches.
2011-04-21 11:18:21 -07:00
Ethan Jackson
0008fbcb51 bond: Revalidate no_slaves_tag when revalidating everything. 2011-04-20 11:10:28 -07:00
Ethan Jackson
8bb6f31da6 bond: Give stable bonds one tag.
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-20 11:10:28 -07:00
Ethan Jackson
9019cbdfe1 bond: bond_stb_enable_slave() never triggered.
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-19 16:22:52 -07:00
Ethan Jackson
244b216010 bond: Fix ugly warnings at slave registration.
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-18 16:30:30 -07:00
Ethan Jackson
70f25ec2c3 bond: Properly indent appctl output. 2011-04-18 16:14:58 -07:00
Ethan Jackson
4d6fb5ebd0 bond: Completely pull LACP module out of bond.
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-15 12:19:26 -07:00
Ethan Jackson
e1e9054895 bond: Create new 'stable_id' parameter.
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-15 11:15:57 -07:00
Ethan Jackson
5827ce14d0 bond: Give bridge control over LACP module.
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-15 11:04:04 -07:00
Ethan Jackson
0f1a47f108 lacp: Remove enabled flag.
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-14 18:30:48 -07:00
Ethan Jackson
fb0b29a3c9 bond: New bonding mode "stable".
Stable bonds attempt to assign a given flow to the same slave
consistently.
2011-04-14 11:08:29 -07:00
Ethan Jackson
1b13769132 bond: New function bond_is_balanced().
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-13 16:26:36 -07:00
Ethan Jackson
b3c18f66bf bond: Use bond_enable_slave at slave registration.
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-13 14:15:22 -07:00
Ethan Jackson
95aafb2a60 bond: Reset bond_entry's during massive flow revalidations.
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-13 14:14:57 -07:00
Ethan Jackson
dc9908b3fb bond: Revalidate flows when bond_is_tcp_hash() changes;
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-13 13:44:40 -07:00
Ethan Jackson
59d7b2b656 bond: Reconfigure flows when bond mode changes.
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-12 17:53:24 -07:00
Ethan Jackson
c804cadfe9 bond: Choose slaves randomly.
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-04 12:32:22 -07:00
Ben Pfaff
f620b43af1 bridge: Break bonding implementation out into library.
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.
2011-04-01 15:52:20 -07:00