DPDK patches and discussions
 help / color / mirror / Atom feed
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, jasonwang@redhat.com, mst@redhat.com
Subject: [PATCH v2 1/2] vhost: support VIRTIO_F_RING_RESET for vhost-user
Date: Mon,  5 Sep 2022 11:48:04 +0800	[thread overview]
Message-ID: <41bd4cb5a38827f3b8550e2fd5ab52bf5135d0e0.1662347861.git.kangjie.xu@linux.alibaba.com> (raw)
In-Reply-To: <cover.1662347861.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


  reply	other threads:[~2022-09-05  3:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05  3:48 [PATCH v2 0/2] " Kangjie Xu
2022-09-05  3:48 ` Kangjie Xu [this message]
2022-09-05  3:48 ` [PATCH v2 2/2] vhost: introduce VHOST_USER_RESET_VRING Kangjie Xu
2022-09-22  9:35   ` Xia, Chenbo
2022-09-23  1:41     ` Xuan Zhuo
2022-09-26  7:28       ` Xia, Chenbo

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=41bd4cb5a38827f3b8550e2fd5ab52bf5135d0e0.1662347861.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=jasonwang@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).