From patchwork Wed Feb 15 03:51:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Zhou X-Patchwork-Id: 728037 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vNQNN0VMlz9s0m for ; Wed, 15 Feb 2017 14:52:36 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 3F498415; Wed, 15 Feb 2017 03:52:33 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 18F4F6C for ; Wed, 15 Feb 2017 03:52:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 88F311A2 for ; Wed, 15 Feb 2017 03:52:31 +0000 (UTC) Received: from mfilter17-d.gandi.net (mfilter17-d.gandi.net [217.70.178.145]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id 0B81541C074 for ; Wed, 15 Feb 2017 04:52:30 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter17-d.gandi.net Received: from relay5-d.mail.gandi.net ([IPv6:::ffff:217.70.183.197]) by mfilter17-d.gandi.net (mfilter17-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id lPYgSBx4E0u0 for ; Wed, 15 Feb 2017 04:52:28 +0100 (CET) X-Originating-IP: 209.85.218.47 Received: from mail-oi0-f47.google.com (mail-oi0-f47.google.com [209.85.218.47]) (Authenticated sender: azhou@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 6132E41C04C for ; Wed, 15 Feb 2017 04:52:28 +0100 (CET) Received: by mail-oi0-f47.google.com with SMTP id w204so81311373oiw.0 for ; Tue, 14 Feb 2017 19:52:28 -0800 (PST) X-Gm-Message-State: AMke39m/DmGm1nK1LR6bQEUFkevqYv3JNygHZHrOq47L6DXim7BYI8u2SKsgDwTDdxwgtqlQmi+nQMPUIRfBVA== X-Received: by 10.202.74.11 with SMTP id x11mr16273515oia.47.1487130747008; Tue, 14 Feb 2017 19:52:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.158.21 with HTTP; Tue, 14 Feb 2017 19:51:46 -0800 (PST) In-Reply-To: <1487055173-113220-2-git-send-email-nic@opencloud.tech> References: <1487055173-113220-1-git-send-email-nic@opencloud.tech> <1487055173-113220-2-git-send-email-nic@opencloud.tech> From: Andy Zhou Date: Tue, 14 Feb 2017 19:51:46 -0800 X-Gmail-Original-Message-ID: Message-ID: To: nickcooper-zhangtonghao X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: "" Subject: Re: [ovs-dev] [PATCH 2/4] ofproto/bond: Drop traffic in balance-tcp mode without lacp. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org On Mon, Feb 13, 2017 at 10:52 PM, nickcooper-zhangtonghao wrote: > 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 I think the following change is equivalent and may be easier to follow, what do you think? diff --git a/ofproto/bond.c b/ofproto/bond.c index 2703bc9..4c2781d 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -787,6 +787,9 @@ bond_check_admissibility(struct bond *bond, const void *slave_, goto out; } case LACP_DISABLED: + if (bond->balance == BM_TCP) { + goto out; + } break; }