]> git.proxmox.com Git - mirror_ovs.git/commit
bond: Add 'primary' interface concept for active-backup mode.
authorJeff Squyres <jsquyres@cisco.com>
Thu, 9 Jul 2020 23:57:47 +0000 (16:57 -0700)
committerIlya Maximets <i.maximets@ovn.org>
Thu, 16 Jul 2020 23:42:18 +0000 (01:42 +0200)
commitb4e50218a0f8da43ffe7c420826ddb19985b0b03
tree6a1165290aaa335210bd168b0006e94a8fb304ea
parent12d0edd75eba3e9262c44fa77938b27bda491e79
bond: Add 'primary' interface concept for active-backup mode.

In AB bonding, if the current active slave becomes disabled, a
replacement slave is arbitrarily picked from the remaining set of
enabled slaves.  This commit adds the concept of a "primary" slave: an
interface that will always be (or become) the current active slave if
it is enabled.

The rationale for this functionality is to allow the designation of a
preferred interface for a given bond.  For example:

1. Bond is created with interfaces p1 (primary) and p2, both enabled.
2. p1 becomes the current active slave (because it was designated as
   the primary).
3. Later, p1 fails/becomes disabled.
4. p2 is chosen to become the current active slave.
5. Later, p1 becomes re-enabled.
6. p1 is chosen to become the current active slave (because it was
   designated as the primary)

Note that p1 becomes the active slave once it becomes re-enabled, even
if nothing has happened to p2.

This "primary" concept exists in Linux kernel network interface
bonding, but did not previously exist in OVS bonding.

Only one primary slave interface is supported per bond, and is only
supported for active/backup bonding.

The primary slave interface is designated via
"other_config:bond-primary" when creating a bond.

Also, while adding tests for the "primary" concept, make a few small
improvements to the non-primary AB bonding test.

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Tested-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
NEWS
ofproto/bond.c
ofproto/bond.h
tests/lacp.at
tests/ofproto-dpif.at
vswitchd/bridge.c
vswitchd/vswitch.xml