From patchwork Fri Apr 23 14:17:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dumitru Ceara X-Patchwork-Id: 1469618 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=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VblBvH4p; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FRbwy0Ff4z9sRR for ; Sat, 24 Apr 2021 00:18:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 7F6F640649; Fri, 23 Apr 2021 14:18:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cUi5Qx-QwbBt; Fri, 23 Apr 2021 14:18:06 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTP id ADD0940610; Fri, 23 Apr 2021 14:18:05 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 850E7C000E; Fri, 23 Apr 2021 14:18:05 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id BD808C000B for ; Fri, 23 Apr 2021 14:18:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A4D65615D1 for ; Fri, 23 Apr 2021 14:17:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id owL-OqHm6_4k for ; Fri, 23 Apr 2021 14:17:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id BE62F615DA for ; Fri, 23 Apr 2021 14:17:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619187470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xq1WI/wUc9TgS0zANMo66NMvfQUVxrZXzpTA5Sjc7/k=; b=VblBvH4pGGVbXdPVbyKV7Edfp4iss3el0Bp+lR7fhPaDL+TLC2KzF8P3neBOD8sqvi67M2 ti1kN/XuVs+cBWiqAXYMlcx16lqohOkukJMoP6geCCg8vZsGeRE0Pt/bHyj5F213v7DBap UTKSWYr9+LcrwzJeculJeKOtPXAbb6M= 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-565-3052PhvPNa6NcTQNrvxAZQ-1; Fri, 23 Apr 2021 10:17:48 -0400 X-MC-Unique: 3052PhvPNa6NcTQNrvxAZQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 819F5100A60D; Fri, 23 Apr 2021 14:17:47 +0000 (UTC) Received: from dceara.remote.csb (ovpn-113-197.ams2.redhat.com [10.36.113.197]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5223F60BD8; Fri, 23 Apr 2021 14:17:45 +0000 (UTC) From: Dumitru Ceara To: ovs-dev@openvswitch.org Date: Fri, 23 Apr 2021 16:17:41 +0200 Message-Id: <20210423141738.15080.66344.stgit@dceara.remote.csb> In-Reply-To: <20210423141644.15080.88290.stgit@dceara.remote.csb> References: <20210423141644.15080.88290.stgit@dceara.remote.csb> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dceara@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: dceara@redhat.com Subject: [ovs-dev] [PATCH ovn 1/2] binding: Don't reset expected seqno for interfaces already being installed. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" If an interface is already in 'binding_iface_seqno_map' then that means that the openflow modifications needed for its functionality have already been sent to ovs-vswitchd and we're waiting for an openflow barrier reply. In such cases, don't reset the expected seqno because this would delay the notification unnecessarily. This scenario can be hit at scale, if Southbound DB sends a port related update before processing the transaction in which ovn-controller claimed the logical port. Reported-at: https://bugzilla.redhat.com/1946420 Fixes: 4d3cb42b076b ("binding: Set Logical_Switch_Port.up when all OVS flows are installed.") Signed-off-by: Dumitru Ceara --- controller/binding.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controller/binding.c b/controller/binding.c index 514f5f33f..451f00e34 100644 --- a/controller/binding.c +++ b/controller/binding.c @@ -2602,7 +2602,8 @@ binding_seqno_run(struct local_binding_data *lbinding_data) * Port_Binding 'up' field and the OVS Interface 'external-id'. */ struct binding_lport *b_lport = local_binding_get_primary_lport(lb); - if (lb && b_lport && lb->iface) { + if (lb && b_lport && lb->iface + && !simap_contains(&binding_iface_seqno_map, lb->name)) { new_ifaces = true; if (smap_get(&lb->iface->external_ids, OVN_INSTALLED_EXT_ID)) {