From nobody Tue Feb 10 21:19:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=riseup.net ARC-Seal: i=1; a=rsa-sha256; t=1692211692; cv=none; d=zohomail.com; s=zohoarc; b=TBoQ25ZtNV1cwmX+PlmlHTlb9MPEtJ9mPoiYJ8fPqA6vNIZfKimoE8rj1TXBTNsWtdVe3D25rgaFy/yo82LCMj0C/+pbulqn4rPTm5LtdP/NsqTiTRXbMylqEzubs3vSN5/l7wGqi801nq9ESIfrDs9iR7D7DZxYFMlzD2o3di0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692211692; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=482Ydq02VtrgSoFh9RvF8cbc1hdaT98MwacO5OQrRo8=; b=jeBxsH8/R3jc/bGBhkOVwxy+rgVt9+iT+coJhj+KoOKN8HXVAHos1g8Vosy5YOPS9psOL0zXJ6oMK8gNw8wESTlF48jMywGkh2ju1vI1kkIj6nTrt1Cr3vAngJdmAuVhllr5C286iDxA1HVaGiZsELNswOJzgOBLhKUSTHdf4dM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1692211692933668.8239614858172; Wed, 16 Aug 2023 11:48:12 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-314-4m77JwVUNIme646pq094dw-1; Wed, 16 Aug 2023 14:48:06 -0400 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 E3D501C07834; Wed, 16 Aug 2023 18:48:02 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id CCCB81121314; Wed, 16 Aug 2023 18:48:02 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E4EA91946A43; Wed, 16 Aug 2023 18:47:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6A1751946587 for ; Wed, 16 Aug 2023 18:47:40 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8D0B74A9004; Wed, 16 Aug 2023 18:47:40 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 855F9401E6A for ; Wed, 16 Aug 2023 18:47:40 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 68510185A793 for ; Wed, 16 Aug 2023 18:47:40 +0000 (UTC) Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-568-7dRfJy8JPjqNUdbK8h-xIg-1; Wed, 16 Aug 2023 14:47:38 -0400 Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (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 mx1.riseup.net (Postfix) with ESMTPS id 4RQxvs1RCtzDqfk for ; Wed, 16 Aug 2023 18:47:37 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4RQxvr033pzJnDN; Wed, 16 Aug 2023 18:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692211692; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=482Ydq02VtrgSoFh9RvF8cbc1hdaT98MwacO5OQrRo8=; b=b5UdqD3FT6qvUR5cv29CKPF95Gez1fhxxRrHfZKFsBl1uGGuJ7NZuhtfm42VI2N19jriBl 8Z5KZ9FL1t3/2Jk2pGQSD8LZT0jE6t0GAP2/AdECLXuPuwdV6vlh2/8pqDtn17rHCvRjZu ykgx02Yhkn/oTqqWWz5jwRMC9J66hV0= X-MC-Unique: 4m77JwVUNIme646pq094dw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: 7dRfJy8JPjqNUdbK8h-xIg-1 X-Riseup-User-ID: 1852A432E8446823867780F15D2C593A36E8AB515A707F023F4FB4C7E0839049 From: K Shiva Kiran To: libvir-list@redhat.com Subject: [libvirt PATCH v2 3/7] Implementing Remote Protocol for Network Metadata Date: Thu, 17 Aug 2023 00:17:11 +0530 Message-ID: <20230816184715.101243-4-shiva_kr@riseup.net> In-Reply-To: <20230816184715.101243-1-shiva_kr@riseup.net> References: <20230816184715.101243-1-shiva_kr@riseup.net> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: K Shiva Kiran Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: riseup.net Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1692211694566100003 Content-Type: text/plain; charset="utf-8"; x-default="true" - Defines wire protocol format. - Implements remote driver. Signed-off-by: K Shiva Kiran --- src/remote/remote_driver.c | 2 ++ src/remote/remote_protocol.x | 36 +++++++++++++++++++++++++++++++++++- src/remote_protocol-structs | 19 +++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index faad7292ed..b81c9bc611 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -8153,6 +8153,8 @@ static virNetworkDriver network_driver =3D { .networkPortSetParameters =3D remoteNetworkPortSetParameters, /* 5.5.0= */ .networkPortGetParameters =3D remoteNetworkPortGetParameters, /* 5.5.0= */ .networkPortDelete =3D remoteNetworkPortDelete, /* 5.5.0 */ + .networkSetMetadata =3D remoteNetworkSetMetadata, /* 9.7.0 */ + .networkGetMetadata =3D remoteNetworkGetMetadata, /* 9.7.0 */ }; =20 static virInterfaceDriver interface_driver =3D { diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 5d86a51116..7ff059e393 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -3323,6 +3323,26 @@ struct remote_network_event_lifecycle_msg { int detail; }; =20 +struct remote_network_set_metadata_args { + remote_nonnull_network network; + int type; + remote_string metadata; + remote_string key; + remote_string uri; + unsigned int flags; +}; + +struct remote_network_get_metadata_args { + remote_nonnull_network network; + int type; + remote_string uri; + unsigned int flags; +}; + +struct remote_network_get_metadata_ret { + remote_nonnull_string metadata; +}; + struct remote_connect_storage_pool_event_register_any_args { int eventID; remote_storage_pool pool; @@ -6974,5 +6994,19 @@ enum remote_procedure { * @generate: none * @acl: domain:write */ - REMOTE_PROC_DOMAIN_FD_ASSOCIATE =3D 443 + REMOTE_PROC_DOMAIN_FD_ASSOCIATE =3D 443, + + /** + * @generate: both + * @acl: network:write + * @acl: network:save:!VIR_NETWORK_UPDATE_AFFECT_CONFIG|VIR_NETWORK_UP= DATE_AFFECT_LIVE + * @acl: network:save:VIR_NETWORK_UPDATE_AFFECT_CONFIG + */ + REMOTE_PROC_NETWORK_SET_METADATA =3D 444, + + /** + * @generate: both + * @acl: network:read + */ + REMOTE_PROC_NETWORK_GET_METADATA =3D 445 }; diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index 3c6c230a16..c07e0af1e6 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -2687,6 +2687,23 @@ struct remote_network_event_lifecycle_msg { int event; int detail; }; +struct remote_network_set_metadata_args { + remote_nonnull_network network; + int type; + remote_string metadata; + remote_string key; + remote_string uri; + u_int flags; +}; +struct remote_network_get_metadata_args { + remote_nonnull_network network; + int type; + remote_string uri; + u_int flags; +}; +struct remote_network_get_metadata_ret { + remote_nonnull_string metadata; +}; struct remote_connect_storage_pool_event_register_any_args { int eventID; remote_storage_pool pool; @@ -3717,4 +3734,6 @@ enum remote_procedure { REMOTE_PROC_DOMAIN_RESTORE_PARAMS =3D 441, REMOTE_PROC_DOMAIN_ABORT_JOB_FLAGS =3D 442, REMOTE_PROC_DOMAIN_FD_ASSOCIATE =3D 443, + REMOTE_PROC_NETWORK_SET_METADATA =3D 444, + REMOTE_PROC_NETWORK_GET_METADATA =3D 445, }; --=20 2.41.0