From patchwork Fri Apr 12 01:57:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ihar Hrachyshka X-Patchwork-Id: 1922805 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=BQiW7+MZ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.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 4VG07t31C6z1yYM for ; Fri, 12 Apr 2024 11:57:46 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5DF3C82391; Fri, 12 Apr 2024 01:57:42 +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 dKtNbp4VdRw2; Fri, 12 Apr 2024 01:57:41 +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 E682182392 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=BQiW7+MZ Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id E682182392; Fri, 12 Apr 2024 01:57:40 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 448DDC0DD5; Fri, 12 Apr 2024 01:57:39 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 34A06C0037 for ; Fri, 12 Apr 2024 01:57:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 17F1A82355 for ; Fri, 12 Apr 2024 01:57:37 +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 vh3moo4bNHLp for ; Fri, 12 Apr 2024 01:57:36 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=ihrachys@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 59C35822F8 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 59C35822F8 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 59C35822F8 for ; Fri, 12 Apr 2024 01:57:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712887054; 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=xME80Pt/m7/sruTQ6ewz03sZkQItZbKtaQhWs/EwYMQ=; b=BQiW7+MZEw+0aaOMQfvZuOMiWsVZzTSt32f79X4wVVNoIRJ+zJfRWaZyHwZcjagbXEUrjt 5t9HO6rcZQfQNxdh8DpPgMgGvEoMagO7EzvGx5sSJkZGOguXZyHfGOA1pXCHKAB6lS3nr1 OOejgyVlZanm7J3F0FaLDDSZLa4pAqA= Received: from mail-yw1-f197.google.com (mail-yw1-f197.google.com [209.85.128.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-627-J2SVmqQlOna4nhua9HRi7g-1; Thu, 11 Apr 2024 21:57:33 -0400 X-MC-Unique: J2SVmqQlOna4nhua9HRi7g-1 Received: by mail-yw1-f197.google.com with SMTP id 00721157ae682-61810d4408cso8136947b3.1 for ; Thu, 11 Apr 2024 18:57:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712887052; x=1713491852; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xME80Pt/m7/sruTQ6ewz03sZkQItZbKtaQhWs/EwYMQ=; b=m75MVbfzB9sahFzHJgn/ZlOaGde4oofp0+7SYt3tVY4gpwXUHR4tLGM1Va68NyqrKc 2GahzVctplBdtTi5t6aVGO1WSZpmS6uV6VB+3fZflKlCNrzJVwzXy6HWRp576USvKzKQ dO8ArRagccVvu+gf+JqoBa7nvUT36h2C9TZJcfYx4iPJkttSROtgIncdh/t+D3Cg0mBz 5sCqndlSP7e1OkaxCqJ3eUSB/yS5vldCQRaofjJcH97AjzbKKH83y0GHclFhFBDsR3Io 2BKJuP0XtJsWsTVmnEAX9/BtzZ/dIWAwcQl5mQzqaSA7J/GTGoTIqHydljifEjZEAbkF Xo6g== X-Gm-Message-State: AOJu0Yz2A872HJSxsENDAgb4nuklrySxSTKJJa63fkZWinHiTfv+72V5 X/fTQvfXRGhhBDaDj01i7T1v9f2RBrzYTYDUmlTQ63odaWHVP5r3BkuNe7EBL20UupcIg5NfD5O Sw7W2ovqEJ7u10FHO/LdTD80Tc9Mx54iv3LqG6RZT22RJFIIYs6AwMPAbiQzAd2X67aXqidU2xE N7Es1ya9K8Om3NK9OKmYrHinj4U6JEGctm6Q== X-Received: by 2002:a81:b24a:0:b0:615:c96:1a8d with SMTP id q71-20020a81b24a000000b006150c961a8dmr1275177ywh.8.1712887051987; Thu, 11 Apr 2024 18:57:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGsvIWQXKJ2QcMaHiK7dR4ydKrLef+iWL+cd3SuMEzBj0z5DQlfcMdsTUNFsVH9EieXWu9Kng== X-Received: by 2002:a81:b24a:0:b0:615:c96:1a8d with SMTP id q71-20020a81b24a000000b006150c961a8dmr1275168ywh.8.1712887051639; Thu, 11 Apr 2024 18:57:31 -0700 (PDT) Received: from fedora38.localdomain (172-073-180-250.res.spectrum.com. [172.73.180.250]) by smtp.gmail.com with ESMTPSA id y71-20020a0dd64a000000b00617c80f06cesm602877ywd.90.2024.04.11.18.57.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 18:57:31 -0700 (PDT) From: Ihar Hrachyshka To: dev@openvswitch.org Date: Fri, 12 Apr 2024 01:57:22 +0000 Message-ID: <20240412015727.4152034-2-ihrachys@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240412015727.4152034-1-ihrachys@redhat.com> References: <20240412015727.4152034-1-ihrachys@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v6 1/6] northd: Don't cleanup op in ovn_port_allocate_key. 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" Let the callers do the cleanup as needed. Signed-off-by: Ihar Hrachyshka --- northd/northd.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/northd/northd.c b/northd/northd.c index 02cf5b234..f2406890c 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -4006,7 +4006,6 @@ ovn_port_assign_requested_tnl_id( static bool ovn_port_allocate_key(const struct sbrec_chassis_table *sbrec_chassis_table, - struct hmap *ports, struct ovn_port *op) { if (!op->tunnel_key) { @@ -4015,11 +4014,6 @@ ovn_port_allocate_key(const struct sbrec_chassis_table *sbrec_chassis_table, 1, (1u << (key_bits - 1)) - 1, &op->od->port_key_hint); if (!op->tunnel_key) { - if (op->sb) { - sbrec_port_binding_delete(op->sb); - } - ovs_list_remove(&op->list); - ovn_port_destroy(ports, op); return false; } } @@ -4084,10 +4078,17 @@ build_ports(struct ovsdb_idl_txn *ovnsb_txn, /* Assign new tunnel ids where needed. */ LIST_FOR_EACH_SAFE (op, list, &both) { - ovn_port_allocate_key(sbrec_chassis_table, ports, op); + if (!ovn_port_allocate_key(sbrec_chassis_table, op)) { + sbrec_port_binding_delete(op->sb); + ovs_list_remove(&op->list); + ovn_port_destroy(ports, op); + } } LIST_FOR_EACH_SAFE (op, list, &nb_only) { - ovn_port_allocate_key(sbrec_chassis_table, ports, op); + if (!ovn_port_allocate_key(sbrec_chassis_table, op)) { + ovs_list_remove(&op->list); + ovn_port_destroy(ports, op); + } } /* For logical ports that are in both databases, update the southbound @@ -4318,7 +4319,12 @@ ls_port_init(struct ovn_port *op, struct ovsdb_idl_txn *ovnsb_txn, sbrec_port_binding_set_logical_port(op->sb, op->key); } /* Assign new tunnel ids where needed. */ - if (!ovn_port_allocate_key(sbrec_chassis_table, ls_ports, op)) { + if (!ovn_port_allocate_key(sbrec_chassis_table, op)) { + if (op->sb) { + sbrec_port_binding_delete(op->sb); + } + ovs_list_remove(&op->list); + ovn_port_destroy(ls_ports, op); return false; } ovn_port_update_sbrec(ovnsb_txn, sbrec_chassis_by_name, From patchwork Fri Apr 12 01:57:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ihar Hrachyshka X-Patchwork-Id: 1922807 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=Gvs9O4E1; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (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 4VG08309Q0z1yYM for ; Fri, 12 Apr 2024 11:57:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id EF5EA61383; Fri, 12 Apr 2024 01:57:46 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 6TPxy44Bwafc; Fri, 12 Apr 2024 01:57:43 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D406561346 Authentication-Results: smtp3.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=Gvs9O4E1 Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id D406561346; Fri, 12 Apr 2024 01:57:41 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3DEC0C0DCE; Fri, 12 Apr 2024 01:57:41 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id AEEB9C0DD8 for ; Fri, 12 Apr 2024 01:57:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id A0B8D40150 for ; Fri, 12 Apr 2024 01:57:39 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id pOUL1lPexLK3 for ; Fri, 12 Apr 2024 01:57:38 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=ihrachys@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org A05A240116 Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A05A240116 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Gvs9O4E1 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id A05A240116 for ; Fri, 12 Apr 2024 01:57:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712887057; 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=++GWm6cO3rGyJzBxbB3LWkvKCV0w3d/ZxEABCGijNio=; b=Gvs9O4E1wi3uZikMPLl1hhv8LvAWgMsXZJuvlibkFq0aH6Ry+sNwpNOCOAkF/38cNYSAWC ozOPHsRlIeeyEB6GoyfImW0q5Z59mB9dc9xgtMHQUG5ZiO7c4vIP9w5xFHIZRN13eIwTHV BxNr3/wuI40hXYe3H+Xus6g89ShKnoQ= Received: from mail-yw1-f200.google.com (mail-yw1-f200.google.com [209.85.128.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-517-yla6GEQPMcOy9sO698bTAw-1; Thu, 11 Apr 2024 21:57:36 -0400 X-MC-Unique: yla6GEQPMcOy9sO698bTAw-1 Received: by mail-yw1-f200.google.com with SMTP id 00721157ae682-61575fc6d1cso6916447b3.1 for ; Thu, 11 Apr 2024 18:57:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712887054; x=1713491854; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=++GWm6cO3rGyJzBxbB3LWkvKCV0w3d/ZxEABCGijNio=; b=SLDbOsBDA1I5jSU8inMP79+u1VeTAESCPTHI9eqFbp99KRDhjzO90IaYC44LTEJDtC mD1n1a91X6/ksxcD2CPNwA4/0WzzVq9MlNHGar0xauTB6Am6w6RnAQhKOGCgpWjFI6+y w0emruOrSQUqpbJSkB5NDbAZ+vGgUtHnQgDNf8k7ofWzZbmjTVn6x06seItIXK7x7/WJ 1efveOFv2rMrkr4dYUzhWn7BlPwf0qjqEn4dkG3ocGGBuEgawcsJjJTl4LDISeLVCSA+ +wudSC86z6DfLplYTyAfdBFq77xZMV85EJOZkvqszXFkC0lOELdVrtzi9ZyFu4Pc7u99 JFwA== X-Gm-Message-State: AOJu0YxKlFIHp70PrpoGr+nfB3icf/XpPsRHgAGOUX66InrBTBPISVMn yQYMgFmioIappOLcUcBZEcDxzY04CsvS7q/GIlz0Q3GIt1bP2pRn2pE2KJB0zfES4BX4XZJzyrH tPK2X95DeUJi+iOLzkr2bx8MgtoQcxhPgXil0zcTnQEplgMFW9h/k2CgdJ6SyYYyLVE1iY4Dkco /8VBls4WtOrSzj/J6D+8dF/4XaPCcb/NhlFQ== X-Received: by 2002:a81:b387:0:b0:615:ecc:91c0 with SMTP id r129-20020a81b387000000b006150ecc91c0mr1119683ywh.20.1712887054615; Thu, 11 Apr 2024 18:57:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE20XmJRLit9MANTLuVXFwDq+ycrGSEF4HjcD7whG6hmTOTyrAAVk4/jIm0a2bV8X3n636NVA== X-Received: by 2002:a81:b387:0:b0:615:ecc:91c0 with SMTP id r129-20020a81b387000000b006150ecc91c0mr1119671ywh.20.1712887054267; Thu, 11 Apr 2024 18:57:34 -0700 (PDT) Received: from fedora38.localdomain (172-073-180-250.res.spectrum.com. [172.73.180.250]) by smtp.gmail.com with ESMTPSA id y71-20020a0dd64a000000b00617c80f06cesm602877ywd.90.2024.04.11.18.57.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 18:57:32 -0700 (PDT) From: Ihar Hrachyshka To: dev@openvswitch.org Date: Fri, 12 Apr 2024 01:57:23 +0000 Message-ID: <20240412015727.4152034-3-ihrachys@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240412015727.4152034-1-ihrachys@redhat.com> References: <20240412015727.4152034-1-ihrachys@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v6 2/6] northd: Don't detach op->list when it wasn't used. 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" In some scenarios, op->list is not attached anywhere, which makes attempts to detach it trigger ubsan failure. ovn/ovs/include/openvswitch/list.h:252:17: runtime error: member access within null pointer of type 'struct ovs_list' #0 0x?? in ovs_list_remove ovn/ovs/include/openvswitch/list.h:252:17 #1 0x?? in ovn_port_allocate_key ovn/northd/northd.c:4021:13 #2 0x?? in ls_port_init ovn/northd/northd.c:4321:10 #3 0x?? in ls_port_create ovn/northd/northd.c:4342:10 #4 0x?? in ls_handle_lsp_changes ovn/northd/northd.c:4511:18 #5 0x?? in northd_handle_ls_changes ovn/northd/northd.c:4655:14 #6 0x?? in northd_nb_logical_switch_handler ovn/northd/en-northd.c:150: This patch makes northd use op->list only as a temporary means for build_ports logic to track ports that are persisted in both, nb, or sb only. Now build_ports will always detach ops once done. Now that op->list is never left attached to a list, we can remove ovs_list_remove calls for it elsewhere, including where op was never attached in the first place. Signed-off-by: Ihar Hrachyshka --- northd/northd.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/northd/northd.c b/northd/northd.c index f2406890c..4cea669cf 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -4111,6 +4111,7 @@ build_ports(struct ovsdb_idl_txn *ovnsb_txn, sbrec_mirror_table, op, queue_id_bitmap, &active_ha_chassis_grps); + ovs_list_remove(&op->list); } /* Add southbound record for each unmatched northbound record. */ @@ -4123,6 +4124,7 @@ build_ports(struct ovsdb_idl_txn *ovnsb_txn, op, queue_id_bitmap, &active_ha_chassis_grps); sbrec_port_binding_set_logical_port(op->sb, op->key); + ovs_list_remove(&op->list); } /* Delete southbound records without northbound matches. */ @@ -4292,7 +4294,7 @@ ovn_port_find_in_datapath(struct ovn_datapath *od, static bool ls_port_init(struct ovn_port *op, struct ovsdb_idl_txn *ovnsb_txn, - struct hmap *ls_ports, struct ovn_datapath *od, + struct ovn_datapath *od, const struct sbrec_port_binding *sb, const struct sbrec_mirror_table *sbrec_mirror_table, const struct sbrec_chassis_table *sbrec_chassis_table, @@ -4320,11 +4322,6 @@ ls_port_init(struct ovn_port *op, struct ovsdb_idl_txn *ovnsb_txn, } /* Assign new tunnel ids where needed. */ if (!ovn_port_allocate_key(sbrec_chassis_table, op)) { - if (op->sb) { - sbrec_port_binding_delete(op->sb); - } - ovs_list_remove(&op->list); - ovn_port_destroy(ls_ports, op); return false; } ovn_port_update_sbrec(ovnsb_txn, sbrec_chassis_by_name, @@ -4345,9 +4342,12 @@ ls_port_create(struct ovsdb_idl_txn *ovnsb_txn, struct hmap *ls_ports, struct ovn_port *op = ovn_port_create(ls_ports, key, nbsp, NULL, NULL); hmap_insert(&od->ports, &op->dp_node, hmap_node_hash(&op->key_node)); - if (!ls_port_init(op, ovnsb_txn, ls_ports, od, sb, + if (!ls_port_init(op, ovnsb_txn, od, sb, sbrec_mirror_table, sbrec_chassis_table, sbrec_chassis_by_name, sbrec_chassis_by_hostname)) { + if (op->sb) { + sbrec_port_binding_delete(op->sb); + } ovn_port_destroy(ls_ports, op); return NULL; } @@ -4357,7 +4357,6 @@ ls_port_create(struct ovsdb_idl_txn *ovnsb_txn, struct hmap *ls_ports, static bool ls_port_reinit(struct ovn_port *op, struct ovsdb_idl_txn *ovnsb_txn, - struct hmap *ls_ports, const struct nbrec_logical_switch_port *nbsp, const struct nbrec_logical_router_port *nbrp, struct ovn_datapath *od, @@ -4371,7 +4370,7 @@ ls_port_reinit(struct ovn_port *op, struct ovsdb_idl_txn *ovnsb_txn, op->sb = sb; ovn_port_set_nb(op, nbsp, nbrp); op->l3dgw_port = op->cr_port = NULL; - return ls_port_init(op, ovnsb_txn, ls_ports, od, sb, + return ls_port_init(op, ovnsb_txn, od, sb, sbrec_mirror_table, sbrec_chassis_table, sbrec_chassis_by_name, sbrec_chassis_by_hostname); } @@ -4546,12 +4545,16 @@ ls_handle_lsp_changes(struct ovsdb_idl_txn *ovnsb_idl_txn, op->visited = true; continue; } - if (!ls_port_reinit(op, ovnsb_idl_txn, &nd->ls_ports, + if (!ls_port_reinit(op, ovnsb_idl_txn, new_nbsp, NULL, od, sb, ni->sbrec_mirror_table, ni->sbrec_chassis_table, ni->sbrec_chassis_by_name, ni->sbrec_chassis_by_hostname)) { + if (op->sb) { + sbrec_port_binding_delete(op->sb); + } + ovn_port_destroy(&nd->ls_ports, op); goto fail; } add_op_to_northd_tracked_ports(&trk_lsps->updated, op); From patchwork Fri Apr 12 01:57:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ihar Hrachyshka X-Patchwork-Id: 1922810 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=R4Jlukrz; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (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 4VG085467Wz1yYX for ; Fri, 12 Apr 2024 11:57:57 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id B001D6134C; Fri, 12 Apr 2024 01:57:47 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 6qMo2zfP1m8t; Fri, 12 Apr 2024 01:57:45 +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 smtp3.osuosl.org 37EB5608EB Authentication-Results: smtp3.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=R4Jlukrz Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 37EB5608EB; Fri, 12 Apr 2024 01:57:43 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 213A6C007C; Fri, 12 Apr 2024 01:57:43 +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 4E05CC0DD5 for ; Fri, 12 Apr 2024 01:57:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2D87A82393 for ; Fri, 12 Apr 2024 01:57:41 +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 VkXrk-6tSOow for ; Fri, 12 Apr 2024 01:57:40 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=ihrachys@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 5228C822F8 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 5228C822F8 Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=R4Jlukrz 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 5228C822F8 for ; Fri, 12 Apr 2024 01:57:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712887059; 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=1cm6BuWcjLJdmhtg4buM/UdHxRZvd6iBDYe+9Xz8eEw=; b=R4Jlukrzoppm44TZ4DA+ENwz7XHU7pi7ZUlEuxu1sXfatu/JqyTBUYccFrIgTpd/q/uRbz LVplCsPGg/PK5Lze4zIVhEBC9eKIXQN8ZbEVTbQCnFcPF/kpLGTzeD107kVzQpS6T1xwvg ByVQ6a2NdDYfseq/P1LpaFp1CzKZTao= Received: from mail-yw1-f200.google.com (mail-yw1-f200.google.com [209.85.128.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-652-NAthCJH7NR-_TfjIeDbi8g-1; Thu, 11 Apr 2024 21:57:38 -0400 X-MC-Unique: NAthCJH7NR-_TfjIeDbi8g-1 Received: by mail-yw1-f200.google.com with SMTP id 00721157ae682-618596c23b4so7078937b3.0 for ; Thu, 11 Apr 2024 18:57:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712887057; x=1713491857; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1cm6BuWcjLJdmhtg4buM/UdHxRZvd6iBDYe+9Xz8eEw=; b=WzO5ghsPt1QlR1nGGnG0zMU1b0B708RztgnRqztTC7ASiv+8LALAQ7g9IbNtC4bJj3 aV1gQVowmTYTVtSKtD/pzl1JVe+jfKEvDs68p3vYxk3P9mpFewO17qCoEXxj9Cg1UaX7 X6F/5NvyRW+EpW8VGkcMLgIZ0z3VQTqZwZHY4ujf0boVk1gfVWZXvh7RfXZ8cDd0mgj+ OejmIt7dV/8LbFa1dwDOEvVSpxM8aH5/prrGltp+AUSltDvG2jgctB38hhkyu91RwC3k +TZZ07Jjqd6GHodIP1G087QQ+vcuhfHGm+w0TfT4ou9mdwwORa04uwJeLxav8ItuPVsw /UVg== X-Gm-Message-State: AOJu0YxYsSexK7H8GQZXN7ATRkeHQCUaUfNkn23lBnfmMOAb495GL60Q hgjv16F3XXtJybF8qbjPY3CK3DdvW7zW/op88BHh4oWo73a3FIdvE1yKW5FwPlN4LtCiw1Wt0zH yFzOZj9PFueWzI7JcxdNbZrTZD9WqvMY7swqWZsYhp4y8ykcVVusK18aSQIFUEVSIj+Ay0OtOeg yuTrd+vCtJbKZRy1lVp4o2gx/tkBQEMa2LSQ== X-Received: by 2002:a81:52c3:0:b0:618:1151:b4 with SMTP id g186-20020a8152c3000000b00618115100b4mr1392030ywb.21.1712887057098; Thu, 11 Apr 2024 18:57:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE6o70QgT3+03EgKPu8s5iCFj2KNrEM0k2xtg8XRKtho8n9u8qCOXOB99+htBFnHKIfuSzyMg== X-Received: by 2002:a81:52c3:0:b0:618:1151:b4 with SMTP id g186-20020a8152c3000000b00618115100b4mr1392008ywb.21.1712887056667; Thu, 11 Apr 2024 18:57:36 -0700 (PDT) Received: from fedora38.localdomain (172-073-180-250.res.spectrum.com. [172.73.180.250]) by smtp.gmail.com with ESMTPSA id y71-20020a0dd64a000000b00617c80f06cesm602877ywd.90.2024.04.11.18.57.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 18:57:34 -0700 (PDT) From: Ihar Hrachyshka To: dev@openvswitch.org Date: Fri, 12 Apr 2024 01:57:24 +0000 Message-ID: <20240412015727.4152034-4-ihrachys@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240412015727.4152034-1-ihrachys@redhat.com> References: <20240412015727.4152034-1-ihrachys@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Vladislav Odintsov Subject: [ovs-dev] [PATCH ovn v6 3/6] tests: Correct tunnel ids exhaustion scenario. 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" The original version of the scenario passed with or without the fix. This is because all LSs were processed in one go, so the allocate function was never entered with *hint==0. Also, added another scenario that will check behavior when *hint is out of [min;max] bounds but > max (this happens in an obscure scenario where a vxlan chassis is added to the cluster mid-light, forcing northd to reduce its effective max value for tunnel ids; which may become lower than the current *hint for ports.) Fixes: a1f165a7b807 ("northd: fix infinite loop in ovn_allocate_tnlid()") Co-Authored-By: Vladislav Odintsov Signed-off-by: Vladislav Odintsov Signed-off-by: Ihar Hrachyshka --- tests/ovn-northd.at | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index be006fb32..1a4e7274d 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -2823,7 +2823,7 @@ AT_CLEANUP ]) OVN_FOR_EACH_NORTHD_NO_HV([ -AT_SETUP([check tunnel ids exhaustion]) +AT_SETUP([check datapath tunnel ids exhaustion]) ovn_start # Create a fake chassis with vxlan encap to lower MAX DP tunnel key to 2^12 @@ -2833,13 +2833,18 @@ ovn-sbctl \ cmd="ovn-nbctl --wait=sb" -for i in {1..4097}; do +for i in {1..4095}; do cmd="${cmd} -- ls-add lsw-${i}" done eval $cmd -check_row_count nb:Logical_Switch 4097 +check_row_count nb:Logical_Switch 4095 +wait_row_count sb:Datapath_Binding 4095 + +ovn-nbctl ls-add lsw-exhausted + +check_row_count nb:Logical_Switch 4096 wait_row_count sb:Datapath_Binding 4095 OVS_WAIT_UNTIL([grep "all datapath tunnel ids exhausted" northd/ovn-northd.log]) @@ -2847,6 +2852,38 @@ OVS_WAIT_UNTIL([grep "all datapath tunnel ids exhausted" northd/ovn-northd.log]) AT_CLEANUP ]) +OVN_FOR_EACH_NORTHD_NO_HV([ +AT_SETUP([check port tunnel ids exhaustion; vxlan chassis pops up midflight]) +ovn_start + +cmd="ovn-nbctl --wait=sb" + +cmd="${cmd} -- ls-add lsw" +for i in {1..2048}; do + cmd="${cmd} -- lsp-add lsw lsp-${i}" +done + +eval $cmd + +check_row_count nb:Logical_Switch_Port 2048 +wait_row_count sb:Port_Binding 2048 + +# Now create a fake chassis with vxlan encap to lower MAX port tunnel key to 2^11 +ovn-sbctl \ + --id=@e create encap chassis_name=hv1 ip="192.168.0.1" type="vxlan" \ + -- --id=@c create chassis name=hv1 encaps=@e + +ovn-nbctl lsp-add lsw lsp-exhausted + +check_row_count nb:Logical_Switch_Port 2049 +wait_row_count sb:Port_Binding 2048 + +OVS_WAIT_UNTIL([grep "all port tunnel ids exhausted" northd/ovn-northd.log]) + +AT_CLEANUP +]) + + OVN_FOR_EACH_NORTHD_NO_HV([ AT_SETUP([Logical Flow Datapath Groups]) From patchwork Fri Apr 12 01:57:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ihar Hrachyshka X-Patchwork-Id: 1922806 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=ZSYGzJOb; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 4VG07z1928z1yYM for ; Fri, 12 Apr 2024 11:57:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2E9D841FB2; Fri, 12 Apr 2024 01:57:49 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id jSpTj5pH1pL3; Fri, 12 Apr 2024 01:57:48 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E728F41F7B Authentication-Results: smtp4.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=ZSYGzJOb Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id E728F41F7B; Fri, 12 Apr 2024 01:57:47 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id BD2F1C007C; Fri, 12 Apr 2024 01:57:47 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5CE31C007C for ; Fri, 12 Apr 2024 01:57:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3595F41BA9 for ; Fri, 12 Apr 2024 01:57:46 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id hTEEpu0R0Zkr for ; Fri, 12 Apr 2024 01:57:43 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=ihrachys@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 20DCA41B78 Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 20DCA41B78 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ZSYGzJOb Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 20DCA41B78 for ; Fri, 12 Apr 2024 01:57:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712887061; 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=3CzAtKY3GUl1B1wHmsdGRQFWCs3CHIR6JlbZFJNNIGs=; b=ZSYGzJObv74EeQSoaCHrdJd6tepU8xveqFUAq5jpOSBFdqHPBxeWJl7NVWr9leILS1xgqf s3znMovspk6bgeOR21fCYznJsMPVWN3R3I6AO7BsriN8U+YTkESB4NgBpsGbseChFwseft 3uaiQU0JEmp9FppEdDxWtQHKT6wa1+g= Received: from mail-yw1-f200.google.com (mail-yw1-f200.google.com [209.85.128.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-591--UGIEA5BNHGZZPlWUt962Q-1; Thu, 11 Apr 2024 21:57:40 -0400 X-MC-Unique: -UGIEA5BNHGZZPlWUt962Q-1 Received: by mail-yw1-f200.google.com with SMTP id 00721157ae682-6167463c60cso5946967b3.1 for ; Thu, 11 Apr 2024 18:57:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712887059; x=1713491859; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3CzAtKY3GUl1B1wHmsdGRQFWCs3CHIR6JlbZFJNNIGs=; b=TYVLGk7j+5huE8Dc2REA3cV954dsGZ+V8V8JqCVxRyHuWu6umccepltxVktc4WQw0R JNZedH9UvVbi8Gjwl/4ph/SzuzdMl2maQSOZBHYkIvRrmDnTCn/PPsD5ix9l0h2+KXf2 O0lexWNQkCJpeopgNm9JE0fx4r8NjXkfTAbIIgxvQMZZF/H7EYK/76V49AcBE1kC4LBB cF61OJrZBv7p+uXDMIh8wxqYYhYzBlC8FiCZTAG4uGl4ehWCd4g7g7fWV5I9msFhIG3s 65AHWL1ItiVp9jTs7GT4MphNlvxuSSKBJXIcik84+tD9Jpr+0wlqy2ZdoV4iq9jowaMP IXFQ== X-Gm-Message-State: AOJu0Yx6x8wGIK3er+c6KDHxD9T9Tvg/v4liEaSs9zP0e2bItdgDtMqK gV6KPH3tdi14fPPDaGnjp6DjPvXEHR8CFAl7LqhrFDGdrj3izP7nsBqlkq1DlslzDFr4DLE22CO ZITaJmjWXNFatf9/g6bbNAcVKriQ7o5eLVify/wc0q4p0JwTLHbixFKzYs/85rKDnytsfX31W13 kvlLp752BdMWS1xjVs3wxB4gO/xA2l6v3GGQ== X-Received: by 2002:a0d:eb81:0:b0:618:824c:940d with SMTP id u123-20020a0deb81000000b00618824c940dmr92668ywe.25.1712887059054; Thu, 11 Apr 2024 18:57:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbLE3WX4j94gD3Yve1uAwYBdzBfm7UCOek/QWERQrQ+AOTgE20UsAeKjk/iFOcstPBAKm3lA== X-Received: by 2002:a0d:eb81:0:b0:618:824c:940d with SMTP id u123-20020a0deb81000000b00618824c940dmr92658ywe.25.1712887058716; Thu, 11 Apr 2024 18:57:38 -0700 (PDT) Received: from fedora38.localdomain (172-073-180-250.res.spectrum.com. [172.73.180.250]) by smtp.gmail.com with ESMTPSA id y71-20020a0dd64a000000b00617c80f06cesm602877ywd.90.2024.04.11.18.57.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 18:57:37 -0700 (PDT) From: Ihar Hrachyshka To: dev@openvswitch.org Date: Fri, 12 Apr 2024 01:57:25 +0000 Message-ID: <20240412015727.4152034-5-ihrachys@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240412015727.4152034-1-ihrachys@redhat.com> References: <20240412015727.4152034-1-ihrachys@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v6 4/6] northd: Delete pb if tunnel is not allocated. 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" This allows callers to avoid cleanup of the record in case the function fails. Signed-off-by: Ihar Hrachyshka --- northd/northd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/northd/northd.c b/northd/northd.c index 4cea669cf..6a8ace52f 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -4322,6 +4322,9 @@ ls_port_init(struct ovn_port *op, struct ovsdb_idl_txn *ovnsb_txn, } /* Assign new tunnel ids where needed. */ if (!ovn_port_allocate_key(sbrec_chassis_table, op)) { + if (!sb) { + sbrec_port_binding_delete(op->sb); + } return false; } ovn_port_update_sbrec(ovnsb_txn, sbrec_chassis_by_name, @@ -4345,9 +4348,6 @@ ls_port_create(struct ovsdb_idl_txn *ovnsb_txn, struct hmap *ls_ports, if (!ls_port_init(op, ovnsb_txn, od, sb, sbrec_mirror_table, sbrec_chassis_table, sbrec_chassis_by_name, sbrec_chassis_by_hostname)) { - if (op->sb) { - sbrec_port_binding_delete(op->sb); - } ovn_port_destroy(ls_ports, op); return NULL; } @@ -4551,8 +4551,8 @@ ls_handle_lsp_changes(struct ovsdb_idl_txn *ovnsb_idl_txn, ni->sbrec_chassis_table, ni->sbrec_chassis_by_name, ni->sbrec_chassis_by_hostname)) { - if (op->sb) { - sbrec_port_binding_delete(op->sb); + if (sb) { + sbrec_port_binding_delete(sb); } ovn_port_destroy(&nd->ls_ports, op); goto fail; From patchwork Fri Apr 12 01:57:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ihar Hrachyshka X-Patchwork-Id: 1922808 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=WgVdyzdi; 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 4VG0832xxYz1yYX for ; Fri, 12 Apr 2024 11:57:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B58FC825B9; Fri, 12 Apr 2024 01:57:53 +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 IHf3UDP2VYNR; Fri, 12 Apr 2024 01:57:52 +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 2E00E823E2 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=WgVdyzdi Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 2E00E823E2; Fri, 12 Apr 2024 01:57:51 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E054FC007C; Fri, 12 Apr 2024 01:57:50 +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 269B2C0DD4 for ; Fri, 12 Apr 2024 01:57:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 4F537823FF for ; Fri, 12 Apr 2024 01:57:47 +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 LboxxAG8w8QQ for ; Fri, 12 Apr 2024 01:57:46 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=ihrachys@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 34C16823F4 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 34C16823F4 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 34C16823F4 for ; Fri, 12 Apr 2024 01:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712887064; 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=9svSDfncM8MG4vi4IRQY5Z7mKOl86/eCa0RrK8yZAW0=; b=WgVdyzdiZSyHh2UDMx0n5nVlbfGXIg2RU4uIzPW18UYu4TySQTq4JvD0brWOAnDXV6MSi+ j3Ve9C9k4pHNG2HoQSPoNsb0NcBBjtEzUZedkOoq4p44GFxvaYmOdz38HV0o/cOZkrt9hP mZEQPdEr+/mk1gtPEBy5A4VOZ2/XZiI= Received: from mail-yw1-f197.google.com (mail-yw1-f197.google.com [209.85.128.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-201-EDz4BEVvOIiMGPOaV0f5mg-1; Thu, 11 Apr 2024 21:57:42 -0400 X-MC-Unique: EDz4BEVvOIiMGPOaV0f5mg-1 Received: by mail-yw1-f197.google.com with SMTP id 00721157ae682-618596c23b4so7079557b3.0 for ; Thu, 11 Apr 2024 18:57:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712887061; x=1713491861; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9svSDfncM8MG4vi4IRQY5Z7mKOl86/eCa0RrK8yZAW0=; b=jf6sEhnyxByzuP61jxuIt/INxRL/sd5TP2PCUlUlc/pH1CPA0khZWlyOcQzTdjpKKd 5LPTxDLiHMq+XbONe90g1YNjM6YJpE1YeVsIv46fRmw04EWTYh2dYcaBIx9XlaIy8JRM 5Z7/QmNSsn3wf2FXbRmT6Joy0SgP62uOAbK8GzZD3yHsSUkqHizN7LsSVTdFPmRuXzW9 ZmR8f2lR8pRSJGQ2dJWtLvf8dzBHm7Isc4R4jUe20EEjyVvX1qAxOwe8kUGmmxTA/YxD KLjg6KeEBmAPM9mXN9/2ipLC8FV3m/EqVzKqCBVbVq+ldmKlq+y/8RW2fPQPUSAoV88j RJ5A== X-Gm-Message-State: AOJu0YxysBoVEZ7Hb24pgy7t6Ex3ZHfsxChecOABGEfGds3ux0K0aY22 lHM5g6BAby+Ucr2+2Z7EzCJXxoP6+Mc8RcDcmstpndp9joNneok0qAZEfNbO0tHZtzKpZZVJhbi 5NUJswjhGjrh5XVjU2TDG2a0cE5bLEMotauAlVDoMsQmme1z9vQhYaAL+CGc2ZWv0ISfECsuFMO mUuCAUgLVv+c157TWlb3zl7pr62x8vlavCNg== X-Received: by 2002:a81:9212:0:b0:60a:f31:e65 with SMTP id j18-20020a819212000000b0060a0f310e65mr1116843ywg.29.1712887061573; Thu, 11 Apr 2024 18:57:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHgcd9LFjZAhOF+Ws/7GraEMr9xqlG8zfrktMESQYGwkMs/i84naUML6O1cSQcXHr65/aAvUQ== X-Received: by 2002:a81:9212:0:b0:60a:f31:e65 with SMTP id j18-20020a819212000000b0060a0f310e65mr1116831ywg.29.1712887061241; Thu, 11 Apr 2024 18:57:41 -0700 (PDT) Received: from fedora38.localdomain (172-073-180-250.res.spectrum.com. [172.73.180.250]) by smtp.gmail.com with ESMTPSA id y71-20020a0dd64a000000b00617c80f06cesm602877ywd.90.2024.04.11.18.57.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 18:57:39 -0700 (PDT) From: Ihar Hrachyshka To: dev@openvswitch.org Date: Fri, 12 Apr 2024 01:57:26 +0000 Message-ID: <20240412015727.4152034-6-ihrachys@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240412015727.4152034-1-ihrachys@redhat.com> References: <20240412015727.4152034-1-ihrachys@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v6 5/6] northd: Remove unused `sb` arg in ls_port_create. 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" It's always NULL. Signed-off-by: Ihar Hrachyshka --- northd/northd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/northd/northd.c b/northd/northd.c index 6a8ace52f..78028131f 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -4336,7 +4336,7 @@ ls_port_init(struct ovn_port *op, struct ovsdb_idl_txn *ovnsb_txn, static struct ovn_port * ls_port_create(struct ovsdb_idl_txn *ovnsb_txn, struct hmap *ls_ports, const char *key, const struct nbrec_logical_switch_port *nbsp, - struct ovn_datapath *od, const struct sbrec_port_binding *sb, + struct ovn_datapath *od, const struct sbrec_mirror_table *sbrec_mirror_table, const struct sbrec_chassis_table *sbrec_chassis_table, struct ovsdb_idl_index *sbrec_chassis_by_name, @@ -4345,7 +4345,7 @@ ls_port_create(struct ovsdb_idl_txn *ovnsb_txn, struct hmap *ls_ports, struct ovn_port *op = ovn_port_create(ls_ports, key, nbsp, NULL, NULL); hmap_insert(&od->ports, &op->dp_node, hmap_node_hash(&op->key_node)); - if (!ls_port_init(op, ovnsb_txn, od, sb, + if (!ls_port_init(op, ovnsb_txn, od, NULL, sbrec_mirror_table, sbrec_chassis_table, sbrec_chassis_by_name, sbrec_chassis_by_hostname)) { ovn_port_destroy(ls_ports, op); @@ -4514,7 +4514,7 @@ ls_handle_lsp_changes(struct ovsdb_idl_txn *ovnsb_idl_txn, goto fail; } op = ls_port_create(ovnsb_idl_txn, &nd->ls_ports, - new_nbsp->name, new_nbsp, od, NULL, + new_nbsp->name, new_nbsp, od, ni->sbrec_mirror_table, ni->sbrec_chassis_table, ni->sbrec_chassis_by_name, From patchwork Fri Apr 12 01:57:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ihar Hrachyshka X-Patchwork-Id: 1922809 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=PdkmeQFf; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (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 4VG0845gFXz1yYM for ; Fri, 12 Apr 2024 11:57:56 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id E60A641C21; Fri, 12 Apr 2024 01:57:54 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 2fSiOzuV_7pk; Fri, 12 Apr 2024 01:57:54 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org CFE4641C17 Authentication-Results: smtp2.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=PdkmeQFf Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id CFE4641C17; Fri, 12 Apr 2024 01:57:53 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C29F5C0DCE; Fri, 12 Apr 2024 01:57:53 +0000 (UTC) X-Original-To: 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 13C84C007C for ; Fri, 12 Apr 2024 01:57:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C6FED6135E for ; Fri, 12 Apr 2024 01:57:48 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id aSz0vnFiSaRZ for ; Fri, 12 Apr 2024 01:57:48 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=ihrachys@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org B3C8B6135F Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B3C8B6135F Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=PdkmeQFf Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id B3C8B6135F for ; Fri, 12 Apr 2024 01:57:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712887066; 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=a6oXR9mfqyUIA0LZoQLkbONdhoFP9bkkpmvioetN6gA=; b=PdkmeQFfBTXdzpofFJWQT6Kz3uFjsmBWachiDfA7MkMet9kd0nC/NaTuzNrx4nvV4Zjhtj QJ4N6CNN8e47yKfMewZKC0gh/R7YuE0sQPDC+ytFCQn3TsHOz1r8P18cflLxsmHBt12J5b wmO5lpK70w3LDat3FUm8mX2cmmHzQuM= Received: from mail-yw1-f200.google.com (mail-yw1-f200.google.com [209.85.128.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-686-_VnxxIaYPV6Y13OsGXgiSA-1; Thu, 11 Apr 2024 21:57:45 -0400 X-MC-Unique: _VnxxIaYPV6Y13OsGXgiSA-1 Received: by mail-yw1-f200.google.com with SMTP id 00721157ae682-6180514a5ffso5952627b3.0 for ; Thu, 11 Apr 2024 18:57:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712887063; x=1713491863; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a6oXR9mfqyUIA0LZoQLkbONdhoFP9bkkpmvioetN6gA=; b=U7nLHQaaOmME7kj0vR91w3pa+0QZwZEMlG7AC2OuJ/5oKQfuyq9gvpQVXDfrhDiKGK wUk8E7Ri0IWre52qn+ZcCc2rRZC209tjOca7XDhHPKiq7pHv3/WXHVzN+0P7EHkMWkFf QkxTYLrzsZlRlp1AZ7ZMQB68qWkiOIW61cLVDz5l2i0IP3XEjFulzGaiiUSjef0Lz6bu JvwYgiYathPwMuNyvq4QUZkBSOmw0NKj40kPsYF+KdyJYKOt3kJ2wrHahlKvtwb/9O9Z R8tFqgK5R4HDqtMxp0M8wdYl5bB68g+4aSjbqXDmw/pU3VksDTlyL5wTKkE8nudUZpND pD0g== X-Gm-Message-State: AOJu0Yze4DYuKfcA7dsWMi+Id4LYrKizQmTR3GO1g/noNFEBayUa7gW4 /xNrOtlYhw6if8WGlnsV4RhNaeWQJPeOxDfhRS0qRo+lqd+UKw9Ym04UGL8HwniAX0/8IT1suQT G1wItF/Lf+ojzcQ44nf863a0gtw7242fi2X2oDtG7fqkgcrH330Ntxyt20kSFPqdGfCgvolITps t5oPirUfxVCQV8NCbIsslVrBAGJRUZmS6pmw== X-Received: by 2002:a05:690c:6d13:b0:618:5c6e:9291 with SMTP id iv19-20020a05690c6d1300b006185c6e9291mr1257803ywb.17.1712887063748; Thu, 11 Apr 2024 18:57:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFURMXJ8W03+jPm6CTaC/suVp70HRxZH9x2sQcA2pqt5E+NBxu+ZxQwkE54DhoLhsFYOCV0xA== X-Received: by 2002:a05:690c:6d13:b0:618:5c6e:9291 with SMTP id iv19-20020a05690c6d1300b006185c6e9291mr1257792ywb.17.1712887063423; Thu, 11 Apr 2024 18:57:43 -0700 (PDT) Received: from fedora38.localdomain (172-073-180-250.res.spectrum.com. [172.73.180.250]) by smtp.gmail.com with ESMTPSA id y71-20020a0dd64a000000b00617c80f06cesm602877ywd.90.2024.04.11.18.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 18:57:41 -0700 (PDT) From: Ihar Hrachyshka To: dev@openvswitch.org Date: Fri, 12 Apr 2024 01:57:27 +0000 Message-ID: <20240412015727.4152034-7-ihrachys@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240412015727.4152034-1-ihrachys@redhat.com> References: <20240412015727.4152034-1-ihrachys@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v6 6/6] northd: Remove unused nbrp arg in ls_port_reinit. 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" It's always NULL. Signed-off-by: Ihar Hrachyshka --- northd/northd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/northd/northd.c b/northd/northd.c index 78028131f..6a51e5bad 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -4358,7 +4358,6 @@ ls_port_create(struct ovsdb_idl_txn *ovnsb_txn, struct hmap *ls_ports, static bool ls_port_reinit(struct ovn_port *op, struct ovsdb_idl_txn *ovnsb_txn, const struct nbrec_logical_switch_port *nbsp, - const struct nbrec_logical_router_port *nbrp, struct ovn_datapath *od, const struct sbrec_port_binding *sb, const struct sbrec_mirror_table *sbrec_mirror_table, @@ -4368,7 +4367,7 @@ ls_port_reinit(struct ovn_port *op, struct ovsdb_idl_txn *ovnsb_txn, { ovn_port_cleanup(op); op->sb = sb; - ovn_port_set_nb(op, nbsp, nbrp); + ovn_port_set_nb(op, nbsp, NULL); op->l3dgw_port = op->cr_port = NULL; return ls_port_init(op, ovnsb_txn, od, sb, sbrec_mirror_table, sbrec_chassis_table, @@ -4546,7 +4545,7 @@ ls_handle_lsp_changes(struct ovsdb_idl_txn *ovnsb_idl_txn, continue; } if (!ls_port_reinit(op, ovnsb_idl_txn, - new_nbsp, NULL, + new_nbsp, od, sb, ni->sbrec_mirror_table, ni->sbrec_chassis_table, ni->sbrec_chassis_by_name,