net/virtio-user: add new virtual PCI driver
authorJianfeng Tan <jianfeng.tan@intel.com>
Wed, 15 Jun 2016 09:03:24 +0000 (09:03 +0000)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 22 Jun 2016 07:47:12 +0000 (09:47 +0200)
commite9efa4d9382159b6bf857ca95dd9ee36e7c6027b
tree16cacc05ad946c3a9477b37ffb979e754dc9abdc
parent37a7eb2ae8168e409ef7e53f3889e92096c692c0
net/virtio-user: add new virtual PCI driver

This patch implements another new instance of struct virtio_pci_ops to
drive the virtio-user virtual device. Instead of rd/wr ioport or PCI
configuration space, this virtual pci driver will rd/wr the virtual
device struct virtio_user_hw, and when necessary, invokes APIs provided
by device emulation later to start/stop the device.

  ----------------------
  | ------------------ |
  | | virtio driver  | |----> (virtio_user_ethdev.c)
  | ------------------ |
  |         |          |
  | ------------------ | ------>  virtio-user PMD
  | | device emulate | |
  | |                | |
  | | vhost adapter  | |
  | ------------------ |
  ----------------------
            |
            |
            |
   ------------------
   | vhost backend  |
   ------------------

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
drivers/net/virtio/Makefile
drivers/net/virtio/virtio_pci.h
drivers/net/virtio/virtio_user_ethdev.c [new file with mode: 0644]