net/ifcvf: add ifcvf vDPA driver
authorXiao Wang <xiao.w.wang@intel.com>
Tue, 17 Apr 2018 07:06:23 +0000 (15:06 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 14:54:55 +0000 (15:54 +0100)
commita3f8150eac6d43e1fbf3b2047c655f42ded8c88b
tree9f164a91bd482d71b9c1105fa0b66b8ee717335b
parent440f03c2537806f296790fc9786e2e2f8775096a
net/ifcvf: add ifcvf vDPA driver

The IFCVF vDPA (vhost data path acceleration) driver provides support for
the Intel FPGA 100G VF (IFCVF). IFCVF's datapath is virtio ring compatible,
it works as a HW vhost backend which can send/receive packets to/from
virtio directly by DMA.

Different VF devices serve different virtio frontends which are in
different VMs, so each VF needs to have its own DMA address translation
service. During the driver probe a new container is created, with this
container vDPA driver can program DMA remapping table with the VM's memory
region information.

Key vDPA driver ops implemented:

- ifcvf_dev_config:
  Enable VF data path with virtio information provided by vhost lib,
  including IOMMU programming to enable VF DMA to VM's memory, VFIO
  interrupt setup to route HW interrupt to virtio driver, create notify
  relay thread to translate virtio driver's kick to a MMIO write onto HW,
  HW queues configuration.

- ifcvf_dev_close:
  Revoke all the setup in ifcvf_dev_config.

Live migration feature is supported by IFCVF and this driver enables
it. For the dirty page logging, VF helps to log for packet buffer write,
driver helps to make the used ring as dirty when device stops.

Because vDPA driver needs to set up MSI-X vector to interrupt the
guest, only vfio-pci is supported currently.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
MAINTAINERS
config/common_base
config/common_linuxapp
drivers/net/Makefile
drivers/net/ifc/Makefile [new file with mode: 0644]
drivers/net/ifc/base/ifcvf.c [new file with mode: 0644]
drivers/net/ifc/base/ifcvf.h [new file with mode: 0644]
drivers/net/ifc/base/ifcvf_osdep.h [new file with mode: 0644]
drivers/net/ifc/ifcvf_vdpa.c [new file with mode: 0644]
drivers/net/ifc/rte_ifcvf_version.map [new file with mode: 0644]
mk/rte.app.mk