net/virtio-user: abstract backend operations
authorJianfeng Tan <jianfeng.tan@intel.com>
Fri, 13 Jan 2017 12:18:37 +0000 (12:18 +0000)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 17 Jan 2017 08:23:27 +0000 (09:23 +0100)
commit33d24d65fe2ba6cca0c0153747d6ba84ca365a42
tree26ed044a5b13d46dbfe5aee0f804a540c2c863e6
parent5526b0cbd50c757830b902e513281b835c98a2c1
net/virtio-user: abstract backend operations

Add a struct virtio_user_backend_ops to abstract three kinds of backend
operations:
  - setup, create the unix socket connection;
  - send_request, sync messages with backend;
  - enable_qp, enable some queue pair.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
drivers/net/virtio/virtio_user/vhost.h
drivers/net/virtio/virtio_user/vhost_user.c
drivers/net/virtio/virtio_user/virtio_user_dev.c
drivers/net/virtio/virtio_user/virtio_user_dev.h