Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1704456imm; Wed, 16 May 2018 01:38:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrUlbb3FZb/3fumh7EAq+GgWyGSWUHR2FFIB1z680T5uEfXoI2e5WwgVe8bvaDaOWGgOAGM X-Received: by 2002:a17:902:6b09:: with SMTP id o9-v6mr18533723plk.256.1526459903430; Wed, 16 May 2018 01:38:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526459903; cv=none; d=google.com; s=arc-20160816; b=dib/eM6mUNQ6XjdyP6wiUp8OKiMRqgTgT+qbnw+uaBcRm6To4kLcl4dT1EVhvAp+L8 Y0gB1Z5LoWvsDZnzxyQNrDmHNU64FwtsPpQT58/zRTQr8EH3S3Np25NSSY7zCoTN1P4N LW2I2DhpOA5/QO6pIHb7jI454VF+HWx13ifrigg6iG8REYCEAhSjLnwU/C83drxdcYcr dFgGM+W3DPn0fT01k5pcOxk12JD5X1H8uqQ+lYF/760yR/zJd+oq0MPMekWMSEDkEgpx SqC5V6LkGhm4JMNNuXiSLWFRG/KsoqVAdfmm4g5pNSBiyS8qq6N3Gz6UutKeMcvcLY0J LOmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=gSRpBNx+b1vPBvRwjlIC9PNFJTE8k4cx+X2KEVeBPNE=; b=R9Eh6ShTIV6clXO3uDWzTmPW4+BMGAcibinyh8yRPudpeghyaOr/S8onJAPUNZI84t InHVag6ROtiGTpeguAUgohSpLHdDzdYVZAyMNa1wZKzrHlYEFniYrncsJX0h0TkN9NTp g0crYhC2oAtn/HV7T0QUROc6DuV820Jp4/1m9s0ZflVFjY/OA+Fy999Xg4ZRc0Wu+eXa F+rqTQubzB6umWWwATL1Jz75KRUNsShfl6XzRWKpd+m7ILYxRYJcARPbU8eMArcvg0VN nIK8EKgj7BkCJt8nq9KonIDaoZQrE2TZ7jrlwga8lccLE91mz7mUs9EOdtYq3NAOd+7M sZtA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17-v6si2251399pfk.36.2018.05.16.01.38.09; Wed, 16 May 2018 01:38:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752403AbeEPIhf (ORCPT + 99 others); Wed, 16 May 2018 04:37:35 -0400 Received: from mga03.intel.com ([134.134.136.65]:30622 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751510AbeEPIhc (ORCPT ); Wed, 16 May 2018 04:37:32 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 May 2018 01:37:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,404,1520924400"; d="scan'208";a="41347759" Received: from debian.sh.intel.com ([10.67.104.203]) by orsmga007.jf.intel.com with ESMTP; 16 May 2018 01:37:30 -0700 From: Tiwei Bie To: mst@redhat.com, jasowang@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: wexu@redhat.com, jfreimann@redhat.com, tiwei.bie@intel.com Subject: [RFC v4 0/5] virtio: support packed ring Date: Wed, 16 May 2018 16:37:32 +0800 Message-Id: <20180516083737.26504-1-tiwei.bie@intel.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello everyone, This RFC implements packed ring support in virtio driver. Some simple functional tests have been done with Jason's packed ring implementation in vhost: https://lkml.org/lkml/2018/4/23/12 Both of ping and netperf worked as expected (with EVENT_IDX disabled). TODO: - Refinements (for code and commit log); - More tests; - Bug fixes; RFC v3 -> RFC v4: - Make ID allocation support out-of-order (Jason); - Various fixes for EVENT_IDX support; RFC v2 -> RFC v3: - Split into small patches (Jason); - Add helper virtqueue_use_indirect() (Jason); - Just set id for the last descriptor of a list (Jason); - Calculate the prev in virtqueue_add_packed() (Jason); - Fix/improve desc suppression code (Jason/MST); - Refine the code layout for XXX_split/packed and wrappers (MST); - Fix the comments and API in uapi (MST); - Remove the BUG_ON() for indirect (Jason); - Some other refinements and bug fixes; RFC v1 -> RFC v2: - Add indirect descriptor support - compile test only; - Add event suppression supprt - compile test only; - Move vring_packed_init() out of uapi (Jason, MST); - Merge two loops into one in virtqueue_add_packed() (Jason); - Split vring_unmap_one() for packed ring and split ring (Jason); - Avoid using '%' operator (Jason); - Rename free_head -> next_avail_idx (Jason); - Add comments for virtio_wmb() in virtqueue_add_packed() (Jason); - Some other refinements and bug fixes; Thanks! Tiwei Bie (5): virtio: add packed ring definitions virtio_ring: support creating packed ring virtio_ring: add packed ring support virtio_ring: add event idx support in packed ring virtio_ring: enable packed ring drivers/virtio/virtio_ring.c | 1338 ++++++++++++++++++++++------ include/linux/virtio_ring.h | 8 +- include/uapi/linux/virtio_config.h | 12 +- include/uapi/linux/virtio_ring.h | 36 + 4 files changed, 1116 insertions(+), 278 deletions(-) -- 2.17.0