From nobody Sun Dec 22 06:18:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1725374284251712.2247303175324; Tue, 3 Sep 2024 07:38:04 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 331761491; Tue, 3 Sep 2024 10:38:03 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 4B0AE14B6; Tue, 3 Sep 2024 10:36:47 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 86FF31211; Tue, 3 Sep 2024 10:36:36 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 145DE121A for ; Tue, 3 Sep 2024 10:36:36 -0400 (EDT) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-14-_AlljXJgNFSCaB54aLFYgg-1; Tue, 03 Sep 2024 10:36:34 -0400 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-374ba33b2d2so2464717f8f.2 for ; Tue, 03 Sep 2024 07:36:34 -0700 (PDT) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-374c5ae48e4sm7633749f8f.90.2024.09.03.07.36.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 07:36:31 -0700 (PDT) Received: from wheatley.brq.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 30EB51FC90BB for ; Tue, 03 Sep 2024 16:36:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725374195; 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=weJ77BxrtsJqnkJ7dxNx7kJh/xMvsJCd53Ey/rOVTQQ=; b=LHtLZZTE5ZzSjYyG8XETj9YfTqxrrHcPRDjjdWoGTTW1WJLvOiktNEOUUuLBTKeO46QWp6 thUI6WAlCrKQ90Za7a9JQdC1RuddX9ptqKLjdlS6G9OTtRJo12AYxlSIe+5ClQRct7V0qR rI7d7CfPZ7wRCpSgLiKNwIcaZoJ1aWY= X-MC-Unique: _AlljXJgNFSCaB54aLFYgg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725374193; x=1725978993; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=weJ77BxrtsJqnkJ7dxNx7kJh/xMvsJCd53Ey/rOVTQQ=; b=XsHPMv7ZdZtF7AWmMDt3moVAj7nHByQ9fxAc8ToPDF/0k1pp4EQVroygRr2m2X/UMe jTq1MIGSjE6BG48pgp8Ri63/pAo9GwXeZL/7rWEKSqT1W5brFK37lhBdsmDeFCpi5Rwy rkrMxNkhaBEXKjqMahzjQEHiE/LVmiRVSAl6EqQUAhMR5cd8o/hkhcD3F30Jp7vt0F50 SZpVe16Cvu1kp/WuvBElzSnuY1vMRT+3CTP+9sTPfiYLv9rYllDrdxu2iDQmWvL4adpY TwwCHcDN6YVVxsxV+EuF6E0Gh64iXnQkv+SPFpGyLv28p6YsJyWNJoBjGZOgWaESasSp /D2Q== X-Gm-Message-State: AOJu0YxtTlNIAT/AhaMGvBmxq14Zx/1cciAiLaVXM9cxerVxMYlEoJOf H1BJ1bMi1OV7/ASBe66YVDMiTYJbAEvdhMJAm9adQ/aPNFqgqz2CTasoLmbcN0CpOn93BHDHTZf Mnt97ID0DhCyR2+CTPnCUkMQcToVRJoAVqT8Y4Uob0nXZzndYX68xEpjnejHBNaQH5n0Nu47x2+ kKx/xpo8WutPPeYaZOmyGFssKhwy74SG9xYUWUdPk= X-Received: by 2002:adf:a30c:0:b0:374:baf1:41cb with SMTP id ffacd0b85a97d-374ecc67bacmr2737269f8f.4.1725374193214; Tue, 03 Sep 2024 07:36:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECR2JMEdbTI82ELhQaGdfwspnLauvMUGPy+3szORxAzrRLFL7+itNz0DfRmdBPz3zep4tJ2g== X-Received: by 2002:adf:a30c:0:b0:374:baf1:41cb with SMTP id ffacd0b85a97d-374ecc67bacmr2737235f8f.4.1725374192369; Tue, 03 Sep 2024 07:36:32 -0700 (PDT) From: Martin Kletzander To: devel@lists.libvirt.org Subject: [PATCH 3/8] network: Move port deletion into the shutdown function Date: Tue, 3 Sep 2024 16:36:22 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: GNPQIR72PII7TD72B2O5T547LTJ566ZV X-Message-ID-Hash: GNPQIR72PII7TD72B2O5T547LTJ566ZV X-MailFrom: mkletzan@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1725374286207116600 Content-Type: text/plain; charset="utf-8"; x-default="true" It will be more useful in there when calling from new places. Signed-off-by: Martin Kletzander Reviewed-by: Laine Stump --- src/network/bridge_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index b16d524aa181..d27a7e9b88c4 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -2447,6 +2447,8 @@ networkShutdownNetwork(virNetworkDriverState *driver, return -1; } =20 + virNetworkObjDeleteAllPorts(obj, cfg->stateDir); + /* now that we know it's stopped call the hook if present */ networkRunHook(obj, NULL, VIR_HOOK_NETWORK_OP_STOPPED, VIR_HOOK_SUBOP_END); @@ -3458,8 +3460,6 @@ networkDestroy(virNetworkPtr net) if ((ret =3D networkShutdownNetwork(driver, obj)) < 0) goto cleanup; =20 - virNetworkObjDeleteAllPorts(obj, cfg->stateDir); - /* @def replaced in virNetworkObjUnsetDefTransient */ def =3D virNetworkObjGetDef(obj); =20 --=20 2.46.0