[dpdk-dev] [PATCH v6 13/25] lib/librte_vhost: remove index parameter

2014-10-09 Thread Huawei Xie
Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost-net-cdev.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/librte_vhost/vhost-net-cdev.c b/lib/librte_vhost/vhost-net-cdev.c index 8cf806a..957f0c8 100644 --- a/lib/librte_vhost/vhost-net-cdev.c +++ b

[dpdk-dev] [PATCH v6 14/25] lib/librte_vhost: call get_virtio_net_callbacks to get internal ops in register_cuse_device

2014-10-09 Thread Huawei Xie
vhost_net_device_ops is internal implementation in vhost lib. register_cuse_device will be vhost driver register API. There is no need for it to know the internal vhost ops. Instead, that ops is retrieved in register_cuse_device through get_virtio_net_callbacks. Signed-off-by: Huawei Xie

[dpdk-dev] [PATCH v6 15/25] lib/librte_vhost: rte_vhost_driver_register and rte_vhost_session_start API

2014-10-09 Thread Huawei Xie
rename register_cuse_device as rte_vhost_driver_register API. rename start_session_loop as rte_vhost_driver_session_start API. Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 5 + lib/librte_vhost/vhost-net-cdev.c | 4 ++-- lib/librte_vhost/vhost-net-cdev.h | 2 -- 3 files

[dpdk-dev] [PATCH v6 02/25] lib/librte_vhost: rename main.c to vhost_rxtx.c and virtio-net.h to rte_virtio_net.h

2014-10-09 Thread Huawei Xie
vhost_rxtx.c will provide vhost vring enqueue/dequeue API. rte_virtio_net.h is used as the API header file. Signed-off-by: Huawei Xie --- lib/librte_vhost/main.c | 3727 - lib/librte_vhost/rte_virtio_net.h | 161 ++ lib/librte_vhost/vhost_rxtx.c

[dpdk-dev] [PATCH v6 18/25] lib/librte_vhost: add debug print

2014-10-09 Thread Huawei Xie
define PRINT_PACKET and LOG_DEBUG macro Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost-net-cdev.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/lib/librte_vhost/vhost-net-cdev.h b/lib/librte_vhost/vhost-net-cdev.h index fa67caf..6885bbf 100644 --- a

[dpdk-dev] [PATCH v6 19/25] lib/librte_vhost: VHOST SUPPORTED FEATURES

2014-10-09 Thread Huawei Xie
VHOST_SUPPORTED_FEATURES is the feature mask that vhost lib supports. VHOST_FEATURES is the feature mask vhost currently supports after some features are turned on/off. Signed-off-by: Huawei Xie --- lib/librte_vhost/virtio-net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[dpdk-dev] [PATCH v6 16/25] lib/librte_vhost: rename init_virtio_net to rte_vhost_callback_register

2014-10-09 Thread Huawei Xie
rename init_virtio_net as rte_vhost_callback_register API. rte_vhost_callback_register register the callbacks called when a vhost device is created and ready to be added to data processing core or is de-actived by guest. Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 4

[dpdk-dev] [PATCH v6 20/25] lib/librte_vhost: header file cleanups

2014-10-09 Thread Huawei Xie
header file cleanups Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 9 + lib/librte_vhost/vhost-net-cdev.c | 2 +- lib/librte_vhost/vhost-net-cdev.h | 11 ++- lib/librte_vhost/vhost_rxtx.c | 26 ++ lib/librte_vhost/virtio-net.c

[dpdk-dev] [PATCH v6 21/25] lib/librte_vhost: static variable fixes

2014-10-09 Thread Huawei Xie
add "static" for some variable definitions Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost-net-cdev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_vhost/vhost-net-cdev.c b/lib/librte_vhost/vhost-net-cdev.c index 4dbd295..ce9f4ae 100644

[dpdk-dev] [PATCH v6 25/25] lib/librte_vhost: add vhost support in Makefile

2014-10-09 Thread Huawei Xie
vhost lib is turned off by default. vhost lib is based on cuse, which requires fuse development package to be installed. Signed-off-by: Huawei Xie --- config/common_linuxapp| 8 lib/Makefile | 1 + lib/librte_vhost/Makefile | 48

[dpdk-dev] [PATCH v6 17/25] lib/librte_vhost: vhost APIs

2014-10-09 Thread Huawei Xie
. rte_vhost_enqueue_burst copies host packets to guest. rte_vhost_dequeue_burst gets to-be-sent packets from guest. Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 70 +++ lib/librte_vhost/virtio-net.c | 31 + 2 files changed, 101 insertions

[dpdk-dev] [PATCH v6 24/25] lib/librte_vhost: add TODO/FIXME for identified issues.

2014-10-09 Thread Huawei Xie
buffers Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost-net-cdev.c | 1 + lib/librte_vhost/vhost_rxtx.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/librte_vhost/vhost-net-cdev.c b/lib/librte_vhost/vhost-net-cdev.c index e5875eb..91ff0d8 100644 --- a/lib/librte_vhost/vhost-net

[dpdk-dev] [PATCH v6 22/25] lib/librte_vhost: add priv context field to virtio_net structure

2014-10-09 Thread Huawei Xie
priv field could be used to store application specific context. Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h index 13d75fe..adf35e4 100644 --- a/lib

[dpdk-dev] [PATCH v6 23/25] lib/librte_vhost: coding style fixes

2014-10-09 Thread Huawei Xie
fixed serious coding style issues reported by checkpatch Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 85 +++-- lib/librte_vhost/vhost-net-cdev.c | 252 +++--- lib/librte_vhost/vhost-net-cdev.h | 33 +++-- lib/librte_vhost

[dpdk-dev] [PATCH v6 01/25] lib/librte_vhost: move src files from examples/vhost to lib/librte_vhost

2014-10-09 Thread Huawei Xie
Those files will be refactored in subsequent patches to form user space vhost library. Makefile and main.h are removed. Signed-off-by: Huawei Xie --- examples/vhost/Makefile | 60 - examples/vhost/eventfd_link/Makefile | 39 - examples/vhost/eventfd_link

[dpdk-dev] [PATCH 00/14] new vhost example

2014-10-20 Thread Huawei Xie
New vhost example is a transform of old vhost example. It calls vhost library API to receive/transmit packets from guest VM. zero copy logic is kept in vhost example. Huawei Xie (14): copy old vhost example files main.c/main.h as the base of new vhost example remove virtio_dev_(merge_)rx

[dpdk-dev] [PATCH 01/14] copy old vhost example

2014-10-20 Thread Huawei Xie
This patch copies two files main.c/main.h from most recent vhost example as the base for new vhost example. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 3727 + examples/vhost/main.h | 86 ++ 2 files changed, 3813 insertions(+) create

[dpdk-dev] [PATCH 02/14] remove virtio_dev_rx, virtio_dev_merge_rx, copy_from_mbuf_to_ring, virtio_dev_tx, virtio_dev_merge_tx

2014-10-20 Thread Huawei Xie
Those functions are integrated into the user space vhost library. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 806 -- 1 file changed, 806 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index c23d453..11d5d17

[dpdk-dev] [PATCH 03/14] add bak two hpa region functions

2014-10-20 Thread Huawei Xie
check_hpa_regions, fill_hpa_memory_regions and hpa memory region data structure are added back. zero copy logic will be implemented in vhost example. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 147 ++ examples/vhost/main.h | 15

[dpdk-dev] [PATCH 04/14] dev->vdev

2014-10-20 Thread Huawei Xie
define vhost_dev data structure. change reference to virtio_dev to vhost_dev. vhost example use vdev data structure for switching related logic and container for virtio_dev. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 269 -- examples

[dpdk-dev] [PATCH 05/14] hpa region

2014-10-20 Thread Huawei Xie
add hpa(host physical address) region generation/destroy logic. gpa<->hpa memory translation regions are generated at new_device, when a virtio device is ready for packet processing. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 44 +++-

[dpdk-dev] [PATCH 06/14] enqueue_burst, dequeue_burst, mac learning

2014-10-20 Thread Huawei Xie
guest VM, then virtio device will be bound to a queue in VMDQ for the first transmitted packet. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 53 +-- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/examples/vhost/main.c b

[dpdk-dev] [PATCH 07/14] patch virtio_tx_route

2014-10-20 Thread Huawei Xie
in new vhost example, the packet passed to virtio_tx_route has been allocated mbuf, so there is no need to allocate mbuf for it. use vlan offload to transmit vlan tagged packet. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 65 --- 1 file

[dpdk-dev] [PATCH 08/14] remove gpa_to_vva, base_index

2014-10-20 Thread Huawei Xie
remove gpa_to_vva macro and base_index parameter. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 42 +- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index bbfdef6..aaac88b 100644 --- a

[dpdk-dev] [PATCH 09/14] other APIs

2014-10-20 Thread Huawei Xie
rte_vhost_enable_guest_notification: disable guest notification Signed-off-by: Huawei Xie --- examples/vhost/main.c | 29 ++--- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index aaac88b..e0bd452 100644

[dpdk-dev] [PATCH 10/14] vmdq_rx_q

2014-10-20 Thread Huawei Xie
vmdq_rx_q minior change Signed-off-by: Huawei Xie --- examples/vhost/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index e0bd452..15cb493 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1722,13

[dpdk-dev] [PATCH 11/14] minor fixes

2014-10-20 Thread Huawei Xie
minimal adjustment Signed-off-by: Huawei Xie --- examples/vhost/main.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 15cb493..b2b92e9 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -49,10

[dpdk-dev] [PATCH 12/14] add branch hint

2014-10-20 Thread Huawei Xie
add branch hint Signed-off-by: Huawei Xie --- examples/vhost/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index b2b92e9..fb22df4 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1012,7 +1012,7

[dpdk-dev] [PATCH 13/14] INC_VEC

2014-10-20 Thread Huawei Xie
mergeable feature doesn't work with latest mbuf change. find that we could disable IXGBE_INC_VECTOR as a workaround. root cause is WIP. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/examples/vhost/main.c b/examples/vhost/m

[dpdk-dev] [PATCH 14/14] Makefile

2014-10-20 Thread Huawei Xie
new vhost example is ready. Add example makefile Signed-off-by: Huawei Xie --- examples/vhost/Makefile | 60 + 1 file changed, 60 insertions(+) create mode 100644 examples/vhost/Makefile diff --git a/examples/vhost/Makefile b/examples/vhost

[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 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 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 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 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 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 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 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 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 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 2/7] virtio: add software rx ring, fake_buf into virtqueue

2015-10-20 Thread Huawei Xie
Changes in v3: - Remove unnecessary NULL test for rte_free - Remove unnecessary assign of local var vq after free 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

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

2015-10-20 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 v3 6/7] virtio: simple tx routine

2015-10-20 Thread Huawei Xie
the stats var together so that we could use one vec instruction to update all of them. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.h | 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 93 + 2 files changed, 96 insertions(+) diff --git a

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

2015-10-20 Thread Huawei Xie
x dat +-+-+-+--+--+--+--+ || || ++ Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/net/v

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

2015-10-20 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 v3 7/7] virtio: pick simple rx/tx func

2015-10-20 Thread Huawei Xie
simple rx/tx func is enabled when user specifies single segment and 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 v4 0/7] virtio ring layout optimization and simple rx/tx processing

2015-10-22 Thread Huawei Xie
r 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: rx/tx ring layout optimization virtio: fill RX avail ring with blank mbufs virtio: vir

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

2015-10-22 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 v4 3/7] virtio: rx/tx ring layout optimization

2015-10-22 Thread Huawei Xie
| 1 | ... | 127 || 0 | 1 | ... | 127 | desc ring for tx dat +-+-+-+--+--+--+--+ || || ++ Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c

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

2015-10-22 Thread Huawei Xie
Changes in v3: - Remove unnecessary NULL test for rte_free - Remove unnecessary assign of local var vq after free 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

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

2015-10-22 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 v4 5/7] virtio: virtio vec rx

2015-10-22 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 v4 6/7] virtio: simple tx routine

2015-10-22 Thread Huawei Xie
slots rather than free descriptors. TODO: rearrange vq data structure, pack the stats var together so that we could use one vec instruction to update all of them. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.h | 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 93

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

2015-10-22 Thread Huawei Xie
Changes in v4: Check merge-able feature when select simple rx/tx functions. simple rx/tx func is chose when merge-able rx is disabled and user specifies single segment and no offload support. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 15 +++ 1 file changed

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

2015-10-25 Thread Huawei Xie
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: rx/tx r

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

2015-10-25 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 v5 2/7] virtio: add software rx ring, fake_buf into virtqueue

2015-10-25 Thread Huawei Xie
Changes in v3: - Remove unnecessary NULL test for rte_free - Remove unnecessary assign of local var vq after free 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

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

2015-10-25 Thread Huawei Xie
| 1 | ... | 127 || 0 | 1 | ... | 127 | desc ring for tx dat +-+-+-+--+--+--+--+ || || ++ Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c

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

2015-10-25 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 v5 5/7] virtio: virtio vec rx

2015-10-25 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 v5 6/7] virtio: simple tx routine

2015-10-25 Thread Huawei Xie
clean used ring. shift operation of idx could be saved if vq_free_cnt means free slots rather than free descriptors. TODO: rearrange vq data structure, pack the stats var together so that we could use one vec instruction to update all of them. Signed-off-by: Huawei Xie --- drivers/net/virtio

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

2015-10-25 Thread Huawei Xie
Changes in v4: Check merge-able feature when select simple rx/tx functions. simple rx/tx func is chose when merge-able rx is disabled and user specifies single segment and no offload support. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 15 +++ 1 file changed

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

2015-10-29 Thread Huawei Xie
Changes in v3: - Remove unnecessary NULL test for rte_free - Remove unnecessary assign of local var vq after free 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

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

2015-10-29 Thread Huawei Xie
clean used ring. shift operation of idx could be saved if vq_free_cnt means free slots rather than free descriptors. TODO: rearrange vq data structure, pack the stats var together so that we could use one vec instruction to update all of them. Signed-off-by: Huawei Xie --- drivers/net/virtio

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

2015-10-29 Thread Huawei Xie
Changes in v4: Check merge-able feature when select simple rx/tx functions. simple rx/tx func is chose when merge-able rx is disabled and user specifies single segment and no offload support. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 15 +++ 1 file changed

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

2015-10-29 Thread Huawei Xie
x dat +-+-+-+--+--+--+--+ || || ++ Performance 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 (8)

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

2015-10-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 v6 4/8] virtio: fill RX avail ring with blank mbufs

2015-10-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| 6 ++- drivers/net/virtio/virtio_rxtx.h| 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 84

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

2015-10-29 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 v6 3/8] virtio: rx/tx ring layout optimization

2015-10-29 Thread Huawei Xie
| 1 | ... | 127 || 0 | 1 | ... | 127 | desc ring for tx dat +-+-+-+--+--+--+--+ || || ++ Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c

[dpdk-dev] [PATCH v6 8/8] doc: update release notes 2.2 about virtio performance optimization

2015-10-29 Thread Huawei Xie
Update release notes about virtio ring layout optimization, vector rx and simple tx support Signed-off-by: Huawei Xie --- doc/guides/rel_notes/release_2_2.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst

[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] 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] [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 v3] virtio: split virtio rx/tx queue

2016-06-02 Thread Huawei Xie
We keep a common vq structure, containing only vq related fields, and then split others into RX, TX and control queue respectively. Signed-off-by: Huawei Xie --- v2: - don't split virtio_dev_rx/tx_queue_setup v3: - fix some 80 char warnings - fix other newer version checkpatch warnings - r

[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 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 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 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 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
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 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 v5 0/6] fix the issue that DPDK takes over virtio device blindly

2016-03-08 Thread Huawei Xie
's position change LOG level from ERR to INFO Huawei Xie (6): eal: make the comment more accurate eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't managing the device. eal: use new RTE_ARCH_X86 macro for x86 arch eal: simple code rework eal: map IO port only when kernel driv

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

2016-03-08 Thread Huawei Xie
positive return of devinit of pci driver means the driver doesn't support this device. Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- lib/librte_eal/common/eal_common_pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librt

[dpdk-dev] [PATCH v5 2/6] eal: RTE_KDRV_NONE means kernel driver isn't managing the device

2016-03-08 Thread Huawei Xie
Use RTE_KDRV_NONE to indicate that kernel driver (other than VFIO/UIO) isn't managing the device. Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[dpdk-dev] [PATCH v5 3/6] eal: use new RTE_ARCH_X86 for x86 arch

2016-03-08 Thread Huawei Xie
Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index b44fa32

[dpdk-dev] [PATCH v5 4/6] eal: simple code rework

2016-03-08 Thread Huawei Xie
Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index dc0aa37..4ede4cb

[dpdk-dev] [PATCH v5 5/6] eal: map IO port when kernel driver isn't managing the device

2016-03-08 Thread Huawei Xie
call rte_eal_pci_ioport_map (on x86) only if the pci device is not bound to a kernel driver. Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal

[dpdk-dev] [PATCH v5 6/6] virtio: return 1 to tell the upper layer we don't take over this device

2016-03-08 Thread Huawei Xie
. For all other IO port mapping errors, return -1. Note than if VFIO/UIO fails, now we don't fall back to port IO. Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource") Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- drivers/net/virtio/

[dpdk-dev] [PATCH v2] virtio: fix rx ring descriptor starvation

2016-03-23 Thread Huawei Xie
Acked-by: Huawei Xie

[dpdk-dev] [PATCH] virtio: split virtio rx/tx queue

2016-05-04 Thread Huawei Xie
have too many common vq operations. Split fields into virtnet_rx and virtnet_tx respectively. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 333 +--- drivers/net/virtio/virtio_pci.c | 4 +- drivers/net/virtio/virtio_pci.h | 3

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

<    1   2   3   4   >