From nobody Thu Nov 21 16:23:58 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; 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 1715607074379302.70350616084306; Mon, 13 May 2024 06:31:14 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 08EB01A45; Mon, 13 May 2024 09:31:13 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 8ECBE19CF; Mon, 13 May 2024 09:30:34 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 948F519BA; Mon, 13 May 2024 09:30:31 -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 198D919B4 for ; Mon, 13 May 2024 09:30:31 -0400 (EDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-250-9hV1vseyPPWsznGgjmwa3Q-1; Mon, 13 May 2024 09:30:29 -0400 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-34c93732095so2041990f8f.0 for ; Mon, 13 May 2024 06:30:28 -0700 (PDT) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502b8a78cdsm11081188f8f.58.2024.05.13.06.30.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 06:30:26 -0700 (PDT) Received: from wheatley.brq.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 36DBF1BD9CDBD for ; Mon, 13 May 2024 15:30:26 +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.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: 9hV1vseyPPWsznGgjmwa3Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715607028; x=1716211828; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nKuAB4Hg5HbRM9cacmHD2R5cM8gALVxz+p7d+YhowR0=; b=Dta2FruYS2616qIETzwY86l3U78FQvpVUNPsEAmkoRdQt9VwofRLUn/QJQDnzcGUZ7 xjxPDroiDZ3npHVlo2V9Uue5dFv81qMtdw4rVXld9bfdHreHSTzocwt2nSQaPs8nDcil OrKDC4GNdywzAp7cyRj1nE+OCJSfmwbCIYAesAykPcD/7HSGs9Da/v+ncIsxGqPcHiJH Tp2nyBiRkmiq44c3VHr+BS85zYrmP/lj0V+GNOdG3VzGwydey5gTPKrhOGmk0IJ+U8a5 z6l1DP6r7PraTqedfUW9/d+freZud+Cv4nyUI9D5w6WIFSodL8QaGaPBEqU4o7q16A7C HXfg== X-Gm-Message-State: AOJu0YzvL6MiUtnXFBPIGcugzT0iHDqqfbTFfyr6rXgS145C+8RNkfuB Ccm4pUCiKUHsqTJC0QYUxfekIrx/UPEmOSInoaXhoByWt5+wruczEmQObq9ysE5U2R82y6ug19g 6/rUozSdyTIDkHP0iBmqhGZ9nt56IeG7gOK4y9HF0QtA54s8iPH938DY/UpYn/Rx4vf2GSIxLzG YQyhFsb9Lm45+QnBFR2dIL2y1W2bERLdNBiRLs6e8= X-Received: by 2002:adf:f791:0:b0:343:8e85:dd7c with SMTP id ffacd0b85a97d-3504a9580bamr7199123f8f.55.1715607027812; Mon, 13 May 2024 06:30:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOYlSNyH2qTPMLG4KbKE8yvameunm35jMXee9DhmEcESeK1USOd0v8sbwRBoQuPwZlGhpj8g== X-Received: by 2002:adf:f791:0:b0:343:8e85:dd7c with SMTP id ffacd0b85a97d-3504a9580bamr7199090f8f.55.1715607026975; Mon, 13 May 2024 06:30:26 -0700 (PDT) From: Martin Kletzander To: devel@lists.libvirt.org Subject: [PATCH] vmx: Do not require DVS Port ID Date: Mon, 13 May 2024 15:30:19 +0200 Message-ID: <5377a99d0cf79d9c9a0b48dba5acbbd331c06c49.1715607019.git.mkletzan@redhat.com> X-Mailer: git-send-email 2.45.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: XV5DYISXZR5JXGDISMSSP76GPXEFU2HJ X-Message-ID-Hash: XV5DYISXZR5JXGDISMSSP76GPXEFU2HJ 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: Content-Type: text/plain; charset="utf-8"; x-default="true" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1715607074771100002 It can be safely removed from the VMX, VMWare will still boot the machine and once another ethernet is added it is updated in the VMX to zero. So do not require it and default to zero too since this part of the XML is done as best effort and it is mentioned even in our documentation. Signed-off-by: Martin Kletzander Reviewed-by: J=C3=A1n Tomko --- src/vmx/vmx.c | 2 +- tests/vmx2xmldata/ethernet-vds-no-portid.vmx | 10 ++++++++ tests/vmx2xmldata/ethernet-vds-no-portid.xml | 24 ++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 tests/vmx2xmldata/ethernet-vds-no-portid.vmx create mode 100644 tests/vmx2xmldata/ethernet-vds-no-portid.xml diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index f4182bc5184c..d90b41d2ad14 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -2901,7 +2901,7 @@ virVMXParseEthernet(virConf *conf, int controller, vi= rDomainNetDef **def) portId_name, &(*def)->data.vds.port_id, 0, - false) < 0 || + true) < 0 || virVMXGetConfigLong(conf, connectionId_name, &(*def)->data.vds.connection_id, diff --git a/tests/vmx2xmldata/ethernet-vds-no-portid.vmx b/tests/vmx2xmlda= ta/ethernet-vds-no-portid.vmx new file mode 100644 index 000000000000..7761accb3abc --- /dev/null +++ b/tests/vmx2xmldata/ethernet-vds-no-portid.vmx @@ -0,0 +1,10 @@ +config.version =3D "8" +virtualHW.version =3D "4" +ethernet0.present =3D "true" +ethernet0.virtualDev =3D "e1000e" +ethernet0.addressType =3D "vpx" +ethernet0.generatedAddress =3D "00:50:56:87:65:43" +ethernet0.dvs.switchId =3D "50 34 26 b2 94 e9 3b 16-1d 68 87 bf ff 4a 54 4= 0" +ethernet0.dvs.portgroupId =3D "dvportgroup-1285" +ethernet0.dvs.connectionId =3D "408217997" +displayName =3D "test" diff --git a/tests/vmx2xmldata/ethernet-vds-no-portid.xml b/tests/vmx2xmlda= ta/ethernet-vds-no-portid.xml new file mode 100644 index 000000000000..60fd9c99feb9 --- /dev/null +++ b/tests/vmx2xmldata/ethernet-vds-no-portid.xml @@ -0,0 +1,24 @@ + + test + 00000000-0000-0000-0000-000000000000 + 32768 + 32768 + 1 + + hvm + + + destroy + restart + destroy + + + + + + + + + --=20 2.45.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org