]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit43c6dd814dc65483b3c17385521b9264e38472fc
treeb7223a184999bb337c05379b403723fe33aef0b6
parentf94b9137d7f7bd8f3cbdcb8e90ff45edeeef7688
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]