From: Kangjie Xu <kangjie.xu@linux.alibaba.com>
To: maxime.coquelin@redhat.com, chenbo.xia@intel.com
Cc: dev@dpdk.org, xuanzhuo@linux.alibaba.com,
hengqi@linux.alibaba.com, jasowang@redhat.com, mst@redhat.com
Subject: [PATCH v3 2/2] vhost: support VIRTIO_F_RING_RESET for vhost-user
Date: Mon, 12 Sep 2022 11:36:47 +0800 [thread overview]
Message-ID: <5a9722d0d3890403280805e6173a2d1e9db8f777.1662952732.git.kangjie.xu@linux.alibaba.com> (raw)
In-Reply-To: <cover.1662952732.git.kangjie.xu@linux.alibaba.com>
Add VIRTIO_F_RING_RESET, which indicates that the driver can reset a
queue individually.
The feature is added to virtio-spec 1.2. The relevant information is
in https://github.com/oasis-tcs/virtio-spec/issues/124
Signed-off-by: Kangjie Xu <kangjie.xu@linux.alibaba.com>
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
---
lib/vhost/vhost.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h
index 40fac3b7c6..76461a3406 100644
--- a/lib/vhost/vhost.h
+++ b/lib/vhost/vhost.h
@@ -376,6 +376,11 @@ struct vhost_msg {
#define VIRTIO_F_VERSION_1 32
#endif
+/* This feature indicates that the driver can reset a queue individually. */
+#ifndef VIRTIO_F_RING_RESET
+#define VIRTIO_F_RING_RESET 40
+#endif
+
/* Declare packed ring related bits for older kernels */
#ifndef VIRTIO_F_RING_PACKED
@@ -438,7 +443,8 @@ struct vring_packed_desc_event {
(1ULL << VIRTIO_NET_F_MTU) | \
(1ULL << VIRTIO_F_IN_ORDER) | \
(1ULL << VIRTIO_F_IOMMU_PLATFORM) | \
- (1ULL << VIRTIO_F_RING_PACKED))
+ (1ULL << VIRTIO_F_RING_PACKED) | \
+ (1ULL << VIRTIO_F_RING_RESET))
struct guest_page {
--
2.32.0
prev parent reply other threads:[~2022-09-12 3:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-12 3:36 [PATCH v3 0/2] " Kangjie Xu
2022-09-12 3:36 ` [PATCH v3 1/2] vhost: destroy device when all vqs are inactive Kangjie Xu
2022-10-11 16:44 ` Maxime Coquelin
2024-04-29 16:27 ` Stephen Hemminger
2024-04-30 3:43 ` Xuan Zhuo
2022-09-12 3:36 ` Kangjie Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5a9722d0d3890403280805e6173a2d1e9db8f777.1662952732.git.kangjie.xu@linux.alibaba.com \
--to=kangjie.xu@linux.alibaba.com \
--cc=chenbo.xia@intel.com \
--cc=dev@dpdk.org \
--cc=hengqi@linux.alibaba.com \
--cc=jasowang@redhat.com \
--cc=maxime.coquelin@redhat.com \
--cc=mst@redhat.com \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).