From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 501F8A0556; Mon, 5 Sep 2022 05:48:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7495D427ED; Mon, 5 Sep 2022 05:48:13 +0200 (CEST) Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) by mails.dpdk.org (Postfix) with ESMTP id 12B2540697 for ; Mon, 5 Sep 2022 05:48:09 +0200 (CEST) X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R441e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018046059; MF=kangjie.xu@linux.alibaba.com; NM=1; PH=DS; RN=7; SR=0; TI=SMTPD_---0VOK7-vD_1662349686; Received: from localhost(mailfrom:kangjie.xu@linux.alibaba.com fp:SMTPD_---0VOK7-vD_1662349686) by smtp.aliyun-inc.com; Mon, 05 Sep 2022 11:48:07 +0800 From: Kangjie Xu 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 Message-Id: <41bd4cb5a38827f3b8550e2fd5ab52bf5135d0e0.1662347861.git.kangjie.xu@linux.alibaba.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Signed-off-by: Xuan Zhuo --- 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