From patchwork Wed Oct 10 20:35:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 982091 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.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 42Vm7N0b12z9s9N for ; Thu, 11 Oct 2018 07:35:11 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 52EBAC84; Wed, 10 Oct 2018 20:35:10 +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 4882AC84 for ; Wed, 10 Oct 2018 20:35:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9D69A83F for ; Wed, 10 Oct 2018 20:35:07 +0000 (UTC) X-Originating-IP: 208.91.3.26 Received: from sigabrt.benpfaff.org (unknown [208.91.3.26]) (Authenticated sender: blp@ovn.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 8965F24000A; Wed, 10 Oct 2018 20:35:04 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Wed, 10 Oct 2018 13:35:00 -0700 Message-Id: <20181010203500.29774-1-blp@ovn.org> X-Mailer: git-send-email 2.16.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff , Daniel Leaberry Subject: [ovs-dev] [PATCH] bond: Honor updelay and downdelay when LACP is in use. 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: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Since OVS added LACP support back in 2011, bonds have ignored the updelay and downdelay values for bonds with configured LACP. The reason is not clear, but at least one user needs support in this case, so this commit enables it. Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-October/047490.html Reported-by: Daniel Leaberry Signed-off-by: Ben Pfaff Acked-by: Justin Pettit --- NEWS | 1 + ofproto/bond.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 2e478b9bab80..9640ee6d0608 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ Post-v2.10.0 * Add option for simple round-robin based Rxq to PMD assignment. It can be set with pmd-rxq-assign. - Add 'symmetric_l3' hash function. + - OVS now honors 'updelay' and 'downdelay' for bonds with LACP configured. v2.10.0 - 18 Aug 2018 --------------------- diff --git a/ofproto/bond.c b/ofproto/bond.c index f87cdba7908f..8a90ba2686af 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -1717,8 +1717,7 @@ bond_link_status_update(struct bond_slave *slave) VLOG_INFO_RL(&rl, "interface %s: will not be %s", slave->name, up ? "disabled" : "enabled"); } else { - int delay = (bond->lacp_status != LACP_DISABLED ? 0 - : up ? bond->updelay : bond->downdelay); + int delay = up ? bond->updelay : bond->downdelay; slave->delay_expires = time_msec() + delay; if (delay) { VLOG_INFO_RL(&rl, "interface %s: will be %s if it stays %s "