[dpdk-dev] [PATCH v3 11/11] lib/librte_vhost: support dynamically registering vhost server

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" * support calling rte_vhost_driver_register after rte_vhost_driver_session_start * add mutext to protect fdset from concurrent access * add busy flag in fdentry. this flag is set before cb and cleared after cb is finished. mutex lock scenario in vhost: * event_dispatch(in r

[dpdk-dev] [PATCH v3 10/11] lib/librte_vhost: support dev->ifname for vhost-user

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" for vhost-cuse, ifname is the name of the tap device for vhost-user, ifname is the name of the unix domain socket path Signed-off-by: Huawei Xie Signed-off-by: Przemyslaw Czesnowicz --- lib/librte_vhost/Makefile | 2 +- lib/li

[dpdk-dev] [PATCH v3 09/11] lib/librte_vhost: vhost user support

2015-02-23 Thread Przemyslaw Czesnowicz
could call rte_vhost_driver_register with different socket path. Virtio devices from same VM will connect to VM specific socket. The socket path information is stored in the virtio_net structure. Signed-off-by: Huawei Xie Signed-off-by: Przemyslaw Czesnowicz --- lib/librte_vhost/Makefile |

[dpdk-dev] [PATCH v3 08/11] lib/librte_vhost: add select based event driven processing

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" for more generic event driven processing, refer to: http://libevent.org/ Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev --- lib/librte_vhost/vhost_user/fd_man.c | 207 +++ lib/librte_vhost/vhost_user/fd_man.h | 64 ++

[dpdk-dev] [PATCH v3 07/11] lib/librte_vhost: implement cuse_set_memory_table

2015-02-23 Thread Przemyslaw Czesnowicz
wei Xie Signed-off-by: Przemyslaw Czesnowicz --- lib/librte_vhost/Makefile | 2 +- lib/librte_vhost/vhost-net.h | 4 +- lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 7 +- lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 115 + lib/librte_vhost/vh

[dpdk-dev] [PATCH v3 06/11] lib/librte_vhost: make host_memory_map a more generic function.

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" This functions accepts a virtual address and pid(qemu), and maps it into current process(vhost)'s address space. The memory behind the virtual address should be backed by a file, and virtual address should be the starting address. Signed-off-by: Huawei Xie --- lib/librte_v

[dpdk-dev] [PATCH v3 05/11] lib/librte_vhost: copy host_memory_map from virtio-net.c to a new file virtio-net-cdev.c

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 257 ++ 1 file changed, 257 insertions(+) create mode 100644 lib/librte_vhost/vhost_cuse/virtio-net-cdev.c diff --git a/lib/librte_vhost/vhost_cuse/virtio-net-cdev.c b/li

[dpdk-dev] [PATCH v3 04/11] lib/librte_vhost: move fd copying(from qemu process into vhost process) to eventfd_copy.c

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" vhost-user doesn't need eventfd kernel module to copy fds between processes. Signed-off-by: Huawei Xie Signed-off-by: Przemyslaw Czesnowicz --- lib/librte_vhost/Makefile| 2 +- lib/librte_vhost/vhost_cuse/eventf

[dpdk-dev] [PATCH v3 03/11] lib/librte_vhost: rename vhost-net-cdev.h to vhost-net.h

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" This file defines common operations provided by virtio-net(.c). Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost-net-cdev.h| 113 --- lib/librte_vhost/vhost-net.h | 113 +++ lib/librte_vhost/vho

[dpdk-dev] [PATCH v3 02/11] lib/librte_vhost: create vhost_cuse directory and move vhost-net-cdev.c into vhost_cuse

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" vhost-cuse driver will be divided into two parts: cuse driver specific message handling(in cuse directory) and common message handling(in virtio-net.c). vhost ioctl message is pre-processed in cuse and then sent to virtio-net if is not terminated. virtio-net.c provides commo

[dpdk-dev] [PATCH v3 01/11] lib/librte_vhost: enable VIRTIO_NET_F_CTRL_RX VIRTIO_NET_F_CTRL_RX is dependant on VIRTIO_NET_F_CTRL_VQ. Observed that virtio-net driver in guest would crash with only CTRL

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" In virtnet_send_command: /* Caller should know better */ BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ) || (out + in > VIRTNET_SEND_COMMAND_SG_MAX)); Signed-off-by: Huawei Xie --- lib/librte_vhost/virtio-net.c | 3 ++- 1 file cha

[dpdk-dev] [PATCH v3 00/11] qemu vhost-user support

2015-02-23 Thread Przemyslaw Czesnowicz
v3 changes: * move things around to make all patches compile Xie, Huawei (11): lib/librte_vhost: enable VIRTIO_NET_F_CTRL_RX VIRTIO_NET_F_CTRL_RX is dependant on VIRTIO_NET_F_CTRL_VQ. Observed that virtio-net driver in guest would crash with only CTRL_RX enabled. lib/librte_vhost: c