From patchwork Mon Oct 30 08:09:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1856875 X-Patchwork-Delegate: dceara@redhat.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=ZQNi9rHb; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SJmBk2wSJz1yQ6 for ; Mon, 30 Oct 2023 19:09:18 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 30C0B85512; Mon, 30 Oct 2023 08:09:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 30C0B85512 Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ZQNi9rHb X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HtPPFxLBdr13; Mon, 30 Oct 2023 08:09:15 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 723B485493; Mon, 30 Oct 2023 08:09:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 723B485493 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 28975C0071; Mon, 30 Oct 2023 08:09:14 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id E17C7C0032 for ; Mon, 30 Oct 2023 08:09:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B6A6D8549E for ; Mon, 30 Oct 2023 08:09:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B6A6D8549E X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HSw0MYVqntVO for ; Mon, 30 Oct 2023 08:09:11 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id A8E2A85493 for ; Mon, 30 Oct 2023 08:09:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A8E2A85493 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698653349; 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=aDm2r7r8y6tBOrMO5kZyJ+HG+/qnunlXhERhJLxM0cg=; b=ZQNi9rHbCPnt2U3dKpEqVRf/6rQJj2kybznIT90xurHYKzlRwHsZHQcqxcTp+lhGwi/zcV +m5QPmGaWokqyqtOVJdtyc8hyIgMC8lCJZI7o7gAJbMmyEPVlq10sG+8fRWZig+s+BR9N3 ZWLNN24vmARj+LkM2K15qcnnZXbtdBk= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-260-GpYD9uTiO-O7L4FKew6Z-w-1; Mon, 30 Oct 2023 04:09:08 -0400 X-MC-Unique: GpYD9uTiO-O7L4FKew6Z-w-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 15E6C3C00094 for ; Mon, 30 Oct 2023 08:09:08 +0000 (UTC) Received: from wsfd-netdev90.ntdv.lab.eng.bos.redhat.com (wsfd-netdev90.ntdv.lab.eng.bos.redhat.com [10.19.188.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id E96FC2026D6E; Mon, 30 Oct 2023 08:09:07 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Mon, 30 Oct 2023 09:09:07 +0100 Message-Id: <20231030080907.1568802-1-xsimonar@redhat.com> In-Reply-To: <20230918164623.3144813-1-xsimonar@redhat.com> References: <20230918164623.3144813-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: dceara@redhat.com Subject: [ovs-dev] [PATCH ovn v2] controller: have I+P assigning ct_zones for l3gateway ports 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" When l3gateway ports get added, ct_zones were assigned during (ct_zones) recomputes, but not by I+P. Before this patch, test "Migration of CT zone from UUID to name" was randomly failing, as ct_zone was not assigned by I+P but a ct_zone recompute happened most of the time (and hence test succeeded). Test case has been adapted so that ct_zone recompute usually happens before adding the sw0-lr0 port. Signed-off-by: Xavier Simonart --- v2: - updated comment as suggested by Dumitru - rebased on origin/main --- controller/ovn-controller.c | 5 +++-- tests/ovn.at | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c index da7d145ed..d19e6ac05 100644 --- a/controller/ovn-controller.c +++ b/controller/ovn-controller.c @@ -2642,9 +2642,10 @@ ct_zones_runtime_data_handler(struct engine_node *node, void *data) struct tracked_lport *t_lport = shash_node->data; if (strcmp(t_lport->pb->type, "") && strcmp(t_lport->pb->type, "localport") + && strcmp(t_lport->pb->type, "l3gateway") && strcmp(t_lport->pb->type, "localnet")) { - /* We allocate zone-id's only to VIF, localport, and localnet - * lports. */ + /* We allocate zone-id's only to VIF, localport, l3gateway, + * and localnet lports. */ continue; } diff --git a/tests/ovn.at b/tests/ovn.at index 637d92bed..91ed8f73b 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -36813,14 +36813,14 @@ check ovn-nbctl ls-add sw0 check ovn-nbctl lsp-add sw0 sw0-port1 check ovn-nbctl lsp-set-addresses sw0-port1 "50:54:00:00:00:01 192.168.0.2" +ovs-vsctl add-port br-int p1 -- \ + set Interface p1 external_ids:iface-id=sw0-port1 + check ovn-nbctl lsp-add sw0 sw0-lr0 check ovn-nbctl lsp-set-type sw0-lr0 router check ovn-nbctl lsp-set-addresses sw0-lr0 00:00:00:00:ff:01 check ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 -ovs-vsctl add-port br-int p1 -- \ - set Interface p1 external_ids:iface-id=sw0-port1 - check ovn-appctl -t ovn-controller vlog/set dbg:main wait_for_ports_up