From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 78C785A005E for ; Mon, 9 Jan 2023 05:11:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673237475; 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=h9E5hMt15yuyoza7gDxp/hbn87hzqBGQ2PtidmLsVLw=; b=JP0KwDAN8YKER0v5EDgkKVqUF5Kk/crYVo8LvVYb0jv4RZO5VqzjvDPSkZETuyYGGtq3Wh 21ML/mesNlbiEj3W3lw7T0rLHuhuSTINJTfNZkCBhDl9HB4PyCwpmVatV8N9mUuJMS+x1Q i3TKOc6vw9ECGjl1qXUWnpEQkqVJNXo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-67-xQLAM3IiM3GuhkZqwRAgTg-1; Sun, 08 Jan 2023 23:11:14 -0500 X-MC-Unique: xQLAM3IiM3GuhkZqwRAgTg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C21C88828C1 for ; Mon, 9 Jan 2023 04:11:13 +0000 (UTC) Received: from vhost3.router.laine.org (unknown [10.2.16.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id A20F91121314; Mon, 9 Jan 2023 04:11:13 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 2/9] conf: move anonymous backend struct from virDomainNetDef into its own struct Date: Sun, 8 Jan 2023 23:11:05 -0500 Message-Id: <20230109041112.368790-3-laine@redhat.com> In-Reply-To: <20230109041112.368790-1-laine@redhat.com> References: <20230109041112.368790-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: O4IEND7CQB2ENQQTKI7XBRMQRWSZGPXB X-Message-ID-Hash: O4IEND7CQB2ENQQTKI7XBRMQRWSZGPXB X-MailFrom: laine@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: sbrivio@redhat.com, passt-dev@passt.top X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This will allow us to call parser/formatter functions with a pointer to just the backend part. Signed-off-by: Laine Stump --- src/conf/domain_conf.h | 10 ++++++---- src/conf/virconftypes.h | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 61d2ee819b..e57e70866a 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1051,6 +1051,11 @@ struct _virDomainActualNetDef { unsigned int class_id; /* class ID for bandwidth 'floor' */ }; +struct _virDomainNetBackend { + char *tap; + char *vhost; +}; + /* Stores the virtual network interface configuration */ struct _virDomainNetDef { virDomainNetType type; @@ -1089,10 +1094,7 @@ struct _virDomainNetDef { virTristateSwitch rss_hash_report; } virtio; } driver; - struct { - char *tap; - char *vhost; - } backend; + virDomainNetBackend backend; virDomainNetTeamingInfo *teaming; union { virDomainChrSourceDef *vhostuser; diff --git a/src/conf/virconftypes.h b/src/conf/virconftypes.h index 154805091a..7bd9aa8e0a 100644 --- a/src/conf/virconftypes.h +++ b/src/conf/virconftypes.h @@ -172,6 +172,8 @@ typedef struct _virDomainMomentObjList virDomainMomentObjList; typedef struct _virDomainNVRAMDef virDomainNVRAMDef; +typedef struct _virDomainNetBackend virDomainNetBackend; + typedef struct _virDomainNetDef virDomainNetDef; typedef struct _virDomainNetTeamingInfo virDomainNetTeamingInfo; -- 2.38.1