net/virtio-user: support kernel vhost
authorJianfeng Tan <jianfeng.tan@intel.com>
Fri, 13 Jan 2017 12:18:38 +0000 (12:18 +0000)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 17 Jan 2017 08:24:56 +0000 (09:24 +0100)
commite3b434818bbbda2334ec1c7373ab0c530f0718dd
treebdad74ba64c514a095abb2554ba27a76bdce97d6
parent33d24d65fe2ba6cca0c0153747d6ba84ca365a42
net/virtio-user: support kernel vhost

This patch add support vhost kernel as the backend for virtio_user.
Three main hook functions are added:
  - vhost_kernel_setup() to open char device, each vq pair needs one
    vhostfd;
  - vhost_kernel_ioctl() to communicate control messages with vhost
    kernel module;
  - vhost_kernel_enable_queue_pair() to open tap device and set it
    as the backend of corresonding vhost fd (that is to say, vq pair).

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
doc/guides/rel_notes/release_17_02.rst
drivers/net/virtio/Makefile
drivers/net/virtio/virtio_user/vhost.h
drivers/net/virtio/virtio_user/vhost_kernel.c [new file with mode: 0644]
drivers/net/virtio/virtio_user/vhost_kernel_tap.c [new file with mode: 0644]
drivers/net/virtio/virtio_user/vhost_kernel_tap.h [new file with mode: 0644]
drivers/net/virtio/virtio_user/virtio_user_dev.c
drivers/net/virtio/virtio_user/virtio_user_dev.h