From patchwork Tue Oct 22 05:29:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gowrishankar Muthukrishnan X-Patchwork-Id: 1181051 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="f+FwKqmH"; dkim-atps=neutral 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 46y2BM1t3yz9sP4 for ; Tue, 22 Oct 2019 16:29:30 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id D4F36EEB; Tue, 22 Oct 2019 05:29:26 +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 AA24BEC8 for ; Tue, 22 Oct 2019 05:29:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 238B3822 for ; Tue, 22 Oct 2019 05:29:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571722163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uRmR8h8DWhqh0qQhnepwki48KuO6ltYxLM46mlNudgI=; b=f+FwKqmH8LjYbi+GF8B/jPfip0zzJgu4D7btWVT2GOvzALRIy9QkhUeF6ejLsPwwmNgW8b PjUfIhH2r3JyhYOApXfvxr2KUhANaqW7+2Ep8uMdZorxAPbo62OXZ5Yli6TYSFZCU22INZ lxPz2bvdOXzkedXEnZCVNwklpBVLwNw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-138-tQPv4jCjNU-vD9YU4YyosQ-1; Tue, 22 Oct 2019 01:29:22 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B96B4800D4E for ; Tue, 22 Oct 2019 05:29:21 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-186.sin2.redhat.com [10.67.116.186]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33D8D194BE for ; Tue, 22 Oct 2019 05:29:19 +0000 (UTC) From: Gowrishankar Muthukrishnan To: dev@openvswitch.org Date: Tue, 22 Oct 2019 10:59:14 +0530 Message-Id: <20191022052914.12924-1-gmuthukr@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: tQPv4jCjNU-vD9YU4YyosQ-1 X-Mimecast-Spam-Score: 0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] lacp: report desync in ovs threads enabling slave 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 It is helpful in reporting main thread that is yet to enable bond slave, but link state was brought up by lacp thread and capture this desync between ovs threads for debugging. Fixes: a8448cb170 ("lacp: Avoid packet drop on LACP bond after link up") Signed-off-by: Gowrishankar Muthukrishnan --- ofproto/bond.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ofproto/bond.c b/ofproto/bond.c index c5d5f2c03..3b148a244 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -817,6 +817,10 @@ bond_check_admissibility(struct bond *bond, const void *slave_, * When may_enable is TRUE, it means LACP is UP and waiting for the * main thread to run LACP state machine and enable the slave. */ verdict = (slave->enabled || slave->may_enable) ? BV_ACCEPT : BV_DROP; + if (!slave->enabled && slave->may_enable) { + VLOG_DBG_RL(&rl, "bond %s: slave %s: main thread not yet enabled slave", + bond->name, bond->active_slave->name); + } goto out; case LACP_CONFIGURED: if (!bond->lacp_fallback_ab) {