net/virtio-user: add vhost-user adapter layer
authorJianfeng Tan <jianfeng.tan@intel.com>
Wed, 15 Jun 2016 09:03:22 +0000 (09:03 +0000)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 22 Jun 2016 07:47:12 +0000 (09:47 +0200)
commit6a84c37e39750ddd25dde4d1c57f2b93f39dc3c3
treefd6df5d6e0ad89fdab37eb92f18eef34a552162e
parentf24f8f9fee8ad9439af92d94bba25aa0bb65bea3
net/virtio-user: add vhost-user adapter layer

This patch provides vhost adapter layer implementation. Two main
help functions are provided to upper layer (device emulation):
  - vhost_user_setup(), to set up vhost user backend;
  - vhost_user_sock(), to talk with vhost user backend.

  ----------------------
  | ------------------ |
  | | virtio driver  | |
  | ------------------ |
  |         |          |
  | ------------------ | ------>  virtio-user PMD
  | | device emulate | |
  | |                | |
  | | vhost adapter  |-|----> (vhost_user.c)
  | ------------------ |
  ----------------------
            |
            | -------------- --> (vhost-user protocol)
            |
   ------------------
   | 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>
config/common_linuxapp
drivers/net/virtio/Makefile
drivers/net/virtio/virtio_user/vhost.h [new file with mode: 0644]
drivers/net/virtio/virtio_user/vhost_user.c [new file with mode: 0644]