OSDN Git Service

vdpasim: vDPA device simulator
authorJason Wang <jasowang@redhat.com>
Thu, 26 Mar 2020 14:01:24 +0000 (22:01 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 2 Apr 2020 14:41:40 +0000 (10:41 -0400)
commit2c53d0f64c06f4580588ef16f50f63a112117a02
treeb7223a184999bb337c05379b403723fe33aef0b6
parent4c8cf31885f69e86be0b5b9e6677a26797365e1d
vdpasim: vDPA device simulator

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 <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20200326140125.19794-9-jasowang@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/vdpa/Kconfig
drivers/virtio/vdpa/Makefile
drivers/virtio/vdpa/vdpa_sim/Makefile [new file with mode: 0644]
drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c [new file with mode: 0644]