From patchwork Fri Jul 19 15:36:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1962543 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=jLMKwDXo; 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 4WQYgJ3bTqz20FP for ; Sat, 20 Jul 2024 01:36:28 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id D27BB82124; Fri, 19 Jul 2024 15:36:17 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Ljx8fdqE6nAz; Fri, 19 Jul 2024 15:36:16 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2B26C82105 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=jLMKwDXo Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 2B26C82105; Fri, 19 Jul 2024 15:36:16 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id CDE86C0A99; Fri, 19 Jul 2024 15:36:15 +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 ECC58C0A99 for ; Fri, 19 Jul 2024 15:36:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A1C3580E56 for ; Fri, 19 Jul 2024 15:36:11 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id keyV6mnCaMdg for ; Fri, 19 Jul 2024 15:36:11 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=xsimonar@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org EBD2E80DB8 Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org EBD2E80DB8 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id EBD2E80DB8 for ; Fri, 19 Jul 2024 15:36:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721403369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QlZcfJR9dI4lIxgBY+w37d2DP3r+38e0Y1vyQTs4fQk=; b=jLMKwDXo1RqSDAesbX4KCTL9cpiCj+2G3b/An9tweqXvxNJOnqTul4UEuMOcaArwLGerFF S6MFNduZhCc9BVnHFPxv4C3hCIyegaLuMMhowcMKI3Vy3ycz2v4ITV5XmN5u2v08ga8Egh 4dH6yCbuGlku3b2qCDMKsQL2ph+sj5A= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-359-5AoIEu3NOs-R3GILPMlrvw-1; Fri, 19 Jul 2024 11:36:08 -0400 X-MC-Unique: 5AoIEu3NOs-R3GILPMlrvw-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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 mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8404E1955BEF for ; Fri, 19 Jul 2024 15:36:07 +0000 (UTC) Received: from wsfd-netdev90.ntdv.lab.eng.bos.redhat.com (wsfd-netdev90.anl.eng.rdu2.dc.redhat.com [10.6.38.135]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D6C9A1955D4D; Fri, 19 Jul 2024 15:36:06 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Fri, 19 Jul 2024 17:36:00 +0200 Message-Id: <20240719153603.2914663-5-xsimonar@redhat.com> In-Reply-To: <20240719153603.2914663-1-xsimonar@redhat.com> References: <20240719153603.2914663-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 4/7] binding: Cleanup related_lports for container ports. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Remove container port from related_lports if parent port is deleted. Signed-off-by: Xavier Simonart --- controller/binding.c | 4 +++- tests/ovn.at | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/controller/binding.c b/controller/binding.c index 1bb5cca52..210809944 100644 --- a/controller/binding.c +++ b/controller/binding.c @@ -1533,8 +1533,10 @@ release_binding_lport(const struct sbrec_chassis *chassis_rec, struct binding_lport *b_lport, bool sb_readonly, struct binding_ctx_out *b_ctx_out) { - if (is_binding_lport_this_chassis(b_lport, chassis_rec)) { + if (b_lport && b_lport->pb) { remove_related_lport(b_lport->pb, b_ctx_out); + } + if (is_binding_lport_this_chassis(b_lport, chassis_rec)) { if (!release_lport(b_lport->pb, chassis_rec, sb_readonly, b_ctx_out->tracked_dp_bindings, b_ctx_out->if_mgr)) { diff --git a/tests/ovn.at b/tests/ovn.at index 185ba4a21..32114fffe 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -16487,8 +16487,8 @@ AT_CHECK([test "${hv1_claims}" -le "${max_claims}"], [0], []) AT_CHECK([test "${hv2_claims}" -le "${max_claims}"], [0], []) check ovn-nbctl --wait=hv lsp-del lsp0 -CHECK_FLOWS_AFTER_RECOMPUTE([hv1], [hv1]) -CHECK_FLOWS_AFTER_RECOMPUTE([hv2], [hv2]) + +CHECK_AFTER_RECOMPUTE([hv1], [hv1]) OVN_CLEANUP([hv1],[hv2])