Re: [PATCH V2 19/19] vdpa: introduce virtio pci driver

From: Jason Wang
Date: Sun Dec 06 2020 - 22:31:08 EST



On 2020/12/5 上午1:12, Randy Dunlap wrote:
On 12/4/20 7:20 AM, Stefano Garzarella wrote:
On Fri, Dec 04, 2020 at 12:03:53PM +0800, Jason Wang wrote:
This patch introduce a vDPA driver for virtio-pci device. It bridges
the virtio-pci control command to the vDPA bus. This will be used for
features prototyping and testing.

Note that get/restore virtqueue state is not supported which needs
extension on the virtio specification.

Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>
---
drivers/vdpa/Kconfig              |   6 +
drivers/vdpa/Makefile             |   1 +
drivers/vdpa/virtio_pci/Makefile  |   2 +
drivers/vdpa/virtio_pci/vp_vdpa.c | 455 ++++++++++++++++++++++++++++++
4 files changed, 464 insertions(+)
create mode 100644 drivers/vdpa/virtio_pci/Makefile
create mode 100644 drivers/vdpa/virtio_pci/vp_vdpa.c

diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig
index 358f6048dd3c..18cad14f533e 100644
--- a/drivers/vdpa/Kconfig
+++ b/drivers/vdpa/Kconfig
@@ -48,4 +48,10 @@ config MLX5_VDPA_NET
      be executed by the hardware. It also supports a variety of stateless
      offloads depending on the actual device used and firmware version.

+config VP_VDPA
+    tristate "Virtio PCI bridge vDPA driver"
+    depends on PCI_MSI && VIRTIO_PCI_MODERN
+    help
+      This kernel module that bridges virtio PCI device to vDPA bus.
                             ^
Without 'that' maybe sound better, but I'm not a native speaker :-)
Yes, drop 'that', please.


Will fix.

Thanks



+
endif # VDPA