[dpdk-dev] [PATCH v3 1/7] virtio: add virtio_rxtx.h header file

2015-10-20 Thread Huawei Xie
Would move all rx/tx related declarations into this header file in future. Add RTE_VIRTIO_PMD_MAX_BURST. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 1 + drivers/net/virtio/virtio_rxtx.c | 1 + drivers/net/virtio/virtio_rxtx.h | 34

[dpdk-dev] [PATCH v3 0/7] virtio ring layout optimization and simple rx/tx processing

2015-10-20 Thread Huawei Xie
mance boost could be observed only if the virtio backend isn't the bottleneck or in VM2VM case. There are also several vhost optimization patches to be submitted later. Huawei Xie (7): virtio: add virtio_rxtx.h header file virtio: add software rx ring, fake_buf into virtqueue virtio:

[dpdk-dev] [PATCH v2 7/7] virtio: pick simple rx/tx func

2015-10-18 Thread Huawei Xie
simple rx/tx func is enabled when user specifies single segment, no offload support. merge-able should be disabled to use simple rxtx. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/net/virtio

[dpdk-dev] [PATCH v2 6/7] virtio: simple tx routine

2015-10-18 Thread Huawei Xie
bulk free of mbufs when clean used ring. shift operation of idx could be further saved if vq_free_cnt means free slots rather than free descriptors. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.h | 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 95

[dpdk-dev] [PATCH v2 5/7] virtio: virtio vec rx

2015-10-18 Thread Huawei Xie
With fixed avail ring, we don't need to get desc idx from avail ring. virtio driver only has to deal with desc ring. This patch uses vector instruction to accelerate processing desc ring. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.h | 2 + drivers/net/v

[dpdk-dev] [PATCH v2 4/7] virtio: fill RX avail ring with blank mbufs

2015-10-18 Thread Huawei Xie
fill avail ring with blank mbufs in virtio_dev_vring_start Signed-off-by: Huawei Xie --- drivers/net/virtio/Makefile | 2 +- drivers/net/virtio/virtio_rxtx.c| 6 ++- drivers/net/virtio/virtio_rxtx.h| 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 84

[dpdk-dev] [PATCH v2 3/7] virtio: rx/tx ring layout optimization

2015-10-18 Thread Huawei Xie
+-+-+-+--+--+--+--+ || || ++ Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 5c00e9d..7c82a6a 100644

[dpdk-dev] [PATCH v2 2/7] virtio: add software rx ring, fake_buf into virtqueue

2015-10-18 Thread Huawei Xie
Add software RX ring in virtqueue. Add fake_mbuf in virtqueue for wraparound processing. Use global simple_rxtx to indicate whether simple rxtx is enabled Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 12 drivers/net/virtio/virtio_rxtx.c | 7 +++ drivers

[dpdk-dev] [PATCH v2 1/7] virtio: add virtio_rxtx.h header file

2015-10-18 Thread Huawei Xie
Would move all rx/tx related code into this header file in future. Add RTE_VIRTIO_PMD_MAX_BURST. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 1 + drivers/net/virtio/virtio_rxtx.c | 1 + drivers/net/virtio/virtio_rxtx.h | 34 ++ 3

[dpdk-dev] [PATCH v2 0/7] virtio ring layout optimization and simple rx/tx processing

2015-10-18 Thread Huawei Xie
nable simple R/TX processing when user specifies simple txq flags - Reword some comments and commit messages Huawei Xie (7): virtio: add virtio_rxtx.h header file virtio: add software rx ring, fake_buf into virtqueue virtio: rx/tx ring layout optimization virtio: fill RX avail ring with

[dpdk-dev] [PATCH v2 0/7] virtio ring layout optimization and simple rx/tx processing

2015-10-18 Thread Huawei Xie
nable simple R/TX processing when user specifies simple txq flags - Reword some comments and commit messages Huawei Xie (7): virtio: add virtio_rxtx.h header file virtio: add software rx ring, fake_buf into virtqueue virtio: rx/tx ring layout optimization virtio: fill RX avail ring with

[dpdk-dev] [PATCH 8/8] virtio: rxtx_func_get

2015-09-29 Thread Huawei Xie
Select simplified rx/tx when mergable isn't enabled and there is no offload flags specified. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/driver

[dpdk-dev] [PATCH 7/8] virtio: simple tx routine

2015-09-29 Thread Huawei Xie
bulk free of mbufs when clean used ring. shift operation of idx could be further saved if vq_free_cnt means free slots rather than free descriptors. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.h | 3 ++ drivers/net/virtio/virtio_rxtx.c| 9 drivers/net

[dpdk-dev] [PATCH 6/8] virtio: virtio vec rx

2015-09-29 Thread Huawei Xie
With fixed avail ring, we don't need to get desc idx from avail ring. virtio driver only has to deal with desc ring. This patch uses vector instruction to accelerate processing desc ring. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.h | 2 + drivers/net/v

[dpdk-dev] [PATCH 5/8] virtio: fill RX avail ring with blank mbufs

2015-09-29 Thread Huawei Xie
fill avail ring with blank mbufs in virtio_dev_vring_start Signed-off-by: Huawei Xie --- drivers/net/virtio/Makefile | 2 +- drivers/net/virtio/virtio_rxtx.c| 14 +- drivers/net/virtio/virtio_rxtx.h| 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 84

[dpdk-dev] [PATCH 4/8] virtio: rx/tx ring layout optimization

2015-09-29 Thread Huawei Xie
+-+-+-+--+--+--+--+ || || ++ Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index dcc4524..b4d268d 100644

[dpdk-dev] [PATCH 3/8] virtio: add software rx ring, fake_buf, simple_rxtx into virtqueue

2015-09-29 Thread Huawei Xie
Add software RX ring in virtqueue. Add fake_mbuf in virtqueue for wraparound processing. Use simple_rxtx to indicate whether simple rxtx is enabled Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 12 drivers/net/virtio/virtio_rxtx.c | 5 + drivers/net

[dpdk-dev] [PATCH 2/8] virtio: add virtio_rxtx.h header file

2015-09-29 Thread Huawei Xie
Would move all rx/tx related code into this header file in future. Add RTE_VIRTIO_PMD_MAX_BURST. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 1 + drivers/net/virtio/virtio_rxtx.c | 1 + drivers/net/virtio/virtio_rxtx.h | 34 ++ 3

[dpdk-dev] [PATCH 1/8] virtio: add configure for simple virtio rx/tx

2015-09-29 Thread Huawei Xie
Turned off by default. This is development feature. Will remove this macro when this optimization gets widely accepted. Signed-off-by: Huawei Xie --- config/common_linuxapp | 1 + 1 file changed, 1 insertion(+) diff --git a/config/common_linuxapp b/config/common_linuxapp index 0de43d5..b70c5d7

[dpdk-dev] [PATCH 0/8] virtio: virtio ring layout optimization and RX vector processing

2015-09-29 Thread Huawei Xie
+-+-+-+--+--+--+--+ || || ++ Performance boost could be observed if the virtio backend isn't the bottleneck or in VM2VM case. There are also several vhost optimization patches to be submitted later. Huawei X

[dpdk-dev] [RFC PATCH v2] virtio ring layout optimization and vectorization.

2015-09-25 Thread Huawei Xie
a". v2 changes: adapt to new rte_mbuf format fixes pkt_mb[6] and [7] pkt_len issue Signed-off-by: Huawei Xie --- config/common_linuxapp | 1 + drivers/net/virtio/Makefile | 2 +- drivers/net/virtio/virtio_ethdev.c | 19 ++ drivers/net/virtio/virtio

[dpdk-dev] [PATCH] vhost: vhost injects interrupts to guest for each packet

2015-09-21 Thread Huawei Xie
In merge-able RX path, vhost injects interrupts to guest for each packet. This should degrade performance a lot. This patch fixes this issue by injecting one interrupt for a batch of packets. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_rxtx.c | 7 +-- 1 file changed, 5 insertions

[dpdk-dev] [PATCH] virtio: fix used ring address calculation

2015-09-21 Thread Huawei Xie
used event idx is put at the end of available ring. It isn't taken into account when we calculate the address of used ring. Fortunately, it doesn't introduce the bug with fixed queue number 256 and 4KB alignment. Signed-off-by: hxie5 --- drivers/net/virtio/virtio_ring.h | 2 +- 1 file changed, 1

[dpdk-dev] [RFC PATCH] virtio: virtio ring layout optimization and vectorization rx

2015-09-18 Thread Huawei Xie
This single patch is for people to get familiar with the optimization and is for collecting feedbacks. It isn't splitted because it is straightforward. Haven't finished the cleanups. The description and illustration of the idea is in a previous mail titled "virtio optimization idea". --- config

[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 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 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 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 1/4] vhost: call fdset_del_slot to remove connection fd

2015-06-30 Thread Huawei Xie
which 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

[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] vhost: turn on vhost by default

2015-06-29 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 chang

[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

[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 0/2] vhost: numa aware allocation of vhost device and queues

2015-06-25 Thread Huawei Xie
vring 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_

[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 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 v3 1/2] vhost: vhost unix domain socket cleanup

2015-06-19 Thread Huawei Xie
rte_vhost_driver_unregister API will remove the listenfd for the specified path from event processing 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

[dpdk-dev] [PATCH v3 0/2] vhost: vhost unix domain socket cleanup

2015-06-19 Thread Huawei Xie
vhost user could register multiple unix domain socket server, and use the path to identify the virtio device connecting to it. rte_vhost_driver_unregister will clean up the unix domain socket for the specified path. Huawei Xie (2): vhost socket cleanup update version map file for

[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

[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 0/2] vhost: numa aware allocation of vhost device and queues

2015-06-19 Thread Huawei Xie
vring 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_

[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 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 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 0/2] vhost: numa aware allocation of virtio_net device and vhost virt queue

2015-06-05 Thread Huawei Xie
node 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 d

[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] 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 RFC 2/2] vhost: realloc virtio_net and virtqueue to the same node of vring desc table

2015-05-28 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 RFC 1/2] vhost: malloc -> rte_malloc for virtio_net and virt queue allocation

2015-05-28 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 RFC 0/2] vhost: numa aware allocation of virtio_net device and vhost virt queue

2015-05-28 Thread Huawei Xie
node 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 d

[dpdk-dev] [PATCH] vhost: enable live migration

2015-05-27 Thread Huawei Xie
When we migrate VM, without this feature, qemu will report error: "migrate: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature". Signed-off-by: Krishna Murthy --- lib/librte_vhost/virtio-net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/virtio-net

[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 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/v

[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] 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] lib/librte_vhost: add CONFIG_RTE_LIBRTE_VHOST_USER switch

2015-03-12 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] 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] 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] claim responsibility for KVM virtio PMD, vhost backend, and XEN virtio solution.

2015-03-09 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-09 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] 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] 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] 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/li

[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: 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 v2 11/11] lib/librte_vhost: support dynamically registering vhost server

2015-02-12 Thread Huawei Xie
efore 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(+

[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 09/11] lib/librte_vhost: vhost user support

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

[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

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

2015-02-12 Thread Huawei Xie
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/lib/librte_vhost

[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

[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 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 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 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 event

[dpdk-dev] [PATCH] examples/vhost: fix segfault when link_vmdq fails

2015-01-30 Thread Huawei Xie
Signed-off-by: Huawei Xie --- examples/vhost/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 04f0118..3a35359 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1308,8 +1308,8 @@ switch_worker

[dpdk-dev] [PATCH 12/12] lib/librte_vhost: support calling rte_vhost_driver_register after rte_vhost_driver_session_start

2015-01-30 Thread Huawei Xie
add mutext to protect fdset Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/fd_man.c | 39 +++- lib/librte_vhost/vhost_user/fd_man.h | 2 ++ lib/librte_vhost/vhost_user/vhost-net-user.c | 19 +- 3 files changed, 48 insertions(+), 12

[dpdk-dev] [PATCH 11/12] lib/librte_vhost: set dev->ifname in vhost-user

2015-01-30 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 * provide a common set_ifname ops in virtio-net.c * redefine the size of dev->ifname to fit both vhost-cuse and vhost-user Signed-off-by: Huawei Xie --- lib/librte_vh

[dpdk-dev] [PATCH 10/12] lib/librte_vhost: vhost user support

2015-01-30 Thread Huawei Xie
allowed to be called multiple times to specify different socket path for different virtio device. The socket path is then set in the virtio_net device. Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile | 8 +- lib/librte_vhost/rte_virtio_net.h | 2 + lib

[dpdk-dev] [PATCH 09/12] lib/librte_vhost: free memory when receive new set_memory_table message in vhost-cuse

2015-01-30 Thread Huawei Xie
Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 12 ++-- lib/librte_vhost/virtio-net.h | 43 +++ 2 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 lib/librte_vhost/virtio-net.h diff --git a/lib

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

2015-01-30 Thread Huawei Xie
for more generic event driven processing, refer: 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 07/12] lib/librte_vhost: split set_memory_table into two parts

2015-01-30 Thread Huawei Xie
regions to set_memory_table ops provided by virtio-net. Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile | 2 +- lib/librte_vhost/vhost-net.h | 5 +- lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 7 +- lib/librte_vhost/vhost_cuse/virtio-net

[dpdk-dev] [PATCH 06/12] lib/librte_vhost: make host_memory_map more generic

2015-01-30 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(normally a hugepage file), and virtual address should be the starting address. Signed-off-by: Huawei Xie ---

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

2015-01-30 Thread Huawei Xie
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/librte_vhost/vhost_cuse/virtio-net-cdev.c b/lib/librte_vhost

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

2015-01-30 Thread Huawei Xie
eventfd copy is vhost-cuse specific. vhost-user doesn't need eventfd kernel module to copy fds between processes. fd is automatically installed into target process through unix domain socket. Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile| 2 +- lib/librte_

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

2015-01-30 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 02/12] lib/librte_vhost: seperate vhost cuse driver from vhost common logic

2015-01-30 Thread Huawei Xie
message is pre-processed there and then sent to virtio-net(virtio-net.c) module if necessary. Some message handling is terminated in vhost-cuse or vhost-user. virtio-net.c provides common message handling for both vhost-cuse and vhost-user. Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile

[dpdk-dev] [PATCH 01/12] lib/librte_vhost: enable VIRTIO_NET_F_CTRL_RX

2015-01-30 Thread Huawei Xie
out + in > VIRTNET_SEND_COMMAND_SG_MAX)); Signed-off-by: Huawei Xie --- lib/librte_vhost/virtio-net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index b041849..52b4957 100644 --- a/lib/librte_vhost/virtio

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

2015-01-30 Thread Huawei Xie
crash when receive -1 as fd on Ubuntu 14.04". Huawei Xie (12): 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_copy.c copy host_

[dpdk-dev] [RFC PATCH v2 14/14] vhost user ifr_name support

2015-01-26 Thread Huawei Xie
Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile | 2 +- lib/librte_vhost/rte_virtio_net.h | 3 +- lib/librte_vhost/vhost-net.h | 3 + lib/librte_vhost/vhost_cuse/eventfd_copy.c| 89 +++ lib/librte_vhost

[dpdk-dev] [RFC PATCH v2 13/14] multiple socket support

2015-01-26 Thread Huawei Xie
Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/vhost-net-user.c | 57 +++- lib/librte_vhost/vhost_user/vhost-net-user.h | 1 - 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/lib/librte_vhost/vhost_user/vhost-net-user.c b/lib/librte_vhost

[dpdk-dev] [RFC PATCH v2 12/14] cleanup when vhost user connection is closed

2015-01-26 Thread Huawei Xie
Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/vhost-net-user.c | 4 ++ lib/librte_vhost/vhost_user/virtio-net-user.c | 56 +++ lib/librte_vhost/vhost_user/virtio-net-user.h | 1 + 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/lib

[dpdk-dev] [RFC PATCH v2 11/14] vhost user memory region map

2015-01-26 Thread Huawei Xie
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 | 109 -- 4 files changed

[dpdk-dev] [RFC PATCH v2 10/14] vhost user support

2015-01-26 Thread Huawei Xie
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 | 12 +- lib/librte_vhost/vhost_user/fd_man.c | 4 +- lib/librte_vhost/vhost_user/vhost-net

[dpdk-dev] [RFC PATCH v2 09/14] add select based event driven fd management logic

2015-01-26 Thread Huawei Xie
for generic event driver 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] [RFC PATCH v2 08/14] split set_memory_table into two parts

2015-01-26 Thread Huawei Xie
Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile | 2 +- lib/librte_vhost/vhost-net.h | 5 +- lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 7 +- lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 85 +++ lib/librte_vhost/vhost_cuse/virtio

[dpdk-dev] [RFC PATCH v2 07/14] host_memory_map

2015-01-26 Thread Huawei Xie
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/librte_vhost/vhost_cuse/virtio-net-cdev.c b/lib/librte_vhost/vhost_cuse/virtio-net-cdev.c index fbfc403..58ac3dd

[dpdk-dev] [RFC PATCH v2 06/14] copy host_memory_map from virtio-net.c to a new file virtio-net-cdev.c

2015-01-26 Thread Huawei Xie
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/librte_vhost/vhost_cuse/virtio-net-cdev.c b/lib/librte_vhost

<    1   2   3   4   >