From mboxrd@z Thu Jan 1 00:00:00 1970 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 B4D81ECAAD2 for ; Thu, 1 Sep 2022 05:55:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233159AbiIAFzH (ORCPT ); Thu, 1 Sep 2022 01:55:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233145AbiIAFy6 (ORCPT ); Thu, 1 Sep 2022 01:54:58 -0400 Received: from smtp236.sjtu.edu.cn (smtp236.sjtu.edu.cn [202.120.2.236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C5B66375; Wed, 31 Aug 2022 22:54:53 -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 5CEFD1008B39D; Thu, 1 Sep 2022 13:54:49 +0800 (CST) Received: from localhost (localhost.localdomain [127.0.0.1]) by proxy02.sjtu.edu.cn (Postfix) with ESMTP id D6FAB2009BEAD; Thu, 1 Sep 2022 13:54:47 +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 GtBnxunfCybj; Thu, 1 Sep 2022 13:54:46 +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 00982200A5E62; Thu, 1 Sep 2022 13:54:34 +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 v3 0/7] In order support for virtio_ring, vhost and vsock. Date: Thu, 1 Sep 2022 13:54:27 +0800 Message-Id: <20220901055434.824-1-qtxuning1999@sjtu.edu.cn> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In virtio-spec 1.1, new feature bit VIRTIO_F_IN_ORDER was introduced. When this feature has been negotiated, virtio driver will use descriptors in ring order: starting from offset 0 in the table, and wrapping around at the end of the table. Vhost devices will always use descriptors in the same order in which they have been made available. This can reduce virtio accesses to used ring. Based on updated virtio-spec, this series realized IN_ORDER prototype in virtio driver and vhost. Currently IN_ORDER feature supported devices are *vhost_test* and *vsock* in vhost and virtio-net in QEMU. IN_ORDER feature works well combined with INDIRECT feature in this patch series. Virtio driver in_order support for packed vq hasn't been done in this patch series now. Guo Zhi (7): vhost: expose used buffers vhost_test: batch used buffer vsock: batch buffers in tx vsock: announce VIRTIO_F_IN_ORDER in vsock virtio: unmask F_NEXT flag in desc_extra virtio: in order support for virtio_ring virtio: announce VIRTIO_F_IN_ORDER support drivers/vhost/test.c | 16 ++++++-- drivers/vhost/vhost.c | 16 ++++++-- drivers/vhost/vsock.c | 13 +++++- drivers/virtio/virtio_ring.c | 79 +++++++++++++++++++++++++++++++----- 4 files changed, 104 insertions(+), 20 deletions(-) -- 2.17.1