From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jianfeng Tan Subject: [PATCH 0/3] virtio_user as an alternative exception path Date: Fri, 2 Dec 2016 14:31:12 +0000 Message-ID: <1480689075-66977-1-git-send-email-jianfeng.tan@intel.com> Cc: yuanhan.liu@linux.intel.com, ferruh.yigit@intel.com, cunming.liang@intel.com, Jianfeng Tan To: dev@dpdk.org Return-path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id B2DDBFA37 for ; Fri, 2 Dec 2016 15:30:41 +0100 (CET) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In v16.07, we upstreamed a virtual device, virtio_user (with vhost-user as the backend). The path to go with a vhost-kernel backend has been dropped for bad performance comparing to vhost-user and code simplicity. But after a second thought, virtio_user + vhost-kernel is a good candidate as an exceptional path, such as KNI, which exchanges packets with kernel networking stack. - maintenance: vhost-net (kernel) is upstreamed and extensively used kernel module. We don't need any out-of-tree module like KNI. - performance: as with KNI, this solution would use one or more kthreads to send/receive packets from user space DPDK applications, which has little impact on user space polling thread (except that it might enter into kernel space to wake up those kthreads if necessary. - features: vhost-net is born to be a networking solution, which has lots of networking related featuers, like multi queue, tso, multi-seg mbuf, etc. Known issues for current version: - Multiqueue not supported yet. - Offloading is completely enabled yet; to enhance, we will translate the virtio header info into mbuf metadata when receiving packets from kernel; and translate mbuf metadata info into virtio header when sending packets to kernel. Signed-off-by: Jianfeng Tan Jianfeng Tan (3): net/virtio_user: add vhost layer net/virtio_user: add vhost kernel support net/virtio_user: fix wrongly set features drivers/net/virtio/Makefile | 2 + drivers/net/virtio/virtio_user/vhost.c | 181 ++++++++++ drivers/net/virtio/virtio_user/vhost.h | 73 ++-- drivers/net/virtio/virtio_user/vhost_kernel.c | 413 +++++++++++++++++++++++ drivers/net/virtio/virtio_user/vhost_user.c | 81 +++-- drivers/net/virtio/virtio_user/virtio_user_dev.c | 49 ++- drivers/net/virtio/virtio_user/virtio_user_dev.h | 3 +- drivers/net/virtio/virtio_user_ethdev.c | 4 +- 8 files changed, 708 insertions(+), 98 deletions(-) create mode 100644 drivers/net/virtio/virtio_user/vhost.c create mode 100644 drivers/net/virtio/virtio_user/vhost_kernel.c -- 2.7.4