Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp325651rwe; Wed, 31 Aug 2022 23:14:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Wy7JNctSApTCCXWkjYWFCmPmUt7NRW5Ss+PNs/W5ta8ML4ffzvjWK1IdqnwMtvpeP5t7i X-Received: by 2002:a05:6a00:24d1:b0:53a:a5bc:a2fc with SMTP id d17-20020a056a0024d100b0053aa5bca2fcmr7701537pfv.44.1662012886786; Wed, 31 Aug 2022 23:14:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662012886; cv=none; d=google.com; s=arc-20160816; b=aZd7inYvt2R3aBPbB1KCHjpgd3mWvO/D2PO3E3eKMOViqNIV5SIGga8qtvP8+8Gwf4 wxiIX6tIL4sBUcJ60NceVrlD7mnA72Qgmay4BXz9Ou92LLCtKdGGE1S74V5fN+GvqOL0 lZqCu/Slk0OvX750xE4eDtfd4iNKHnIMgwB4URZq7ne28/ZUZG3KO93QWnpnQI34Eokf IgfcH3qa2KiGHYbD8gbJeIOZsKBZfd9aB1YY1Xzs2K/i8SH9WNcCl38jWs5ALJ+tC2n3 Sj/kI9vdcyjXZiMTpvaxCqgwex+64S58G4D8aaCSVHkZ7iv+ji6m8airz4tGukFqwqhO LytQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=cCxZ/yQUkqa/gJ7/nlky+oaNWor7guJlDlr40wXuNwk=; b=dtXiNiYHXv8NROQjMIhEdhtDJxHtMUvpvEYqghhLYwfOxAnilbdICO6tbG4pg8NwJm 4aZWmRrK/qp72ItG2Rtmx44TZJmWKS/fHSrq9DvLkssf+t4ZxaUIP+/tdwuu58Caa2kC UUOqnoUwkw0F4z5mbhvFrIvxU0E6BjrwOSfA6KXyqJK3VIsXvapqZo377iChbXS/AuPw PLVU4vEn0sUZI0jzpkSrI0wFAtVqAYa54I8bE9pCEPxDg/buhxhzlC9mUF0KjKcK6FCV aJNBRBP0dX9aBnm5st1gMXjnJahPPqkbxXNEdBXIHAtO+gMm+Twyl7078DRnEUombwMX bj5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg18-20020a17090326d200b001755d722578si933565plb.524.2022.08.31.23.14.35; Wed, 31 Aug 2022 23:14:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233092AbiIAFzG (ORCPT + 99 others); Thu, 1 Sep 2022 01:55:06 -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 X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,RCVD_IN_SORBS_WEB, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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