lacp-fallback-ab determines the behavior of OvS bond in LACP mode. If the partner switch does not support LACP, setting this option to true allows OvS to fallback to active-backup. The balance-tcp mode requires lacp. If LACP negotiation fails and other-config:lacp-fallback-ab is true, then active-backup mode is used. But if users configure the bond port to balance-slb and lacp (unsuccessfully), active-backup mode is also used.
Signed-off-by: nickcooper-zhangtonghao <[email protected]> --- ofproto/bond.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/ofproto/bond.c b/ofproto/bond.c index 3e512d7..dd29681 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -798,6 +798,19 @@ bond_check_admissibility(struct bond *bond, const void *slave_, } switch (bond->balance) { + case BM_SLB: + /* Drop all packets for which we have learned a different input port, + * because we probably sent the packet on one slave and got it back on + * the other. Gratuitous ARP packets are an exception to this rule: + * the host has moved to another switch. The exception to the + * exception is if we locked the learning table to avoid reflections on + * bond slaves. */ + if (bond->lacp_status == LACP_DISABLED) { + verdict = BV_DROP_IF_MOVED; + goto out; + } + /* Allows OvS to fallback to BM_AB. */ + case BM_TCP: /* TCP balanced bonds require successful LACP negotiations. Based on * the above check, LACP is off or lacp_fallback_ab is true on this @@ -821,16 +834,6 @@ bond_check_admissibility(struct bond *bond, const void *slave_, } verdict = BV_ACCEPT; goto out; - - case BM_SLB: - /* Drop all packets for which we have learned a different input port, - * because we probably sent the packet on one slave and got it back on - * the other. Gratuitous ARP packets are an exception to this rule: - * the host has moved to another switch. The exception to the - * exception is if we locked the learning table to avoid reflections on - * bond slaves. */ - verdict = BV_DROP_IF_MOVED; - goto out; } OVS_NOT_REACHED(); -- 1.8.3.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
