diff mbox

[ovs-dev,2/4] ofproto/bond: Drop traffic in balance-tcp mode without lacp.

Message ID 1487055173-113220-2-git-send-email-nic@opencloud.tech
State Accepted
Headers show

Commit Message

nickcooper-zhangtonghao Feb. 14, 2017, 6:52 a.m. UTC
The balance-tcp mode requires the upstream switch to support 802.3ad
with successful LACP negotiation. When bond ports are configured to
balance-tcp mode without lacp or lacp is disabled, drop the traffic.

Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
---
 ofproto/bond.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/ofproto/bond.c b/ofproto/bond.c
index 2e018aa..2703bc9 100644
--- a/ofproto/bond.c
+++ b/ofproto/bond.c
@@ -799,11 +799,12 @@  bond_check_admissibility(struct bond *bond, const void *slave_,
 
     switch (bond->balance) {
     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 bond.
-         * If lacp_fallback_ab is true fall through to BM_AB case else, we
-         * drop all incoming traffic. */
-        if (!bond->lacp_fallback_ab) {
+        /* TCP balanced bonds require successful LACP negotiations. Based on
+         * the above check, LACP is off or lacp_fallback_ab is true on this
+         * bond. If LACP is in LACP_DISABLED state, drop all incoming traffic.
+         * If LACP is in LACP_CONFIGURED state and lacp_fallback_ab is true
+         * fall through to BM_AB case else, we drop all incoming traffic. */
+        if (bond->lacp_status == LACP_DISABLED || !bond->lacp_fallback_ab) {
             goto out;
         }