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

2015-02-12 Thread Huawei Xie
that "FD_ISSET would crash when receive -1 as fd on Ubuntu 14.04". Huawei Xie (11): enable VIRTIO_NET_F_CTRL_RX create vhost_cuse directory and move vhost-net-cdev.c into vhost_cuse rename vhost-net-cdev.h to vhost-net.h move fd copying(from qemu process into vhost process) to eventfd_co

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

2015-02-12 Thread Huawei Xie
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/vhost_cuse/vhost-net

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

2015-02-12 Thread Huawei Xie
vhost-user doesn't need eventfd kernel module to copy fds between processes. Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile| 2 +- lib/librte_vhost/vhost_cuse/eventfd_copy.c | 88 lib/librte_vhost/vhost_cuse/eventfd_copy.h | 39

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

2015-02-12 Thread Huawei Xie
remove set_memory_table ops vhost-cuse or vhost-user will both implement their own set_memory_region handler. In current vhost-cuse implementation, guest numa memory isn't supported. Assume that guest memory is backed by only one file. Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile

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

2015-02-12 Thread Huawei Xie
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 --- lib/librte_vhost/Makefile | 8 +- lib/librte_vhost/rte_virtio_net.h | 2 + lib

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

2015-02-12 Thread Huawei Xie
rte_vhost_driver_unregister. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/fd_man.c | 63 +--- lib/librte_vhost/vhost_user/fd_man.h | 5 ++- lib/librte_vhost/vhost_user/vhost-net-user.c | 34 +-- 3 files changed, 82 insertions(+), 20

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

2015-02-12 Thread Huawei Xie
for more generic event driven processing, refer to: http://libevent.org/ Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/fd_man.c | 207 +++ lib/librte_vhost/vhost_user/fd_man.h | 64 +++ 2 files changed, 271 insertions(+) create mode

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

2015-02-12 Thread Huawei Xie
for both vhost-cuse and vhost-user. Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile| 4 +- lib/librte_vhost/vhost-net-cdev.c| 389 --- lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 389 +++ 3 files changed

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

2015-02-12 Thread Huawei Xie
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 --- lib/librte_vhost/rte_virtio_net.h | 3 +- lib/librte_vhost/vhost-net.h | 3 ++ lib/librte_vhost/vhost_cuse/vhost

[dpdk-dev] [PATCH v2 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-12 Thread Huawei Xie
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 changed, 2 inse

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

2015-02-12 Thread Huawei Xie
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_vhost/vhost_cuse

[dpdk-dev] [PATCH v2] MAINTAINERS: claim responsibility for virtio PMD and vhost library

2015-07-13 Thread Huawei Xie
As orignal author of virtio PMD(coauthor with Rashmin) and vhost user, claim responsibility for virtio PMD, vhost lib and vhost example. v2 changes: would claim xenvirt responsibility in another patch Signed-off-by: Huawei Xie --- MAINTAINERS | 1 + 1 file changed, 1 insertion

[dpdk-dev] [PATCH] vhost: provide vhost API to unregister vhost unix domain socket

2015-06-02 Thread Huawei Xie
rte_vhost_driver_unregister will remove the listenfd from event list, and then close it. Signed-off-by: Huawei Xie Signed-off-by: Peng Sun --- lib/librte_vhost/rte_virtio_net.h| 3 ++ lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 9 lib/librte_vhost/vhost_user/vhost-net

[dpdk-dev] [PATCH v2] vhost: provide vhost API to unregister vhost unix domain socket

2015-06-05 Thread Huawei Xie
rte_vhost_driver_unregister will remove the listenfd from event list, and then close it. Signed-off-by: Huawei Xie Signed-off-by: Peng Sun --- lib/librte_vhost/rte_virtio_net.h| 3 ++ lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 9 lib/librte_vhost/vhost_user/vhost-net

[dpdk-dev] [PATCH 0/2] vhost: numa aware allocation of virtio_net device and vhost virt queue

2015-06-05 Thread Huawei Xie
of vring descriptors, so we will try to reallocate virtio_net and vhost virt queue to the same numa node. Huawei Xie (2): use rte_malloc/free for virtio_net and virt_queue memory data allocation/free When we get the address of vring descriptor table, will try to reallocate virtio_net device

[dpdk-dev] [PATCH 1/2] vhost: malloc -> rte_malloc for virtio_net and virt queue allocation

2015-06-05 Thread Huawei Xie
use rte_malloc/free for virtio_net and virt queue allocation/free Signed-off-by: Huawei Xie --- lib/librte_vhost/virtio-net.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index 4672e67

[dpdk-dev] [PATCH 2/2] vhost: realloc virtio_net and virtqueue to the same node of vring desc table

2015-06-05 Thread Huawei Xie
When we get the address of vring descriptor table in VHOST_SET_VRING_ADDR message, will try to reallocate virtio_net device and virtqueue to the same numa node. Signed-off-by: Huawei Xie --- config/common_linuxapp| 1 + lib/librte_vhost/Makefile | 4 ++ lib/librte_vhost/virtio

[dpdk-dev] [PATCH v2] vhost: provide vhost API to unregister vhost unix domain socket

2015-06-05 Thread Huawei Xie
rte_vhost_driver_unregister will remove the listenfd from event list, and then close it. Signed-off-by: Huawei Xie Signed-off-by: Peng Sun --- lib/librte_vhost/rte_virtio_net.h| 3 ++ lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 9 lib/librte_vhost/vhost_user/vhost-net

[dpdk-dev] [PATCH v2 0/2] vhost: numa aware allocation of vhost device and queues

2015-06-19 Thread Huawei Xie
descriptor table, we will try to reallocate vhost device and queues to the same numa node. Huawei Xie (2): use rte_malloc to allocate vhost device and queues reallocate vhost device and queues when we get the address of vring descriptor table config/common_linuxapp| 1 + lib/librte_vhost

[dpdk-dev] [PATCH v2 1/2] vhost: use rte_malloc to allocate device and queues

2015-06-19 Thread Huawei Xie
use rte_malloc to allocate vhost device and queues Signed-off-by: Huawei Xie --- lib/librte_vhost/virtio-net.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index 4672e67..19b74d6 100644

[dpdk-dev] [PATCH v2 2/2] vhost: realloc vhost device and queues to the same numa node of vring desc table

2015-06-19 Thread Huawei Xie
- return old virtio device if new_ll_dev isn't allocated Signed-off-by: Huawei Xie --- config/common_linuxapp| 1 + lib/librte_vhost/Makefile | 4 ++ lib/librte_vhost/virtio-net.c | 93 +++ mk/rte.app.mk | 4 ++ 4 files

[dpdk-dev] [PATCH v3 2/2] vhost: version map file update

2015-06-19 Thread Huawei Xie
update version map file for rte_vhost_driver_unregister API v3 changes: update version map file Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_vhost_version.map | 8 1 file changed, 8 insertions(+) diff --git a/lib/librte_vhost/rte_vhost_version.map b/lib/librte_vhost

[dpdk-dev] [PATCH] use tab rather than space in mbuf version map file

2015-06-19 Thread Huawei Xie
Signed-off-by: Huawei Xie --- lib/librte_mbuf/rte_mbuf_version.map | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map index 7ae2244..543dc4c 100644 --- a/lib/librte_mbuf/rte_mbuf_version.map +++ b

[dpdk-dev] [PATCH] vhost: flush used->idx update before reading avail->flags

2015-04-23 Thread Huawei Xie
update of used->idx and read of avail->flags could be reordered. memory fence should be used to ensure the order, otherwise guest could see a stale used->idx value after it toggles the interrupt suppression flag. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_rxtx.c | 3 ++

[dpdk-dev] [PATCH v2] vhost: flush used->idx update before reading avail->flags

2015-04-29 Thread Huawei Xie
e is more buffer to process through used->idx. If it sees a stale value, it will exit the processing while host willn't send interrupt to guest. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_rxtx.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_vhost/vhost_

[dpdk-dev] [PATCH] vhost: make vhost lockless enqueue configurable

2015-04-29 Thread Huawei Xie
vhost enabled vSwitch could have their own thread-safe vring enqueue policy. Add the RTE_LIBRTE_VHOST_LOCKLESS_ENQ macro for vhost lockless enqueue. Turn it off by default. Signed-off-by: Huawei Xie --- config/common_linuxapp| 1 + lib/librte_vhost/vhost_rxtx.c | 24

[dpdk-dev] [PATCH 0/2] provide rte_pktmbuf_alloc_bulk API and call it in vhost dequeue

2015-12-14 Thread Huawei Xie
of mbufs, otherwise rte_pktmbuf_free_bulk has to call rte_pktmbuf_free to free the mbuf one by one. This patchset will not provide this symmetric implementation. Huawei Xie (2): mbuf: provide rte_pktmbuf_alloc_bulk API vhost: call rte_pktmbuf_alloc_bulk in vhost dequeue lib/librte_mbuf

[dpdk-dev] [PATCH 2/2] vhost: call rte_pktmbuf_alloc_bulk in vhost dequeue

2015-12-14 Thread Huawei Xie
pre-allocate a bulk of mbufs instead of allocating one mbuf a time on demand Signed-off-by: Gerald Rogers Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev --- lib/librte_vhost/vhost_rxtx.c | 35 ++- 1 file changed, 22 insertions(+), 13 deletions(-) diff

[dpdk-dev] [PATCH v2 0/2] provide rte_pktmbuf_alloc_bulk API and call it in vhost dequeue

2015-12-14 Thread Huawei Xie
to the same mbuf memory pool, it could directly call rte_mempool_put to free the bulk of mbufs, otherwise rte_pktmbuf_free_bulk has to call rte_pktmbuf_free to free the mbuf one by one. This patchset will not provide this symmetric implementation. Huawei Xie (2): mbuf: provide rte_pktmbuf_alloc_bulk

[dpdk-dev] [PATCH v2 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-14 Thread Huawei Xie
v2 changes: unroll the loop a bit to help the performance rte_pktmbuf_alloc_bulk allocates a bulk of packet mbufs. There is related thread about this bulk API. http://dpdk.org/dev/patchwork/patch/4718/ Thanks to Konstantin's loop unrolling. Signed-off-by: Gerald Rogers Signed-off-by: Huawei

[dpdk-dev] [PATCH v2 2/2] vhost: call rte_pktmbuf_alloc_bulk in vhost dequeue

2015-12-14 Thread Huawei Xie
pre-allocate a bulk of mbufs instead of allocating one mbuf a time on demand Signed-off-by: Gerald Rogers Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev --- lib/librte_vhost/vhost_rxtx.c | 35 ++- 1 file changed, 22 insertions(+), 13 deletions(-) diff

[dpdk-dev] [PATCH v3 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-23 Thread Huawei Xie
implementation, we use while() loop rather than do{} while() loop because we could not assume count is strictly positive. Using while() loop saves one line of check if count is zero. Signed-off-by: Gerald Rogers Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev --- lib/librte_mbuf/rte_mbuf.h | 49

[dpdk-dev] [PATCH v3 2/2] vhost: call rte_pktmbuf_alloc_bulk in vhost dequeue

2015-12-23 Thread Huawei Xie
pre-allocate a bulk of mbufs instead of allocating one mbuf a time on demand Signed-off-by: Gerald Rogers Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev --- lib/librte_vhost/vhost_rxtx.c | 35 ++- 1 file changed, 22 insertions(+), 13 deletions(-) diff

[dpdk-dev] [PATCH v4 0/2] provide rte_pktmbuf_alloc_bulk API and call it in vhost dequeue

2015-12-23 Thread Huawei Xie
rte_pktmbuf_free_bulk has to call rte_pktmbuf_free to free the mbuf one by one. This patchset will not provide this symmetric implementation. Huawei Xie (2): mbuf: provide rte_pktmbuf_alloc_bulk API vhost: call rte_pktmbuf_alloc_bulk in vhost dequeue lib/librte_mbuf/rte_mbuf.h| 49

[dpdk-dev] [PATCH v4 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-23 Thread Huawei Xie
implementation, we use while() loop rather than do{} while() loop because we could not assume count is strictly positive. Using while() loop saves one line of check if count is zero. Signed-off-by: Gerald Rogers Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev --- lib/librte_mbuf/rte_mbuf.h | 49

[dpdk-dev] [PATCH v4 2/2] vhost: call rte_pktmbuf_alloc_bulk in vhost dequeue

2015-12-23 Thread Huawei Xie
v4 changes: fix a silly typo in error handling when rte_pktmbuf_alloc fails reported by haifeng pre-allocate a bulk of mbufs instead of allocating one mbuf a time on demand Signed-off-by: Gerald Rogers Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev Acked-by: Yuanhan Liu Tested

[dpdk-dev] [PATCH 0/4] check if any kernel driver is manipulating the virtio device

2015-12-25 Thread Huawei Xie
is still manipulating the device, which causes driver conflict. This patch checks if there is any kernel driver manipulating the virtio device before virtio PMD uses port IO to configure the device. Huawei Xie (4): eal: make the comment more accurate eal: set kdrv to RTE_KDRV_NONE if kernel

[dpdk-dev] [PATCH 1/4] eal: make the comment more accurate

2015-12-25 Thread Huawei Xie
Signed-off-by: Huawei Xie --- lib/librte_eal/common/eal_common_pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index dcfe947..bbcdb2b 100644 --- a/lib/librte_eal/common

[dpdk-dev] [PATCH 2/4] eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't manipulating the device.

2015-12-25 Thread Huawei Xie
Use RTE_KDRV_NONE to indicate that kernel driver isn't manipulating the device. Signed-off-by: Huawei Xie --- lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c

[dpdk-dev] [PATCH 4/4] virtio: check if any kernel driver is manipulating the device

2015-12-25 Thread Huawei Xie
driver. This patch checks if there is any kernel driver manipulating the virtio device before virtio PMD uses IO port to configure the device. Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource") Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 7 +++ 1 fi

[dpdk-dev] [PATCH v5 0/2] provide rte_pktmbuf_alloc_bulk API and call it in vhost dequeue

2015-12-28 Thread Huawei Xie
, it could directly call rte_mempool_put to free the bulk of mbufs, otherwise rte_pktmbuf_free_bulk has to call rte_pktmbuf_free to free the mbuf one by one. This patchset will not provide this symmetric implementation. Huawei Xie (2): mbuf: provide rte_pktmbuf_alloc_bulk API vhost: call

[dpdk-dev] [PATCH v5 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-28 Thread Huawei Xie
Rogers Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev --- lib/librte_mbuf/rte_mbuf.h | 55 ++ 1 file changed, 55 insertions(+) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index f234ac9..b2ed479 100644 --- a/lib

[dpdk-dev] [PATCH v5 2/2] vhost: call rte_pktmbuf_alloc_bulk in vhost dequeue

2015-12-28 Thread Huawei Xie
v4 changes: fix a silly typo in error handling when rte_pktmbuf_alloc fails reported by haifeng pre-allocate a bulk of mbufs instead of allocating one mbuf a time on demand Signed-off-by: Gerald Rogers Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev Acked-by: Yuanhan Liu Tested

[dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG

2015-12-28 Thread Huawei Xie
Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 12 +--- drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++--- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net

[dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG

2015-12-28 Thread Huawei Xie
Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 12 +--- drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++--- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net

[dpdk-dev] [PATCH v3 0/2] vhost: numa aware allocation of vhost device and queues

2015-06-25 Thread Huawei Xie
descriptor table, we will try to reallocate vhost device and queues to the same numa node. Huawei Xie (2): use rte_malloc to allocate vhost device and queues reallocate vhost device and queues when we get the address of vring descriptor table config/common_linuxapp| 1 + lib/librte_vhost

[dpdk-dev] [PATCH v3 1/2] vhost: use rte_malloc to allocate device and queues

2015-06-25 Thread Huawei Xie
use rte_malloc to allocate vhost device and queues Signed-off-by: Huawei Xie --- lib/librte_vhost/virtio-net.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index 4672e67..19b74d6 100644

[dpdk-dev] [PATCH v3 2/2] vhost: realloc vhost device and queues to the same numa node of vring desc table

2015-06-25 Thread Huawei Xie
endif in rte.app.mk - fix new_ll_dev and new_vq allocation failure issue - return old virtio device if new_ll_dev isn't allocated Signed-off-by: Huawei Xie --- config/common_linuxapp| 1 + lib/librte_vhost/Makefile | 4 ++ lib/librte_vhost/virtio-net.c | 88

[dpdk-dev] [PATCH] vhost: turn on vhost by default

2015-06-30 Thread Huawei Xie
Previous vhost-cuse implementation requires fuse development package. Now that we have vhost-user implementation, which is enabled by default and doesn't require additional library to build, we could turn on vhost. Signed-off-by: Huawei Xie --- config/common_linuxapp | 2 +- 1 file changed, 1

[dpdk-dev] [PATCH v4 0/4] vhost: vhost unix domain socket cleanup

2015-06-30 Thread Huawei Xie
: update version map file v4 changes: -add comment for potential unwanted callback on listenfds -call fdset_del_slot to remove connection fd Huawei Xie (4): fdset_del_slot vhost socket cleanup version map file update add comment for potential unwanted call on listenfds lib/librte_vhost

[dpdk-dev] [PATCH v4 1/4] vhost: call fdset_del_slot to remove connection fd

2015-06-30 Thread Huawei Xie
would wrongly clean up the new listenfd. A new function fdset_del_slot is provided to cleanup the fd at the specified location. v4 changes: - call fdset_del_slot to remove connection fd Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/fd_man.c | 27 ++- 1 file

[dpdk-dev] [PATCH v4 2/4] vhost: vhost unix domain socket cleanup

2015-06-30 Thread Huawei Xie
rte_vhost_driver_unregister API will remove the listenfd from event list, and then close it. v2 changes: -minor code style fix, remove unnecessary new line Signed-off-by: Huawei Xie Signed-off-by: Peng Sun --- lib/librte_vhost/rte_virtio_net.h| 3 ++ lib/librte_vhost/vhost_cuse

[dpdk-dev] [PATCH v4 3/4] vhost: version map file update

2015-06-30 Thread Huawei Xie
update version map file for rte_vhost_driver_unregister API v3 changes: update version map file Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_vhost_version.map | 8 1 file changed, 8 insertions(+) diff --git a/lib/librte_vhost/rte_vhost_version.map b/lib/librte_vhost

[dpdk-dev] [PATCH v4 4/4] vhost: add comment for potential unwanted callback on listenfds

2015-06-30 Thread Huawei Xie
add comment for potential unwanted callback on listenfds v4 changes: add comment for potential unwanted callback on listenfds Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/fd_man.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/lib/librte_vhost/vhost_user/fd_man.c b

[dpdk-dev] [PATCH] lib/librte_vhost: remove vhost device from data plane when receive VHOST_SET_MEM_TABLE message

2015-03-03 Thread Huawei Xie
This patch fixes the segfault issue in the case vhost receives new VHOST_SET_MEM_TABLE message without VHOST_VRING_GET_VRING_BASE(which we uses as the stop message). Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/virtio-net-user.c | 4 1 file changed, 4 insertions(+) diff

[dpdk-dev] [PATCH] lib/librte_vhost: combine select with sleep

2015-03-06 Thread Huawei Xie
combine sleep into select when there is no file descriptors to be monitored. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/fd_man.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/librte_vhost/vhost_user/fd_man.c b/lib/librte_vhost/vhost_user

[dpdk-dev] [PATCH] lib/librte_vhost: use loop instead of goto

2015-03-06 Thread Huawei Xie
This patch reorder the code a bit to use loop instead of goto. Besides, remove abudant check 'fd != -1'. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/fd_man.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/lib/librte_vhost

[dpdk-dev] [PATCH] lib/librte_vhost: exchange kickfd and callfd to avoid confusion

2015-03-06 Thread Huawei Xie
Previous vhost implementation wrongly name kickfd as callfd and callfd as kickfd. It is functional correct, but causes confusion. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 6 +++--- lib/librte_vhost/rte_virtio_net.h | 4 ++-- lib/librte_vhost

[dpdk-dev] [PATCH] test whether file descriptor is valid before close it

2015-03-06 Thread Huawei Xie
This avoids closing -1 in our case. Signed-off-by: Huawei Xie --- lib/librte_vhost/virtio-net.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index 6917fcf..4672e67 100644 --- a/lib/librte_vhost/virtio

[dpdk-dev] [PATCH] claim responsibility for KVM virtio PMD, vhost backend, and XEN virtio solution.

2015-03-10 Thread Huawei Xie
/intel_dpdk_xen_based_packet_switch_sol.rst +Linux Xen VIRTIO +M: Huawei Xie +F: lib/librte_pmd_xenvirt/ +F: examples/vhost_xen/ +F: doc/guides/prog_guide/intel_dpdk_xen_based_packet_switch_sol.rst + FreeBSD EAL (with overlaps) M: Bruce Richardson F: lib/librte_eal/bsdapp/Makefile @@ -226,6 +232,7 @@ F: lib/librte_pmd_mlx4/ F

[dpdk-dev] [PATCH] claim responsibility for KVM virtio PMD, vhost backend, and XEN virtio solution.

2015-03-10 Thread Huawei Xie
/intel_dpdk_xen_based_packet_switch_sol.rst +Linux Xen VIRTIO +M: Huawei Xie +F: lib/librte_pmd_xenvirt/ +F: examples/vhost_xen/ +F: doc/guides/prog_guide/intel_dpdk_xen_based_packet_switch_sol.rst + FreeBSD EAL (with overlaps) M: Bruce Richardson F: lib/librte_eal/bsdapp/Makefile @@ -226,6 +232,7 @@ F: lib/librte_pmd_mlx4/ F

[dpdk-dev] [PATCH] vhost example doc update

2015-03-12 Thread Huawei Xie
add vhost user documentation fix some minor issues Signed-off-by: Huawei Xie --- doc/guides/sample_app_ug/vhost.rst | 123 - 1 file changed, 94 insertions(+), 29 deletions(-) diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug

[dpdk-dev] [PATCH] vhost library doc update

2015-03-12 Thread Huawei Xie
add vhost user documentation Signed-off-by: Huawei Xie --- doc/guides/prog_guide/vhost_lib.rst | 52 ++--- 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst index 0b6eda7

[dpdk-dev] [PATCH] lib/librte_vhost: add CONFIG_RTE_LIBRTE_VHOST_USER switch

2015-03-13 Thread Huawei Xie
Turn on CONFIG_RTE_LIBRTE_VHOST to enable vhost. vhost-user is turned on by default. Turn off CONFIG_RTE_LIBRTE_VHOST_USER to enable vhost-cuse implementation. Signed-off-by: Huawei Xie --- config/common_linuxapp| 4 +++- lib/librte_vhost/Makefile | 11 +-- 2 files changed, 12

[dpdk-dev] [PATCH] lib/librte_vhost: fix build errors

2015-03-19 Thread Huawei Xie
fix the error "missing initializer" and "cast to pointer from integer of different size". For the pointer to integer cast issue, need to investigate changing the typeof mapped_address. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/vhost-net-user.c | 2

[dpdk-dev] [PATCH v3] lib/librte_vhost: user space vhost driver library

2014-08-06 Thread Huawei Xie
This user space vhost library is provided aiming to facilitate integration with DPDK accelerated vswitch. Huawei Xie (1): vhost library support to facilitate integration with DPDK accelerated vswitch. config/common_linuxapp |7 + lib/Makefile

[dpdk-dev] [PATCH 3/3] examples/vhost: add new vhost example

2014-08-06 Thread Huawei Xie
Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev --- examples/vhost/Makefile | 52 + examples/vhost/libvirt/qemu-wrap.py | 366 + examples/vhost/main.c | 3047 +++ examples/vhost/main.h | 109 ++ 4 files

[dpdk-dev] [PATCH v4 0/2] lib/librte_pmd_i40e: set vlan filter fix

2014-12-02 Thread Huawei Xie
This patchset fixes "set vlan filter" issue. v2 changes: * add two macros I40E_VFTA_IDX and I40E_VFTA_BIT for VFTA array operation. v3 changes: * code style fix * rebase on latest commit v4 changes: * add more descriptive commit message Huawei Xie (2): vlan id set fix add I40

[dpdk-dev] [PATCH v4 1/2] lib/librte_pmd_i40e: set vlan id filter fix

2014-12-02 Thread Huawei Xie
">> 5" rather than ">> 4" vlan id is a 12 bit value. VFTA is 128 x 32 bit array (128 double word array) which could store 2^12 vlan bits. Each bit represents whether corresponding vlan tag is set in the VSI. Use high 7 bits as the index for the double word a

[dpdk-dev] [PATCH v4 2/2] lib/librte_pmd_i40e: add I40E_VFTA_IDX and I40E_VFTA__BIT macros for VFTA related operation

2014-12-02 Thread Huawei Xie
Add two macros I40E_VFTA_IDX and I40E_VFTA_BIT for vlan filter search and set. Add vlan_id check in vlan filter search and set function. Signed-off-by: Huawei Xie --- lib/librte_pmd_i40e/i40e_ethdev.c | 17 ++--- lib/librte_pmd_i40e/i40e_ethdev.h | 9 + 2 files changed, 19

[dpdk-dev] [PATCH] examples/vhost: increase MAX_QUEUE number

2014-12-10 Thread Huawei Xie
the implementation and are certain all NICs support this well, add a remind message to user. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 0c76ece..d2c1852 100644 --- a/examples

[dpdk-dev] [PATCH RFC v2 00/12] lib/librte_vhost: vhost-user support

2014-12-11 Thread Huawei Xie
This patchset refines vhost library to support both vhost-cuse and vhost-user. Huawei Xie (12): create vhost_cuse directory and move vhost-net-cdev.c to vhost_cuse directory rename vhost-net-cdev.h as vhost-net.h move eventfd_copy logic out from virtio-net.c to vhost-net-cdev.c exact

[dpdk-dev] [PATCH RFC v2 02/12] lib/librte_vhost: rename vhost-net-cdev.h as vhost-net.h

2014-12-11 Thread Huawei Xie
vhost-net.h is the shared header file for both vhost-cuse and vhost-user Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost-net-cdev.h| 113 --- lib/librte_vhost/vhost-net.h | 113 +++ lib/librte_vhost/vhost_cuse

[dpdk-dev] [PATCH RFC v2 05/12] lib/librte_vhost: host_memory_map refine

2014-12-11 Thread Huawei Xie
host_memory_map only maps partial memory of target process into current process through shared backed file. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 43 +-- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/lib

[dpdk-dev] [PATCH RFC v2 04/12] lib/librte_vhost: copy of host_memory_map from virtio-net.c to new file virtio-net-cdev.c

2014-12-11 Thread Huawei Xie
create virtio-net-cdev.c and copy host_memory_map into it. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 258 ++ 1 file changed, 258 insertions(+) create mode 100644 lib/librte_vhost/vhost_cuse/virtio-net-cdev.c diff --git a/lib

[dpdk-dev] [PATCH RFC v2 09/12] lib/librte_vhost: minor fix

2014-12-11 Thread Huawei Xie
Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/vhost-net-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user/vhost-net-user.c b/lib/librte_vhost/vhost_user/vhost-net-user.c index 841d7e6..6b9ebd7 100644 --- a/lib/librte_vhost

[dpdk-dev] [PATCH RFC v2 07/12] lib/librte_vhost: async event and callback

2014-12-11 Thread Huawei Xie
Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/fd_man.c | 205 +++ lib/librte_vhost/vhost_user/fd_man.h | 64 +++ 2 files changed, 269 insertions(+) create mode 100644 lib/librte_vhost/vhost_user/fd_man.c create mode 100644 lib/librte_vhost

[dpdk-dev] [PATCH RFC v2 10/12] lib/librte_vhost: vhost-user memory region map

2014-12-11 Thread Huawei Xie
deals with vhost user memory map/unmap alignment Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 2 + lib/librte_vhost/vhost-net.h | 2 - lib/librte_vhost/vhost_user/vhost-net-user.h | 3 +- lib/librte_vhost/vhost_user/virtio-net-user.c

[dpdk-dev] [PATCH RFC v2 01/12] lib/librte_vhost: mov vhost-cuse implementation to vhost_cuse directory

2014-12-11 Thread Huawei Xie
create vhost_cuse directory and move vhost-net-cdev.c to vhost_cuse directory Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile| 4 +- lib/librte_vhost/vhost-net-cdev.c| 389 --- lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 389

[dpdk-dev] [PATCH RFC v2 06/12] lib/librte_vhost: cuse_set_memory_table

2014-12-11 Thread Huawei Xie
cuse_set_memory_table Signed-off-by: Huawei Xie --- 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 | 85 +++ lib

[dpdk-dev] [PATCH RFC v2 08/12] lib/librte_vhost: vhost-user support

2014-12-11 Thread Huawei Xie
vhost-user support Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile | 5 +- lib/librte_vhost/vhost-net.h | 4 + lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 9 + lib/librte_vhost/vhost_user/vhost-net-user.c | 422

[dpdk-dev] [PATCH RFC v2 12/12] lib/librte_vhost: cleanup when vhost user socket connection is closed

2014-12-11 Thread Huawei Xie
close the memory region file descriptor close the kick/callfd vSwitch needs to run endlessly. resource leak is deadly issue. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/vhost-net-user.c | 7 ++-- lib/librte_vhost/vhost_user/virtio-net-user.c | 59

[dpdk-dev] [PATCH 1/2] lib/librte_vhost: vhost library support to facilitate integration with vswitch.

2014-07-18 Thread Huawei Xie
Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev Acked-by: Thomos Long --- config/common_linuxapp |6 + lib/Makefile |1 + lib/librte_vhost/Makefile| 48 ++ lib/librte_vhost/eventfd_link/Makefile

[dpdk-dev] [PATCH 0/2] user space vhost library

2014-07-18 Thread Huawei Xie
This user space vhost library is based off user space vhost example and aims to provide same API for different vhost implementations. This implementation includes user space vhost cuse driver, kernel module for eventfd proxy and vhost enqueue/dequeue functionalities. hxie5 (2): vhost library

[dpdk-dev] [PATCH 2/2] lib/Makefile: Turn off vhost_lib by default as it needs fuse, fuse-devel to compile

2014-07-18 Thread Huawei Xie
Signed-off-by: Huawei Xie --- config/common_linuxapp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/common_linuxapp b/config/common_linuxapp index 002ed84..5b58278 100644 --- a/config/common_linuxapp +++ b/config/common_linuxapp @@ -391,8 +391,9

[dpdk-dev] [PATCH v2] user space vhost driver library

2014-07-18 Thread Huawei Xie
This user space vhost library is based off user space vhost example and aims to provide same API for different vhost implementations. This implementation includes user space vhost cuse driver, kernel module for eventfd proxy and vhost enqueue/dequeue functionalities. Huawei Xie (1): vhost

[dpdk-dev] [PATCH v2] lib/librte_vhost: vhost library support to facilitate integration with vswitch.

2014-07-18 Thread Huawei Xie
Signed-off-by: Huawei Xie --- config/common_linuxapp |7 + lib/Makefile |1 + lib/librte_vhost/Makefile| 48 ++ lib/librte_vhost/eventfd_link/Makefile | 39 + lib/librte_vhost/eventfd_link/eventfd_link.c

[dpdk-dev] [PATCH 0/3] Transform the vhost example to two parts: vhost library and example.

2014-09-02 Thread Huawei Xie
This transform is to facilitate integration with DPDK accelerated ethernet switch. Huawei Xie (3): remove vhost example vhost library support to facilitate integration with DPDK accelerated vswitch This vhost example is based on vhost library. Besides, - This patch

[dpdk-dev] [PATCH 1/3] examples/vhost: remove vhost example

2014-09-02 Thread Huawei Xie
Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev Acked-by: Thomos Long --- examples/vhost/Makefile| 60 - examples/vhost/eventfd_link/Makefile | 39 - examples/vhost/eventfd_link/eventfd_link.c | 205 -- examples/vhost/eventfd_link/eventfd_link.h | 79

[dpdk-dev] [PATCH 2/3] lib/librte_vhost: vhost library support to facilitate integration with DPDK accelerated vswitch

2014-09-02 Thread Huawei Xie
This library is turned off by default so that it doesn't break build on default system. Install fuse development library and turn it on. Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev Acked-by: Thomos Long --- config/common_linuxapp |7 + lib/Makefile

[dpdk-dev] [PATCH 3/3] examples/vhost: vhost example based on vhost library.

2014-09-02 Thread Huawei Xie
Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev --- examples/vhost/Makefile | 52 + examples/vhost/libvirt/qemu-wrap.py | 366 examples/vhost/main.c | 3145 +++ examples/vhost/main.h | 109 ++ 4 files

[dpdk-dev] [PATCH v4 0/5] lib/librte_vhost: user space vhost cuse driver library

2014-09-12 Thread Huawei Xie
) Turn off vhost lib by default v3) Fixed checkpatch issues v4) Split the patch per Thomas's requirement Huawei Xie (5): mv vhost example to vhost lib directory copy the vhost rx/tx functions from main.c to new file vhost_rxtx.c remove main.c main.h remove Makefile rename virtio-net.h

[dpdk-dev] [PATCH v4 3/5] lib/librte_vhost: vhost lib refactor

2014-09-12 Thread Huawei Xie
is applied. Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev Acked-by: Tommy Long --- lib/librte_vhost/Makefile | 48 lib/librte_vhost/rte_virtio_net.h | 179 --- lib/librte_vhost/vhost-net-cdev.c | 35 +++--- lib/librte_vhost/vhost-net-cdev.h | 45

[dpdk-dev] [PATCH v4 4/5] coding style issue fix

2014-09-12 Thread Huawei Xie
This vhost lib is based on old vhost example, and there are still plenty of coding style issues left. Will fix those issues once this patch is applied. Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev Acked-by: Tommy Long --- lib/librte_vhost/rte_virtio_net.h | 52 lib

[dpdk-dev] [PATCH v4 5/5] lib/librte_vhost: add vhost lib support in makefile

2014-09-12 Thread Huawei Xie
The build of vhost lib requires fuse development package. It is turned off by default so as not to break DPDK build. Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev Acked-by: Tommy Long --- config/common_linuxapp | 7 +++ lib/Makefile | 1 + mk/rte.app.mk | 5

[dpdk-dev] [PATCH v4 2/5] lib/librte_vhost: re-factor vhost lib for subsequent transform

2014-09-12 Thread Huawei Xie
is removed. virtio-net.h is renamed to rte_virtio_net.h as API header file. Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev Acked-by: Tommy Long --- lib/librte_vhost/Makefile | 60 - lib/librte_vhost/main.c | 3722 - lib/librte_vhost

[dpdk-dev] [PATCH v4 1/5] lib/librte_vhost: mv vhost example to vhost lib directory for further code re-factoring

2014-09-12 Thread Huawei Xie
This commit creates vhost library directory, and copies vhost example into it. Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev Acked-by: Tommy Long --- examples/vhost/Makefile | 60 - examples/vhost/eventfd_link/Makefile | 39 - examples/vhost

[dpdk-dev] [PATCH 0/2] examples/vhost: vhost example based on vhost lib API

2014-09-18 Thread Huawei Xie
Old vhost example consists of vhost cuse driver, virtio device management, and VMDQ based packet switching logic. vhost cuse driver and virtio device management are moved into vhost lib. This patch modifies vhost example to use vhost lib API. Huawei Xie (2): copy main.c main.h from old vhost

[dpdk-dev] [PATCH 2/2] examples/vhost: vhost example modification to use vhost lib API

2014-09-18 Thread Huawei Xie
packets to or receive packets from guest virtio device. virtio_dev_rx/tx is removed. 5) zero copy feature is implemented in the example. 6) mergable rx/tx will be implemented in vhost lib. Signed-off-by: Huawei Xie --- examples/vhost/Makefile | 52 ++ examples/vhost/main.c | 1455

[dpdk-dev] [PATCH 1/2] examples/vhost: copy old vhost example files

2014-09-18 Thread Huawei Xie
main.c and main.h are refactored to become vhost lib in vhost lib patch, thus are removed. Here they are copied back from old vhost example without any modification. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 3722 + examples/vhost

  1   2   3   >