From patchwork Thu Aug 29 07:59:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 58218 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB4691D15F; Thu, 29 Aug 2019 10:00:19 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 5B1941D151; Thu, 29 Aug 2019 10:00:18 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B14B4300C76A; Thu, 29 Aug 2019 08:00:17 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-52.ams2.redhat.com [10.36.112.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id F07A55B6A5; Thu, 29 Aug 2019 08:00:08 +0000 (UTC) From: Maxime Coquelin To: tiwei.bie@intel.com, zhihong.wang@intel.com, amorenoz@redhat.com, xiao.w.wang@intel.com, dev@dpdk.org, jfreimann@redhat.com Cc: stable@dpdk.org, Maxime Coquelin Date: Thu, 29 Aug 2019 09:59:45 +0200 Message-Id: <20190829080000.20806-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Thu, 29 Aug 2019 08:00:17 +0000 (UTC) Subject: [dpdk-dev] [PATCH 00/15] Introduce Virtio vDPA driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" vDPA allows to offload Virtio Datapath processing by supported NICs, like IFCVF for example. The control path has to be handled by a dedicated vDPA driver, so that it can translate Vhost-user protocol requests to proprietary NICs registers accesses. This driver is the vDPA driver for Virtio devices, meaning that Vhost-user protocol requests get translated to Virtio registers accesses as per defined in the Virtio spec. Basically, it can be used within a guest with a para-virtualized Virtio-net device, or even with a full Virtio HW offload NIC directly on host. Amongst the main features, all currently supported Virtio spec versions are supported (split & packed rings, but only tested with split ring for now) and also multiqueue support is added by implementing the cotnrol virtqueue in the driver. The structure of this driver is heavily based on IFCVF vDPA. Maxime Coquelin (15): vhost: remove vhost kernel header inclusion vhost: configure vDPA as soon as the device is ready net/virtio: move control path fonctions in virtqueue file net/virtio: add virtio PCI subsystem device ID declaration net/virtio: save notify bar ID in virtio HW struct net/virtio: add skeleton for virtio vDPA driver net/virtio: add vDPA ops to get number of queue net/virtio: add virtio vDPA op to get features net/virtio: add virtio vDPA op to get protocol features net/virtio: add vDPA op to configure and start the device net/virtio: add vDPA op to stop and close the device net/virtio: add vDPA op to set features net/virtio: add vDPA ops to get VFIO FDs net/virtio: add vDPA op to get notification area doc: add documentation for Virtio vDPA driver config/common_linux | 1 + doc/guides/nics/index.rst | 1 + doc/guides/nics/virtio_vdpa.rst | 45 ++ drivers/net/ifc/ifcvf_vdpa.c | 1 + drivers/net/virtio/Makefile | 4 + drivers/net/virtio/meson.build | 3 +- drivers/net/virtio/virtio_ethdev.c | 252 -------- drivers/net/virtio/virtio_pci.c | 6 +- drivers/net/virtio/virtio_pci.h | 2 + drivers/net/virtio/virtio_vdpa.c | 918 +++++++++++++++++++++++++++++ drivers/net/virtio/virtqueue.c | 255 ++++++++ drivers/net/virtio/virtqueue.h | 5 + lib/librte_vhost/rte_vdpa.h | 1 - lib/librte_vhost/rte_vhost.h | 9 +- lib/librte_vhost/vhost_user.c | 3 +- 15 files changed, 1243 insertions(+), 263 deletions(-) create mode 100644 doc/guides/nics/virtio_vdpa.rst create mode 100644 drivers/net/virtio/virtio_vdpa.c Acked-by: Shahaf Shuler