net/virtio-user: add device emulation layer
Few device emulation layer functions are added for virtio driver to
call:
- virtio_user_start_device()
- virtio_user_stop_device()
- virtio_user_dev_init()
- virtio_user_dev_uninit()
These functions will get called by virtio driver, and they call vhost
adapter layer functions to implement the functionality.
All stats related to virtual user device as logged in virtio_user_dev
structure.
----------------------
| ------------------ |
| | virtio driver | |
| ------------------ |
| | |
| ------------------ | ------> virtio-user PMD
| | device emulate |-|----> (virtio_user_dev.c, virtio_user_dev.h)
| | | |
| | 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>