From nobody Fri Apr 17 22:32:21 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6BEBC43334 for ; Thu, 21 Jul 2022 08:44:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232262AbiGUIoU (ORCPT ); Thu, 21 Jul 2022 04:44:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232508AbiGUIoR (ORCPT ); Thu, 21 Jul 2022 04:44:17 -0400 Received: from smtp236.sjtu.edu.cn (smtp236.sjtu.edu.cn [202.120.2.236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F26E07E833 for ; Thu, 21 Jul 2022 01:44:15 -0700 (PDT) Received: from proxy02.sjtu.edu.cn (smtp188.sjtu.edu.cn [202.120.2.188]) by smtp236.sjtu.edu.cn (Postfix) with ESMTPS id 90FF41008B38F; Thu, 21 Jul 2022 16:44:13 +0800 (CST) Received: from localhost (localhost.localdomain [127.0.0.1]) by proxy02.sjtu.edu.cn (Postfix) with ESMTP id 7483E200A4ED3; Thu, 21 Jul 2022 16:44:13 +0800 (CST) X-Virus-Scanned: amavisd-new at Received: from proxy02.sjtu.edu.cn ([127.0.0.1]) by localhost (proxy02.sjtu.edu.cn [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id L5Z_9Dui9VVx; Thu, 21 Jul 2022 16:44:10 +0800 (CST) Received: from localhost.localdomain (unknown [202.120.40.82]) (Authenticated sender: qtxuning1999@sjtu.edu.cn) by proxy02.sjtu.edu.cn (Postfix) with ESMTPSA id 7A4A0200BFDA8; Thu, 21 Jul 2022 16:43:54 +0800 (CST) From: Guo Zhi To: eperezma@redhat.com, jasowang@redhat.com, sgarzare@redhat.com, mst@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, Guo Zhi Subject: [RFC 1/5] vhost: reorder used descriptors in a batch Date: Thu, 21 Jul 2022 16:43:37 +0800 Message-Id: <20220721084341.24183-2-qtxuning1999@sjtu.edu.cn> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220721084341.24183-1-qtxuning1999@sjtu.edu.cn> References: <20220721084341.24183-1-qtxuning1999@sjtu.edu.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Device may not use descriptors in order, for example, NIC and SCSI may not call __vhost_add_used_n with buffers in order. It's the task of __vhost_add_used_n to order them. This commit reorder the buffers using vq->heads, only the batch is begin from the expected start point and is continuous can the batch be exposed to driver. And only writing out a single used ring for a batch of descriptors, according to VIRTIO 1.1 spec. Signed-off-by: Guo Zhi --- drivers/vhost/vhost.c | 44 +++++++++++++++++++++++++++++++++++++++++-- drivers/vhost/vhost.h | 3 +++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 40097826c..e2e77e29f 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -317,6 +317,7 @@ static void vhost_vq_reset(struct vhost_dev *dev, vq->used_flags =3D 0; vq->log_used =3D false; vq->log_addr =3D -1ull; + vq->next_used_head_idx =3D 0; vq->private_data =3D NULL; vq->acked_features =3D 0; vq->acked_backend_features =3D 0; @@ -398,6 +399,8 @@ static long vhost_dev_alloc_iovecs(struct vhost_dev *de= v) GFP_KERNEL); if (!vq->indirect || !vq->log || !vq->heads) goto err_nomem; + + memset(vq->heads, 0, sizeof(*vq->heads) * dev->iov_limit); } return 0; =20 @@ -2374,12 +2377,49 @@ static int __vhost_add_used_n(struct vhost_virtqueu= e *vq, unsigned count) { vring_used_elem_t __user *used; + struct vring_desc desc; u16 old, new; int start; + int begin, end, i; + int copy_n =3D count; + + if (vhost_has_feature(vq, VIRTIO_F_IN_ORDER)) { + /* calculate descriptor chain length for each used buffer */ + for (i =3D 0; i < count; i++) { + begin =3D heads[i].id; + end =3D begin; + vq->heads[begin].len =3D 0; + do { + vq->heads[begin].len +=3D 1; + if (unlikely(vhost_get_desc(vq, &desc, end))) { + vq_err(vq, "Failed to get descriptor: idx %d addr %p\n", + end, vq->desc + end); + return -EFAULT; + } + } while ((end =3D next_desc(vq, &desc)) !=3D -1); + } + + count =3D 0; + /* sort and batch continuous used ring entry */ + while (vq->heads[vq->next_used_head_idx].len !=3D 0) { + count++; + i =3D vq->next_used_head_idx; + vq->next_used_head_idx =3D (vq->next_used_head_idx + + vq->heads[vq->next_used_head_idx].len) + % vq->num; + vq->heads[i].len =3D 0; + } + /* only write out a single used ring entry with the id corresponding + * to the head entry of the descriptor chain describing the last buffer + * in the batch. + */ + heads[0].id =3D i; + copy_n =3D 1; + } =20 start =3D vq->last_used_idx & (vq->num - 1); used =3D vq->used->ring + start; - if (vhost_put_used(vq, heads, start, count)) { + if (vhost_put_used(vq, heads, start, copy_n)) { vq_err(vq, "Failed to write used"); return -EFAULT; } @@ -2410,7 +2450,7 @@ int vhost_add_used_n(struct vhost_virtqueue *vq, stru= ct vring_used_elem *heads, =20 start =3D vq->last_used_idx & (vq->num - 1); n =3D vq->num - start; - if (n < count) { + if (n < count && !vhost_has_feature(vq, VIRTIO_F_IN_ORDER)) { r =3D __vhost_add_used_n(vq, heads, n); if (r < 0) return r; diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index d9109107a..7b2c0fbb5 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -107,6 +107,9 @@ struct vhost_virtqueue { bool log_used; u64 log_addr; =20 + /* Sort heads in order */ + u16 next_used_head_idx; + struct iovec iov[UIO_MAXIOV]; struct iovec iotlb_iov[64]; struct iovec *indirect; --=20 2.17.1 From nobody Fri Apr 17 22:32:21 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18150C433EF for ; Thu, 21 Jul 2022 08:44:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232394AbiGUIof (ORCPT ); Thu, 21 Jul 2022 04:44:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232520AbiGUIob (ORCPT ); Thu, 21 Jul 2022 04:44:31 -0400 Received: from smtp236.sjtu.edu.cn (smtp236.sjtu.edu.cn [202.120.2.236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BC227F52B for ; Thu, 21 Jul 2022 01:44:29 -0700 (PDT) Received: from proxy02.sjtu.edu.cn (smtp188.sjtu.edu.cn [202.120.2.188]) by smtp236.sjtu.edu.cn (Postfix) with ESMTPS id 5DFA21008B392; Thu, 21 Jul 2022 16:44:22 +0800 (CST) Received: from localhost (localhost.localdomain [127.0.0.1]) by proxy02.sjtu.edu.cn (Postfix) with ESMTP id 376B32007EB67; Thu, 21 Jul 2022 16:44:22 +0800 (CST) X-Virus-Scanned: amavisd-new at Received: from proxy02.sjtu.edu.cn ([127.0.0.1]) by localhost (proxy02.sjtu.edu.cn [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id n2EMzlF6ilrD; Thu, 21 Jul 2022 16:44:22 +0800 (CST) Received: from localhost.localdomain (unknown [202.120.40.82]) (Authenticated sender: qtxuning1999@sjtu.edu.cn) by proxy02.sjtu.edu.cn (Postfix) with ESMTPSA id E37C22008B6BB; Thu, 21 Jul 2022 16:44:10 +0800 (CST) From: Guo Zhi To: eperezma@redhat.com, jasowang@redhat.com, sgarzare@redhat.com, mst@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, Guo Zhi Subject: [RFC 2/5] vhost: announce VIRTIO_F_IN_ORDER support Date: Thu, 21 Jul 2022 16:43:38 +0800 Message-Id: <20220721084341.24183-3-qtxuning1999@sjtu.edu.cn> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220721084341.24183-1-qtxuning1999@sjtu.edu.cn> References: <20220721084341.24183-1-qtxuning1999@sjtu.edu.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" In order feature is supported by default in vhost. Signed-off-by: Guo Zhi --- drivers/vhost/vhost.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 7b2c0fbb5..b425c8f50 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -241,6 +241,7 @@ enum { (1ULL << VIRTIO_RING_F_EVENT_IDX) | (1ULL << VHOST_F_LOG_ALL) | (1ULL << VIRTIO_F_ANY_LAYOUT) | + (1ULL << VIRTIO_F_IN_ORDER) | (1ULL << VIRTIO_F_VERSION_1) }; =20 --=20 2.17.1 From nobody Fri Apr 17 22:32:21 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F96DC433EF for ; Thu, 21 Jul 2022 08:44:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231492AbiGUIox (ORCPT ); Thu, 21 Jul 2022 04:44:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231196AbiGUIon (ORCPT ); Thu, 21 Jul 2022 04:44:43 -0400 Received: from smtp236.sjtu.edu.cn (smtp236.sjtu.edu.cn [202.120.2.236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D2F47F522 for ; Thu, 21 Jul 2022 01:44:42 -0700 (PDT) Received: from proxy02.sjtu.edu.cn (smtp188.sjtu.edu.cn [202.120.2.188]) by smtp236.sjtu.edu.cn (Postfix) with ESMTPS id 5FF4D1008B389; Thu, 21 Jul 2022 16:44:33 +0800 (CST) Received: from localhost (localhost.localdomain [127.0.0.1]) by proxy02.sjtu.edu.cn (Postfix) with ESMTP id 425022008A4A7; Thu, 21 Jul 2022 16:44:33 +0800 (CST) X-Virus-Scanned: amavisd-new at Received: from proxy02.sjtu.edu.cn ([127.0.0.1]) by localhost (proxy02.sjtu.edu.cn [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BViXzssqZTBV; Thu, 21 Jul 2022 16:44:33 +0800 (CST) Received: from localhost.localdomain (unknown [202.120.40.82]) (Authenticated sender: qtxuning1999@sjtu.edu.cn) by proxy02.sjtu.edu.cn (Postfix) with ESMTPSA id 113F820089230; Thu, 21 Jul 2022 16:44:22 +0800 (CST) From: Guo Zhi To: eperezma@redhat.com, jasowang@redhat.com, sgarzare@redhat.com, mst@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, Guo Zhi Subject: [RFC 3/5] vhost_test: batch used buffer Date: Thu, 21 Jul 2022 16:43:39 +0800 Message-Id: <20220721084341.24183-4-qtxuning1999@sjtu.edu.cn> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220721084341.24183-1-qtxuning1999@sjtu.edu.cn> References: <20220721084341.24183-1-qtxuning1999@sjtu.edu.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Only add to used ring when a batch a buffer have all been used. And if in order feature negotiated, add randomness to the used buffer's order, test the ability of vhost to reorder batched buffer. Signed-off-by: Guo Zhi --- drivers/vhost/test.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c index bc8e7fb1e..1c9c40c11 100644 --- a/drivers/vhost/test.c +++ b/drivers/vhost/test.c @@ -43,6 +43,9 @@ struct vhost_test { static void handle_vq(struct vhost_test *n) { struct vhost_virtqueue *vq =3D &n->vqs[VHOST_TEST_VQ]; + struct vring_used_elem *heads =3D kmalloc(sizeof(*heads) + * vq->num, GFP_KERNEL); + int batch_idx =3D 0; unsigned out, in; int head; size_t len, total_len =3D 0; @@ -84,11 +87,21 @@ static void handle_vq(struct vhost_test *n) vq_err(vq, "Unexpected 0 len for TX\n"); break; } - vhost_add_used_and_signal(&n->dev, vq, head, 0); + heads[batch_idx].id =3D cpu_to_vhost32(vq, head); + heads[batch_idx++].len =3D cpu_to_vhost32(vq, len); total_len +=3D len; if (unlikely(vhost_exceeds_weight(vq, 0, total_len))) break; } + if (batch_idx) { + if (vhost_has_feature(vq, VIRTIO_F_IN_ORDER) && batch_idx >=3D 2) { + vhost_add_used_and_signal_n(&n->dev, vq, &heads[batch_idx / 2], + batch_idx - batch_idx / 2); + vhost_add_used_and_signal_n(&n->dev, vq, heads, batch_idx / 2); + } else { + vhost_add_used_and_signal_n(&n->dev, vq, heads, batch_idx); + } + } =20 mutex_unlock(&vq->mutex); } --=20 2.17.1 From nobody Fri Apr 17 22:32:21 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22773C43334 for ; Thu, 21 Jul 2022 08:45:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232565AbiGUIpS (ORCPT ); Thu, 21 Jul 2022 04:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232526AbiGUIo7 (ORCPT ); Thu, 21 Jul 2022 04:44:59 -0400 Received: from smtp236.sjtu.edu.cn (smtp236.sjtu.edu.cn [202.120.2.236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 190307FE6D for ; Thu, 21 Jul 2022 01:44:54 -0700 (PDT) Received: from proxy02.sjtu.edu.cn (smtp188.sjtu.edu.cn [202.120.2.188]) by smtp236.sjtu.edu.cn (Postfix) with ESMTPS id 60E971008B38D; Thu, 21 Jul 2022 16:44:45 +0800 (CST) Received: from localhost (localhost.localdomain [127.0.0.1]) by proxy02.sjtu.edu.cn (Postfix) with ESMTP id 404A820089230; Thu, 21 Jul 2022 16:44:45 +0800 (CST) X-Virus-Scanned: amavisd-new at Received: from proxy02.sjtu.edu.cn ([127.0.0.1]) by localhost (proxy02.sjtu.edu.cn [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ASNR1t25gaag; Thu, 21 Jul 2022 16:44:45 +0800 (CST) Received: from localhost.localdomain (unknown [202.120.40.82]) (Authenticated sender: qtxuning1999@sjtu.edu.cn) by proxy02.sjtu.edu.cn (Postfix) with ESMTPSA id 738F4200BFDA8; Thu, 21 Jul 2022 16:44:33 +0800 (CST) From: Guo Zhi To: eperezma@redhat.com, jasowang@redhat.com, sgarzare@redhat.com, mst@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, Guo Zhi Subject: [RFC 4/5] virtio: get desc id in order Date: Thu, 21 Jul 2022 16:43:40 +0800 Message-Id: <20220721084341.24183-5-qtxuning1999@sjtu.edu.cn> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220721084341.24183-1-qtxuning1999@sjtu.edu.cn> References: <20220721084341.24183-1-qtxuning1999@sjtu.edu.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" If in order feature negotiated, we can skip the used ring to get buffer's desc id sequentially. Signed-off-by: Guo Zhi --- drivers/virtio/virtio_ring.c | 37 ++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index a5ec724c0..4d57a4edc 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -144,6 +144,9 @@ struct vring_virtqueue { /* DMA address and size information */ dma_addr_t queue_dma_addr; size_t queue_size_in_bytes; + + /* In order feature batch begin here */ + u16 next_batch_desc_begin; } split; =20 /* Available for packed ring */ @@ -700,8 +703,10 @@ static void detach_buf_split(struct vring_virtqueue *v= q, unsigned int head, } =20 vring_unmap_one_split(vq, i); - vq->split.desc_extra[i].next =3D vq->free_head; - vq->free_head =3D head; + if (!virtio_has_feature(vq->vq.vdev, VIRTIO_F_IN_ORDER)) { + vq->split.desc_extra[i].next =3D vq->free_head; + vq->free_head =3D head; + } =20 /* Plus final descriptor */ vq->vq.num_free++; @@ -743,7 +748,8 @@ static void *virtqueue_get_buf_ctx_split(struct virtque= ue *_vq, { struct vring_virtqueue *vq =3D to_vvq(_vq); void *ret; - unsigned int i; + __virtio16 nextflag =3D cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT); + unsigned int i, j; u16 last_used; =20 START_USE(vq); @@ -762,11 +768,24 @@ static void *virtqueue_get_buf_ctx_split(struct virtq= ueue *_vq, /* Only get used array entries after they have been exposed by host. */ virtio_rmb(vq->weak_barriers); =20 - last_used =3D (vq->last_used_idx & (vq->split.vring.num - 1)); - i =3D virtio32_to_cpu(_vq->vdev, - vq->split.vring.used->ring[last_used].id); - *len =3D virtio32_to_cpu(_vq->vdev, - vq->split.vring.used->ring[last_used].len); + if (virtio_has_feature(_vq->vdev, VIRTIO_F_IN_ORDER)) { + /* Skip used ring and get used desc in order*/ + i =3D vq->split.next_batch_desc_begin; + j =3D i; + while (vq->split.vring.desc[j].flags & nextflag) + j =3D (j + 1) % vq->split.vring.num; + /* move to next */ + j =3D (j + 1) % vq->split.vring.num; + vq->split.next_batch_desc_begin =3D j; + + /* TODO: len of buffer */ + } else { + last_used =3D (vq->last_used_idx & (vq->split.vring.num - 1)); + i =3D virtio32_to_cpu(_vq->vdev, + vq->split.vring.used->ring[last_used].id); + *len =3D virtio32_to_cpu(_vq->vdev, + vq->split.vring.used->ring[last_used].len); + } =20 if (unlikely(i >=3D vq->split.vring.num)) { BAD_RING(vq, "id %u out of range\n", i); @@ -2234,6 +2253,8 @@ struct virtqueue *__vring_new_virtqueue(unsigned int = index, vq->split.avail_flags_shadow =3D 0; vq->split.avail_idx_shadow =3D 0; =20 + vq->split.next_batch_desc_begin =3D 0; + /* No callback? Tell other side not to bother us. */ if (!callback) { vq->split.avail_flags_shadow |=3D VRING_AVAIL_F_NO_INTERRUPT; --=20 2.17.1 From nobody Fri Apr 17 22:32:21 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A3BBC43334 for ; Thu, 21 Jul 2022 08:45:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232563AbiGUIpi (ORCPT ); Thu, 21 Jul 2022 04:45:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232554AbiGUIpQ (ORCPT ); Thu, 21 Jul 2022 04:45:16 -0400 X-Greylist: delayed 68 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 21 Jul 2022 01:45:09 PDT Received: from smtp236.sjtu.edu.cn (smtp236.sjtu.edu.cn [202.120.2.236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9263638AD; Thu, 21 Jul 2022 01:45:07 -0700 (PDT) Received: from proxy02.sjtu.edu.cn (smtp188.sjtu.edu.cn [202.120.2.188]) by smtp236.sjtu.edu.cn (Postfix) with ESMTPS id 606C01008B391; Thu, 21 Jul 2022 16:44:57 +0800 (CST) Received: from localhost (localhost.localdomain [127.0.0.1]) by proxy02.sjtu.edu.cn (Postfix) with ESMTP id 8BBFE20089230; Thu, 21 Jul 2022 16:44:57 +0800 (CST) X-Virus-Scanned: amavisd-new at Received: from proxy02.sjtu.edu.cn ([127.0.0.1]) by localhost (proxy02.sjtu.edu.cn [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id I5YBS9EjyjNk; Thu, 21 Jul 2022 16:44:57 +0800 (CST) Received: from localhost.localdomain (unknown [202.120.40.82]) (Authenticated sender: qtxuning1999@sjtu.edu.cn) by proxy02.sjtu.edu.cn (Postfix) with ESMTPSA id D47F5200BFDA8; Thu, 21 Jul 2022 16:44:45 +0800 (CST) From: Guo Zhi To: eperezma@redhat.com, jasowang@redhat.com, sgarzare@redhat.com, mst@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, Guo Zhi Subject: [RFC 5/5] virtio: annouce VIRTIO_F_IN_ORDER support Date: Thu, 21 Jul 2022 16:43:41 +0800 Message-Id: <20220721084341.24183-6-qtxuning1999@sjtu.edu.cn> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220721084341.24183-1-qtxuning1999@sjtu.edu.cn> References: <20220721084341.24183-1-qtxuning1999@sjtu.edu.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" In order feature is supported by default in virtio. Signed-off-by: Guo Zhi --- drivers/virtio/virtio_ring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 4d57a4edc..458b57df3 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -2398,6 +2398,8 @@ void vring_transport_features(struct virtio_device *v= dev) break; case VIRTIO_F_ORDER_PLATFORM: break; + case VIRTIO_F_IN_ORDER: + break; default: /* We don't understand this bit. */ __virtio_clear_bit(vdev, i); --=20 2.17.1