From nobody Tue Nov 26 11:55:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1708530464; cv=none; d=zohomail.com; s=zohoarc; b=j6StAmOafK/D2ufDQBkcR/bDbHMwii/KZ8YAzxADF84HBPRBtif++To7QI5cg/aoVub6OhScbxwy7qIO1VYsZfbyv5PyydPAPCMFWlDaP7WtwagBfJYYWj8dyFXcI3FoO0HpWC47J6L/4xiiT3vUZqAbz2tqBZXvn6EsI/BpQJg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708530464; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7r0K83xygSbOqxKBX8JoryJgPptOcBnumWJOEFdSHes=; b=PJNL4OMK9haH7QJNDPjIo22ABlrUnfuxo154hyBlH8n6SazO1QEFlFyMNvl7tcfyQ8wkKGC4UtPQXXX+h6nCkjSvindZ4uloxo9filXm4YSrWRQk7g+8jir9F3wuGRk3S5bLFYghSVoXKu4BnXPZDblNjxuSLhelx/bp9h/SvAc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708530464456541.22114989992; Wed, 21 Feb 2024 07:47:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcoZh-0003RU-Pg; Wed, 21 Feb 2024 10:31:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcoOz-0004Xl-Pi for qemu-devel@nongnu.org; Wed, 21 Feb 2024 10:20:53 -0500 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rcnas-0001oX-MM for qemu-devel@nongnu.org; Wed, 21 Feb 2024 09:29:09 -0500 Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6e458a77be3so1521167a34.1 for ; Wed, 21 Feb 2024 06:29:06 -0800 (PST) Received: from anolis-dev.zelin.local ([221.122.98.162]) by smtp.gmail.com with ESMTPSA id p129-20020a625b87000000b006e4762b5f3bsm4480030pfb.172.2024.02.21.06.29.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 06:29:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1708525745; x=1709130545; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7r0K83xygSbOqxKBX8JoryJgPptOcBnumWJOEFdSHes=; b=IagRgFgvm8DKKGbZ4q3MOBd94+z4GSgL4m6Sd9CjrgJ9bw423c7m2pkL6zVoNkq4Gs k7W9ks5flC+UK0UsTmexhaz/z4NNaVRXdBSqV4oKaeLkcNMYefub0/HlbQ/zQXvB/bsh /x3z2JspTOuR8GzRuVZxWpMuPTzLhgunp66dj6+hXQr7Cx28+4OD5S393FGs5hcSa/fu vL+qKXvA4iOjPCrd/U3zOYp9e1i1xibZ9HPsI+svVb3j6dU5AfWWLDVVva8BoE9Nskhx ntdLK8YzF/kpga5CttCP5IzjTU4t98ubjrSdXegnlx+Zu52W9lHoU9/W4gUauJ4phMYt qh4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708525745; x=1709130545; 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=7r0K83xygSbOqxKBX8JoryJgPptOcBnumWJOEFdSHes=; b=pTEpszZPNOwBMhVcnu//Qa63xGp2K5JxXHHs6EF5v2nBJuBUoKHs8tM9Jds4fKyUR7 VWdgL1zbDWvh5NdSz49GOhi8xtk4Vo1tcgBDK9usuRpv5exMmf/7yhnwZAA/SH9KIwWz 9w+jsz2C3wcIHjfo+1FzC8REoOCGfsoZ0kWpj0dCIGJmryaSey3hg6uWrc29SLE3x2eA 0xQD+9LB2C5FX5/0WOoyXuKeRLwwbxoxuWp5QtxWloeEi+J9UQOovERdWexsaaiNqYOj +0gqWrghnL05tueCz0IWGdPbcJS8+qh5WhRw2NYpIo9xWRDp9lhotgml24syodZ1sZhX 0Fxw== X-Gm-Message-State: AOJu0YzlWgYl408WfSZFvdpU0MMiFQ2IvsZTzU1Hw0/EcvK7Km4hzc1Y RfB4p9eYuhXCd5Hz7VWhhDNAHHk7m+SpWpsDOBB5o1vVfYNUrfH+UiNkVhSkRDEOkoSkqPxGo5M lYH8Wyg== X-Google-Smtp-Source: AGHT+IFv9Q7eUxVPqCIHCqvRmuVESuj/qaZ3BNl1mzfZQHAGfvb0DozbacXzmHZrtfY8YRZ94hVn0g== X-Received: by 2002:a05:6358:7f0d:b0:17b:638d:ac4f with SMTP id p13-20020a0563587f0d00b0017b638dac4fmr798588rwn.6.1708525744483; Wed, 21 Feb 2024 06:29:04 -0800 (PST) From: Hyman Huang To: qemu-devel@nongnu.org Cc: "Michael S . Tsirkin" , Eric Blake , Markus Armbruster , yong.huang@smartx.com Subject: [PATCH v4 3/3] qapi: Define VhostDeviceProtocols and VirtioDeviceFeatures as plain C types Date: Wed, 21 Feb 2024 22:28:53 +0800 Message-Id: <8c1c1c6982854c64af0e30982aaead3db24a99c9.1708525606.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::333; envelope-from=yong.huang@smartx.com; helo=mail-ot1-x333.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @smartx-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1708530477945100001 Content-Type: text/plain; charset="utf-8" VhostDeviceProtocols and VirtioDeviceFeatures are only used in virtio-hmp-cmds.c. So define them as plain C types there, and drop them from the QAPI schema. Signed-off-by: Hyman Huang Reviewed-by: Markus Armbruster --- hw/virtio/virtio-hmp-cmds.c | 16 +++++++++++++++ qapi/virtio.json | 39 ------------------------------------- 2 files changed, 16 insertions(+), 39 deletions(-) diff --git a/hw/virtio/virtio-hmp-cmds.c b/hw/virtio/virtio-hmp-cmds.c index f95bad0069..045b472228 100644 --- a/hw/virtio/virtio-hmp-cmds.c +++ b/hw/virtio/virtio-hmp-cmds.c @@ -29,6 +29,22 @@ =20 #include CONFIG_DEVICES =20 +typedef struct VhostDeviceProtocols VhostDeviceProtocols; +struct VhostDeviceProtocols { + strList *protocols; + bool has_unknown_protocols; + uint64_t unknown_protocols; +}; + +typedef struct VirtioDeviceFeatures VirtioDeviceFeatures; +struct VirtioDeviceFeatures { + strList *transports; + bool has_dev_features; + strList *dev_features; + bool has_unknown_dev_features; + uint64_t unknown_dev_features; +}; + #define FEATURE_ENTRY(name, desc) (qmp_virtio_feature_map_t) \ { .virtio_bit =3D name, .feature_desc =3D desc } =20 diff --git a/qapi/virtio.json b/qapi/virtio.json index 26516fb29c..42dbc87f2f 100644 --- a/qapi/virtio.json +++ b/qapi/virtio.json @@ -300,45 +300,6 @@ 'data': { 'statuses': [ 'str' ], '*unknown-statuses': 'uint8' } } =20 -## -# @VhostDeviceProtocols: -# -# A structure defined to list the vhost user protocol features of a -# Vhost User device -# -# @protocols: List of decoded vhost user protocol features of a vhost -# user device -# -# @unknown-protocols: Vhost user device protocol features bitmap that -# have not been decoded -# -# Since: 7.2 -## -{ 'struct': 'VhostDeviceProtocols', - 'data': { 'protocols': [ 'str' ], - '*unknown-protocols': 'uint64' } } - -## -# @VirtioDeviceFeatures: -# -# The common fields that apply to most Virtio devices. Some devices -# may not have their own device-specific features (e.g. virtio-rng). -# -# @transports: List of transport features of the virtio device -# -# @dev-features: List of device-specific features (if the device has -# unique features) -# -# @unknown-dev-features: Virtio device features bitmap that have not -# been decoded -# -# Since: 7.2 -## -{ 'struct': 'VirtioDeviceFeatures', - 'data': { 'transports': [ 'str' ], - '*dev-features': [ 'str' ], - '*unknown-dev-features': 'uint64' } } - ## # @VirtQueueStatus: # --=20 2.39.3