Re: [PATCH V2 5/5] vdpasim: vDPA device simulator
flat view
From: Jason Wang <hidden>
Date: 2020-02-11 03:12:47
Also in:
kvm, lkml, netdev
On 2020/2/10 下午7:23, Michael S. Tsirkin wrote:
On Mon, Feb 10, 2020 at 11:56:08AM +0800, Jason Wang wrote:quoted
This patch implements a software vDPA networking device. The datapath is implemented through vringh and workqueue. The device has an on-chip IOMMU which translates IOVA to PA. For kernel virtio drivers, vDPA simulator driver provides dma_ops. For vhost driers, set_map() methods of vdpa_config_ops is implemented to accept mappings from vhost. Currently, vDPA device simulator will loopback TX traffic to RX. So the main use case for the device is vDPA feature testing, prototyping and development. Note, there's no management API implemented, a vDPA device will be registered once the module is probed. We need to handle this in the future development. Signed-off-by: Jason Wang<redacted> --- drivers/virtio/vdpa/Kconfig | 17 + drivers/virtio/vdpa/Makefile | 1 + drivers/virtio/vdpa/vdpa_sim.c | 678 +++++++++++++++++++++++++++++++++ 3 files changed, 696 insertions(+) create mode 100644 drivers/virtio/vdpa/vdpa_sim.cdiff --git a/drivers/virtio/vdpa/Kconfig b/drivers/virtio/vdpa/Kconfig index 7a99170e6c30..a7888974dda8 100644 --- a/drivers/virtio/vdpa/Kconfig +++ b/drivers/virtio/vdpa/Kconfig@@ -7,3 +7,20 @@ config VDPA datapath which complies with virtio specifications with vendor specific control path. +menuconfig VDPA_MENU + bool "VDPA drivers" + default n + +if VDPA_MENU + +config VDPA_SIM + tristate "vDPA device simulator" + select VDPA + default n + help + vDPA networking device simulator which loop TX traffic back + to RX. This device is used for testing, prototyping and + development of vDPA.So how about we make this depend on RUNTIME_TESTING_MENU?
I'm not sure how much it can help but I can do that in next version. Thanks RUNTIME_TESTING_MENU