[dpdk-dev] [PATCH] app/testpmd: flowgen support ip and udp fields

2021-08-08 Thread Zhihong Wang
This patch aims to: 1. Add flexibility by supporting IP & UDP src/dst fields 2. Improve multi-core performance by using per-core vars Signed-off-by: Zhihong Wang --- app/test-pmd/flowgen.c | 137 +++-- 1 file changed, 86 insertions(+), 51 delet

[dpdk-dev] [PATCH v2] app/testpmd: flowgen support ip and udp fields

2021-08-08 Thread Zhihong Wang
This patch aims to: 1. Add flexibility by supporting IP & UDP src/dst fields 2. Improve multi-core performance by using per-core vars v2: fix assigning ip header cksum Signed-off-by: Zhihong Wang --- app/test-pmd/flowgen.c | 137 +++-- 1

[dpdk-dev] [PATCH v3 0/4] app/testpmd: flowgen fixes and improvements

2021-08-12 Thread Zhihong Wang
This series fixes a tx retry defect and improves multi-core performance by using per-core variable for flow indexing. v3: split changes and keep original flow generation logic v2: fix assigning ip header cksum Zhihong Wang (4): app/testpmd: fix tx retry in flowgen app/testpmd: use

[dpdk-dev] [PATCH v3 1/4] app/testpmd: fix tx retry in flowgen

2021-08-12 Thread Zhihong Wang
Fix tx_pkt number in tx retry logic. Fixes: bf56fce1fb4 ("app/testpmd: add retry option") Cc: sta...@dpdk.org Signed-off-by: Zhihong Wang --- app/test-pmd/flowgen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowg

[dpdk-dev] [PATCH v3 2/4] app/testpmd: use rte_ipv4_cksum in flowgen

2021-08-12 Thread Zhihong Wang
Use the rte_ipv4_cksum API to replace local ip_sum implementation. Signed-off-by: Zhihong Wang --- app/test-pmd/flowgen.c | 25 + 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c index f2e6255c36..96d0cc79df

[dpdk-dev] [PATCH v3 3/4] app/testpmd: record rx_burst and fwd_dropped in flowgen

2021-08-12 Thread Zhihong Wang
Call inc_rx_burst_stats for rx operation, and record fwd_dropped. Signed-off-by: Zhihong Wang --- app/test-pmd/flowgen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c index 96d0cc79df..229794ee9c 100644 --- a/app/test-pmd/flowgen.c +++ b

[dpdk-dev] [PATCH v3 4/4] app/testpmd: use per-core variable in flowgen

2021-08-12 Thread Zhihong Wang
Use per-core variable for flow indexing to solve cache contention in multi-core scenarios. Signed-off-by: Zhihong Wang --- app/test-pmd/flowgen.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c index 229794ee9c

[dpdk-dev] [PATCH v4 0/4] app/testpmd: flowgen fixes and improvements

2021-08-12 Thread Zhihong Wang
This series fixes a tx retry defect and improves multi-core performance by using per-core variable for flow indexing. v4: use loop local variable to improve performance v3: split changes and keep original flow generation logic v2: fix assigning ip header cksum Zhihong Wang (4): app/testpmd

[dpdk-dev] [PATCH v4 1/4] app/testpmd: fix tx retry in flowgen

2021-08-12 Thread Zhihong Wang
Fix tx_pkt number in tx retry logic. Fixes: bf56fce1fb4 ("app/testpmd: add retry option") Cc: sta...@dpdk.org Signed-off-by: Zhihong Wang --- app/test-pmd/flowgen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowg

[dpdk-dev] [PATCH v4 2/4] app/testpmd: use rte_ipv4_cksum in flowgen

2021-08-12 Thread Zhihong Wang
Use the rte_ipv4_cksum API to replace local ip_sum implementation. Signed-off-by: Zhihong Wang --- app/test-pmd/flowgen.c | 25 + 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c index f2e6255c36..96d0cc79df

[dpdk-dev] [PATCH v4 3/4] app/testpmd: record rx_burst and fwd_dropped in flowgen

2021-08-12 Thread Zhihong Wang
Call inc_rx_burst_stats for rx operation, and record fwd_dropped. Signed-off-by: Zhihong Wang --- app/test-pmd/flowgen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c index 96d0cc79df..229794ee9c 100644 --- a/app/test-pmd/flowgen.c +++ b

[dpdk-dev] [PATCH v4 4/4] app/testpmd: use per-core variable in flowgen

2021-08-12 Thread Zhihong Wang
Use per-core variable for flow indexing to solve cache contention in multi-core scenarios. v4: use loop local variable to improve performance Signed-off-by: Zhihong Wang --- app/test-pmd/flowgen.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/flowgen.c b

[dpdk-dev] [PATCH v5 0/4] app/testpmd: flowgen fixes and improvements

2021-08-13 Thread Zhihong Wang
ip header cksum Zhihong Wang (4): app/testpmd: fix tx retry in flowgen app/testpmd: use rte_ipv4_cksum in flowgen app/testpmd: record rx_burst and fwd_dropped in flowgen app/testpmd: use per-core variable in flowgen app/test-pmd/flowgen.c | 47

[dpdk-dev] [PATCH v5 1/4] app/testpmd: fix tx retry in flowgen

2021-08-13 Thread Zhihong Wang
Fix tx_pkt number in tx retry logic. Fixes: bf56fce1fb45 ("app/testpmd: add retry option") Cc: sta...@dpdk.org Signed-off-by: Zhihong Wang Acked-by: Xiaoyun Li --- app/test-pmd/flowgen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/flowg

[dpdk-dev] [PATCH v5 2/4] app/testpmd: use rte_ipv4_cksum in flowgen

2021-08-13 Thread Zhihong Wang
Use the rte_ipv4_cksum API to replace local ip_sum implementation. Signed-off-by: Zhihong Wang Acked-by: Xiaoyun Li --- app/test-pmd/flowgen.c | 25 + 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c index

[dpdk-dev] [PATCH v5 3/4] app/testpmd: record rx_burst and fwd_dropped in flowgen

2021-08-13 Thread Zhihong Wang
Call inc_rx_burst_stats for rx operation, and record fwd_dropped. Signed-off-by: Zhihong Wang Acked-by: Xiaoyun Li --- app/test-pmd/flowgen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c index 96d0cc79df..229794ee9c 100644 --- a/app/test

[dpdk-dev] [PATCH v5 4/4] app/testpmd: use per-core variable in flowgen

2021-08-13 Thread Zhihong Wang
Use per-core variable for flow indexing to solve cache contention in multi-core scenarios. Signed-off-by: Zhihong Wang Acked-by: Xiaoyun Li --- v5: replace modulo operation to improve performance v4: use loop local variable to improve performance app/test-pmd/flowgen.c | 9 +++-- 1 file

[PATCH] ring: fix overflow in memory size calcuation

2021-12-13 Thread Zhihong Wang
Parameters count and esize are both unsigned int, and their product can legally exceed unsigned int and lead to runtime access violation. Fixes: cc4b218790f6 ("ring: support configurable element size") Cc: sta...@dpdk.org Signed-off-by: Zhihong Wang --- lib/ring/rte_ring.c | 2

[PATCH] eal/linux: register mp hotplug callback after memory init

2023-05-30 Thread Zhihong Wang
Secondary would crash if it tries to handle mp requests before memory init, since globals such as eth_dev_shared_data_lock are not accessible to it at this moment. --- lib/eal/linux/eal.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/eal/linux/eal.c b/lib/eal

[PATCH v2] eal/linux: register mp hotplug callback after memory init

2023-06-08 Thread Zhihong Wang
Secondary would crash if it tries to handle mp requests before memory init, since globals such as eth_dev_shared_data_lock are not accessible to it at this moment. v2: add signed-off-by Signed-off-by: Zhihong Wang Acked-by: Anatoly Burakov --- lib/eal/linux/eal.c | 12 ++-- 1 file

[dpdk-dev] [PATCH] app/testpmd: configurable number of flows in flowgen

2021-08-19 Thread Zhihong Wang
Make number of flows in flowgen configurable by setting parameter --flowgen-flows=N. Signed-off-by: Zhihong Wang --- Depends-on: series-18277 ("app/testpmd: flowgen fixes and improvements") app/test-pmd/flowgen.c| 22 ++ app/test-pmd/pa

[dpdk-dev] [PATCH] vhost: optimize vhost memcpy

2016-12-02 Thread Zhihong Wang
, by using loopback traffic between Vhost and Virtio. For example, increase TXONLY_DEF_PACKET_LEN to the requested packet size in testpmd.h, rebuild and start testpmd in both host and guest, then "start" on one side and "start tx_first 32" on the other. Signed-off-by: Zh

[dpdk-dev] [PATCH v2] eal: optimize aligned rte_memcpy

2016-12-07 Thread Zhihong Wang
, then "start" on one side and "start tx_first 32" on the other. Signed-off-by: Zhihong Wang --- .../common/include/arch/x86/rte_memcpy.h | 81 +- 1 file changed, 78 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/include/arch

[dpdk-dev] [PATCH v5 0/6] vhost: optimize enqueue

2016-09-08 Thread Zhihong Wang
& IVB. 2. Rename variables to follow naming convention. 3. Rewrite enqueue and delete the obsolete in the same patch. --- Changes in v2: 1. Split the big function into several small ones. 2. Use multiple patches to explain each optimization. 3. Add comments. Zhihong Wang (6): vhost:

[dpdk-dev] [PATCH v5 1/6] vhost: fix windows vm hang

2016-09-08 Thread Zhihong Wang
. 2. Start a Windows VM image with qemu and connect to the vhost port. 3. Start io forwarding with tx_first in host testpmd. For 16.07 code, the Windows VM will hang once any packets are enqueued. Cc: Signed-off-by: Zhihong Wang --- Changes in v5: 1. Add details in commit log. lib

[dpdk-dev] [PATCH v5 2/6] vhost: rewrite enqueue

2016-09-08 Thread Zhihong Wang
This patch implements the vhost logic from scratch into a single function designed for high performance and better maintainability. This is the baseline version of the new code, more optimization will be added in the following patches in this patch set. Signed-off-by: Zhihong Wang --- Changes

[dpdk-dev] [PATCH v5 3/6] vhost: remove useless volatile

2016-09-08 Thread Zhihong Wang
This patch removes useless volatile attribute to allow compiler optimization. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index c2dfc3c..9707dfc 100644 --- a/lib

[dpdk-dev] [PATCH v5 4/6] vhost: add desc prefetch

2016-09-08 Thread Zhihong Wang
This patch adds descriptor prefetch to hide cache access latency. Signed-off-by: Zhihong Wang --- lib/librte_vhost/virtio_net.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 6f63968..b38f18f 100644 --- a/lib

[dpdk-dev] [PATCH v5 5/6] vhost: batch update used ring

2016-09-08 Thread Zhihong Wang
This patch enables batch update of the used ring for better efficiency. Signed-off-by: Zhihong Wang --- Changes in v4: 1. Free shadow used ring in the right place. 2. Add failure check for shadow used ring malloc. lib/librte_vhost/vhost.c | 20 -- lib/librte_vhost/vhost.h

[dpdk-dev] [PATCH v5 6/6] vhost: optimize cache access

2016-09-08 Thread Zhihong Wang
This patch reorders the code to delay virtio header write to optimize cache access efficiency for cases where the mrg_rxbuf feature is turned on. It reduces CPU pipeline stall cycles significantly. Signed-off-by: Zhihong Wang --- Changes in v3: 1. Remove unnecessary memset which causes

[dpdk-dev] [PATCH v6 0/6] vhost: optimize enqueue

2016-09-19 Thread Zhihong Wang
n into several small ones. 2. Use multiple patches to explain each optimization. 3. Add comments. Zhihong Wang (6): vhost: fix windows vm hang vhost: rewrite enqueue vhost: remove useless volatile vhost: add desc prefetch vhost: batch update used ring vhost: optimize cache access li

[dpdk-dev] [PATCH v6 1/6] vhost: fix windows vm hang

2016-09-19 Thread Zhihong Wang
. 2. Start a Windows VM image with qemu and connect to the vhost port. 3. Start io forwarding with tx_first in host testpmd. For 16.07 code, the Windows VM will hang once any packets are enqueued. Cc: Signed-off-by: Zhihong Wang --- Changes in v5: 1. Add details in commit log. lib

[dpdk-dev] [PATCH v6 2/6] vhost: rewrite enqueue

2016-09-19 Thread Zhihong Wang
queue: * virtio_dev_merge_rx for mrg_rxbuf turned on cases. * virtio_dev_rx for mrg_rxbuf turned off cases. Having 2 callback paths increases maintenance effort. Also, the performance of the existing code is not optimal, especially when the mrg_rxbuf feature turned on. Signed-off-by: Zhihong Wang --- Ch

[dpdk-dev] [PATCH v6 3/6] vhost: remove useless volatile

2016-09-19 Thread Zhihong Wang
This patch removes useless volatile attribute to allow compiler optimization. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index c2dfc3c..9707dfc 100644 --- a/lib

[dpdk-dev] [PATCH v6 4/6] vhost: add desc prefetch

2016-09-19 Thread Zhihong Wang
This patch adds descriptor prefetch to hide cache access latency. Signed-off-by: Zhihong Wang --- lib/librte_vhost/virtio_net.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 0ada32b..f32a143 100644 --- a/lib

[dpdk-dev] [PATCH v6 5/6] vhost: batch update used ring

2016-09-19 Thread Zhihong Wang
This patch enables batch update of the used ring for better efficiency. Signed-off-by: Zhihong Wang --- Changes in v6: 1. Introduce a function for used ring write. --- Changes in v4: 1. Free shadow used ring in the right place. 2. Add failure check for shadow used ring malloc. lib

[dpdk-dev] [PATCH v6 6/6] vhost: optimize cache access

2016-09-19 Thread Zhihong Wang
an be saved per packet by this patch alone. Taking 64B packets traffic for example, this means about 60% efficiency improvement for the enqueue operation. Signed-off-by: Zhihong Wang --- Changes in v3: 1. Remove unnecessary memset which causes frontend stall on SNB & IVB. 2. Rename variables

[dpdk-dev] [PATCH] config: make AVX and AVX512 configurable

2017-04-26 Thread Zhihong Wang
Making AVX and AVX512 configurable is useful for performance and power testing. The similar kernel patch at https://patchwork.kernel.org/patch/9618883/. Signed-off-by: Zhihong Wang --- config/common_base | 6 ++ mk/rte.cpuflags.mk | 6 ++ 2 files changed, 12 insertions(+) diff --git a

[dpdk-dev] [PATCH v2] config: make AVX and AVX512 configurable

2017-04-27 Thread Zhihong Wang
marked as experimental for now, will enable it after enough field test and possible optimization. Signed-off-by: Zhihong Wang --- Changes in v2: 1. Add comments and explanation. --- config/common_base | 8 mk/rte.cpuflags.mk | 6 ++ 2 files changed, 14 insertions(+) diff --gi

[dpdk-dev] [PATCH] vhost: support rx_queue_count

2017-05-22 Thread Zhihong Wang
This patch implements the ops rx_queue_count for vhost PMD by adding a helper function rte_vhost_rx_queue_count in vhost lib. The ops ops rx_queue_count gets vhost RX queue avail count and helps to understand the queue fill level. Signed-off-by: Zhihong Wang --- drivers/net/vhost

[dpdk-dev] [PATCH v2] vhost: support rx_queue_count

2017-05-23 Thread Zhihong Wang
This patch implements the ops rx_queue_count for vhost PMD by adding a helper function rte_vhost_rx_queue_count in vhost lib. The ops rx_queue_count gets vhost RX queue avail count and helps to understand the queue fill level. Signed-off-by: Zhihong Wang --- Changes in v2: 1. Fixed a typo in

[dpdk-dev] [PATCH v3] vhost: support rx_queue_count

2017-05-25 Thread Zhihong Wang
This patch implements the ops rx_queue_count for vhost PMD by adding a helper function rte_vhost_rx_queue_count in vhost lib. The ops rx_queue_count gets vhost RX queue avail count and helps to understand the queue fill level. Signed-off-by: Zhihong Wang Acked-by: Ciara Loftus --- Changes in

[dpdk-dev] [PATCH] Unlink existing unused sockets at start up

2015-12-16 Thread Zhihong Wang
. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost_user/vhost-net-user.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/lib/librte_vhost/vhost_user/vhost-net-user.c b/lib/librte_vhost/vhost_user/vhost-net-user.c index 8b7a448..eac0721 100644

[dpdk-dev] [PATCH 0/3] Handle SIGINT and SIGTERM in DPDK examples

2015-12-23 Thread Zhihong Wang
This patch handles SIGINT and SIGTERM in testpmd, l2fwd, and l3fwd, make sure all ports are properly stopped and closed. For virtual ports, the stop and close function may deal with resource cleanup, such as socket files unlinking. Zhihong Wang (3): app/test-pmd: Handle SIGINT and SIGTERM in

[dpdk-dev] [PATCH 1/3] app/test-pmd: Handle SIGINT and SIGTERM in testpmd

2015-12-23 Thread Zhihong Wang
Handle SIGINT and SIGTERM in testpmd. Signed-off-by: Zhihong Wang --- app/test-pmd/testpmd.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 98ae46d..c259ba3 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd

[dpdk-dev] [PATCH 2/3] examples/l2fwd: Handle SIGINT and SIGTERM in l2fwd

2015-12-23 Thread Zhihong Wang
Handle SIGINT and SIGTERM in l2fwd. Signed-off-by: Zhihong Wang --- examples/l2fwd/main.c | 25 + 1 file changed, 25 insertions(+) diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 720fd5a..0594037 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd

[dpdk-dev] [PATCH 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd

2015-12-23 Thread Zhihong Wang
Handle SIGINT and SIGTERM in l3fwd. Signed-off-by: Zhihong Wang --- examples/l3fwd/main.c | 25 + 1 file changed, 25 insertions(+) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 5b0c2dd..aae16d2 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd

[dpdk-dev] [PATCH v2 0/3] Handle SIGINT and SIGTERM in DPDK examples

2015-12-24 Thread Zhihong Wang
all running phases 2. Make sure program exits with the right status Zhihong Wang (3): app/test-pmd: Handle SIGINT and SIGTERM in testpmd examples/l2fwd: Handle SIGINT and SIGTERM in l2fwd examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd app/test-pmd/cmdline.c | 19 ++--- app/test-pmd

[dpdk-dev] [PATCH v2 1/3] app/test-pmd: Handle SIGINT and SIGTERM in testpmd

2015-12-24 Thread Zhihong Wang
Handle SIGINT and SIGTERM in testpmd. Signed-off-by: Zhihong Wang --- app/test-pmd/cmdline.c | 19 +-- app/test-pmd/testpmd.c | 38 -- app/test-pmd/testpmd.h | 1 + 3 files changed, 46 insertions(+), 12 deletions(-) diff --git a/app/test-pmd

[dpdk-dev] [PATCH v2 2/3] examples/l2fwd: Handle SIGINT and SIGTERM in l2fwd

2015-12-24 Thread Zhihong Wang
Handle SIGINT and SIGTERM in l2fwd. Signed-off-by: Zhihong Wang --- examples/l2fwd/main.c | 60 +++ 1 file changed, 60 insertions(+) diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 720fd5a..75899dd 100644 --- a/examples/l2fwd

[dpdk-dev] [PATCH v2 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd

2015-12-24 Thread Zhihong Wang
Handle SIGINT and SIGTERM in l3fwd. Signed-off-by: Zhihong Wang --- examples/l3fwd/main.c | 110 +- 1 file changed, 90 insertions(+), 20 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 5b0c2dd..b9f3232 100644 --- a

[dpdk-dev] [PATCH v3 0/3] Handle SIGINT and SIGTERM in DPDK examples

2015-12-28 Thread Zhihong Wang
operations regarding status 2. Small fixes to make the code clearer -- Changes in v2: 1. Make sure graceful exit for all running phases 2. Make sure program exits with the right status Zhihong Wang (3): app/test-pmd: Handle SIGINT and SIGTERM in testpmd examples/l2fwd: Handle SIGINT

[dpdk-dev] [PATCH v3 1/3] app/test-pmd: Handle SIGINT and SIGTERM in testpmd

2015-12-28 Thread Zhihong Wang
Handle SIGINT and SIGTERM in testpmd. Signed-off-by: Zhihong Wang Acked-by: Michael Qiu --- app/test-pmd/cmdline.c | 20 +--- app/test-pmd/testpmd.c | 39 +-- app/test-pmd/testpmd.h | 1 + 3 files changed, 47 insertions(+), 13 deletions

[dpdk-dev] [PATCH v3 2/3] examples/l2fwd: Handle SIGINT and SIGTERM in l2fwd

2015-12-28 Thread Zhihong Wang
Handle SIGINT and SIGTERM in l2fwd. Signed-off-by: Zhihong Wang Acked-by: Michael Qiu --- examples/l2fwd/main.c | 123 +- 1 file changed, 101 insertions(+), 22 deletions(-) diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 720fd5a

[dpdk-dev] [PATCH v3 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd

2015-12-28 Thread Zhihong Wang
Handle SIGINT and SIGTERM in l3fwd. Signed-off-by: Zhihong Wang Acked-by: Michael Qiu --- examples/l3fwd/main.c | 129 +- 1 file changed, 107 insertions(+), 22 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 5b0c2dd

[dpdk-dev] [PATCH v4 0/3] Handle SIGINT and SIGTERM in DPDK examples

2015-12-29 Thread Zhihong Wang
l2fwd and l3fwd -- Changes in v3: 1. Make sure correct port operations regarding status 2. Small fixes to make the code clearer -- Changes in v2: 1. Make sure graceful exit for all running phases 2. Make sure program exits with the right status Zhihong Wang (3): app

[dpdk-dev] [PATCH v4 1/3] app/test-pmd: Handle SIGINT and SIGTERM in testpmd

2015-12-29 Thread Zhihong Wang
Handle SIGINT and SIGTERM in testpmd. Signed-off-by: Zhihong Wang Acked-by: Michael Qiu --- app/test-pmd/cmdline.c | 20 +--- app/test-pmd/testpmd.c | 39 +-- app/test-pmd/testpmd.h | 1 + 3 files changed, 47 insertions(+), 13 deletions

[dpdk-dev] [PATCH v4 2/3] examples/l2fwd: Handle SIGINT and SIGTERM in l2fwd

2015-12-29 Thread Zhihong Wang
Handle SIGINT and SIGTERM in l2fwd. Signed-off-by: Zhihong Wang Acked-by: Michael Qiu --- examples/l2fwd/main.c | 161 +++--- 1 file changed, 139 insertions(+), 22 deletions(-) diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 720fd5a

[dpdk-dev] [PATCH v4 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd

2015-12-29 Thread Zhihong Wang
Handle SIGINT and SIGTERM in l3fwd. Signed-off-by: Zhihong Wang Acked-by: Michael Qiu --- examples/l3fwd/main.c | 167 +++--- 1 file changed, 145 insertions(+), 22 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 5b0c2dd

[dpdk-dev] [PATCH v5 0/3] Handle SIGINT and SIGTERM in DPDK examples

2015-12-30 Thread Zhihong Wang
running phases 2. Make sure program exits with the right status Zhihong Wang (3): app/test-pmd: Handle SIGINT and SIGTERM in testpmd examples/l2fwd: Handle SIGINT and SIGTERM in l2fwd examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd app/test-pmd/cmdline.c | 20 +--- app/test

[dpdk-dev] [PATCH v5 1/3] app/test-pmd: Handle SIGINT and SIGTERM in testpmd

2015-12-30 Thread Zhihong Wang
Handle SIGINT and SIGTERM in testpmd. Signed-off-by: Zhihong Wang Acked-by: Michael Qiu --- app/test-pmd/cmdline.c | 20 +--- app/test-pmd/testpmd.c | 39 +-- app/test-pmd/testpmd.h | 1 + 3 files changed, 47 insertions(+), 13 deletions

[dpdk-dev] [PATCH v5 2/3] examples/l2fwd: Handle SIGINT and SIGTERM in l2fwd

2015-12-30 Thread Zhihong Wang
Handle SIGINT and SIGTERM in l2fwd. Signed-off-by: Zhihong Wang Acked-by: Michael Qiu --- examples/l2fwd/main.c | 43 +++ 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 720fd5a..f35d8a1

[dpdk-dev] [PATCH v5 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd

2015-12-30 Thread Zhihong Wang
Handle SIGINT and SIGTERM in l3fwd. Signed-off-by: Zhihong Wang Acked-by: Michael Qiu --- examples/l3fwd/main.c | 46 ++ 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 5b0c2dd

[dpdk-dev] [PATCH] doc: add doc for vdpa

2018-05-25 Thread Zhihong Wang
Signed-off-by: Zhihong Wang --- doc/guides/prog_guide/vhost_lib.rst | 59 + 1 file changed, 59 insertions(+) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst index 92dcdb587..77af4d775 100644 --- a/doc/guides/prog_guide

[dpdk-dev] [PATCH] doc: update release notes for vhost interrupt mode

2018-05-25 Thread Zhihong Wang
Signed-off-by: Zhihong Wang --- doc/guides/rel_notes/release_18_05.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst index 40eec3a49..eda6cf411 100644 --- a/doc/guides/rel_notes/release_18_05.rst +++ b

[dpdk-dev] [PATCH] doc: update release notes for vdpa

2018-05-25 Thread Zhihong Wang
Signed-off-by: Zhihong Wang --- doc/guides/rel_notes/release_18_05.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst index 40eec3a49..44180bb44 100644 --- a/doc/guides/rel_notes/release_18_05.rst +++ b

[dpdk-dev] [PATCH v2 0/4] DPDK memcpy optimization

2015-01-29 Thread Zhihong Wang
macro definition for better code readability & safety Zhihong Wang (4): app/test: Disabled VTA for memcpy test in app/test/Makefile app/test: Removed unnecessary test cases in app/test/test_memcpy.c app/test: Extended test coverage in app/test/test_memcpy_perf.c lib/librte_eal: Optim

[dpdk-dev] [PATCH v2 3/4] app/test: Extended test coverage in app/test/test_memcpy_perf.c

2015-01-29 Thread Zhihong Wang
Main code changes: 1. Added more typical data points for a thorough performance test 2. Added unaligned test cases since it's common in DPDK usage Signed-off-by: Zhihong Wang --- app/test/test_memcpy_perf.c | 220 +++- 1 file changed, 138 inser

[dpdk-dev] [PATCH v2 1/4] app/test: Disabled VTA for memcpy test in app/test/Makefile

2015-01-29 Thread Zhihong Wang
VTA is for debugging only, it increases compile time and binary size, especially when there're a lot of inlines. So disable it since memcpy test contains a lot of inline calls. Signed-off-by: Zhihong Wang --- app/test/Makefile | 6 ++ 1 file changed, 6 insertions(+) diff --git a/app

[dpdk-dev] [PATCH v2 2/4] app/test: Removed unnecessary test cases in app/test/test_memcpy.c

2015-01-29 Thread Zhihong Wang
Removed unnecessary test cases for base move functions since the function "func_test" covers them all. Signed-off-by: Zhihong Wang --- app/test/test_memcpy.c | 52 +- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git

[dpdk-dev] [PATCH v2 4/4] lib/librte_eal: Optimized memcpy in arch/x86/rte_memcpy.h for both SSE and AVX platforms

2015-01-29 Thread Zhihong Wang
functions for unaligned load cases b. Change instruction order in copy loops for better pipeline utilization c. Use intrinsics instead of assembly code 4. Remove slow glibc call for constant copies Signed-off-by: Zhihong Wang --- .../common/include/arch/x86/rte_memcpy.h

[dpdk-dev] [PATCH] vhost: fix ANY_LAYOUT declaration

2018-01-18 Thread Zhihong Wang
The VIRTIO_F_ANY_LAYOUT feature indicates the device accepts arbitrary descriptor layouts. The vhost-user lib already supports it, but the feature declaration is missing. This patch fixes the mismatch. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost.h | 1 + 1 file changed, 1 insertion

[dpdk-dev] [PATCH v3 0/5] vhost: support selective datapath

2018-03-19 Thread Zhihong Wang
duced. --- Changes in v2: 1. Ensure negotiated capabilities are supported in vhost-user lib. 2. Add APIs for live migration. 3. Configure the data path at the right time. 4. Add VFIO related vDPA device ops. 5. Rebase on dpdk-next-virtio. Zhihong Wang (5): vhost: export vhost fe

[dpdk-dev] [PATCH v3 3/5] vhost: add apis for datapath configuration

2018-03-19 Thread Zhihong Wang
to use. Each vhost-user socket can have only 1 connection in this case. Signed-off-by: Zhihong Wang --- lib/librte_vhost/rte_vhost.h | 70 ++ lib/librte_vhost/rte_vhost_version.map | 6 +++ lib/librte_vhost/socket.c | 65

[dpdk-dev] [PATCH v3 4/5] vhost: adapt vhost lib for selective datapath

2018-03-19 Thread Zhihong Wang
This patch adapts vhost lib for selective datapath by calling device ops at the corresponding stage. Signed-off-by: Zhihong Wang --- Changes in v2: 1. Ensure negotiated capabilities are supported in vhost-user lib. 2. Configure the data path at the right time. lib/librte_vhost/rte_vhost.h

[dpdk-dev] [PATCH v3 1/5] vhost: export vhost feature definitions

2018-03-19 Thread Zhihong Wang
This patch exports vhost-user protocol features to support device driver development. Signed-off-by: Zhihong Wang --- Changes in v3: 1. Keep macro names the same as in the spec. lib/librte_vhost/rte_vhost.h | 30 ++ lib/librte_vhost/vhost.h | 2 -- lib

[dpdk-dev] [PATCH v3 2/5] vhost: support selective datapath

2018-03-19 Thread Zhihong Wang
get the VFIO group fd of the device. g. get_vfio_device_fd: Called to get the VFIO device fd of the device. h. get_notify_area: Called to get the notify area info of the queue. Signed-off-by: Zhihong Wang --- Changes in v2: 1. Add VFIO related vDPA device ops. lib/librte_vhost

[dpdk-dev] [PATCH v3 5/5] vhost: add apis for live migration

2018-03-19 Thread Zhihong Wang
need to be read from the virtio_net structure and set into the device. Signed-off-by: Zhihong Wang --- lib/librte_vhost/rte_vhost.h | 51 +++ lib/librte_vhost/rte_vhost_version.map | 3 ++ lib/librte_vhost/vhost.c | 63

[dpdk-dev] [PATCH v4 1/5] vhost: export vhost feature definitions

2018-03-30 Thread Zhihong Wang
This patch exports vhost-user protocol features to support device driver development. Signed-off-by: Zhihong Wang --- Changes in v3: 1. Keep macro names the same as in the spec. lib/librte_vhost/rte_vhost.h | 30 ++ lib/librte_vhost/vhost.h | 2 -- lib

[dpdk-dev] [PATCH v4 2/5] vhost: support selective datapath

2018-03-30 Thread Zhihong Wang
. get_notify_area: Called to get the notify area info of the queue. Signed-off-by: Zhihong Wang --- Changes in v4: 1. Remove the "engine" concept in the lib. --- Changes in v2: 1. Add VFIO related vDPA device ops. lib/librte_vhost/Makefile | 4 +- lib/librte_vhost/

[dpdk-dev] [PATCH v4 0/5] vhost: support selective datapath

2018-03-30 Thread Zhihong Wang
ed in vhost-user lib. 2. Add APIs for live migration. 3. Configure the data path at the right time. 4. Add VFIO related vDPA device ops. 5. Rebase on dpdk-next-virtio. Zhihong Wang (5): vhost: export vhost feature definitions vhost: support selective datapath vhost: add apis for da

[dpdk-dev] [PATCH v4 5/5] vhost: add apis for live migration

2018-03-30 Thread Zhihong Wang
need to be read from the virtio_net structure and set into the device. Signed-off-by: Zhihong Wang --- lib/librte_vhost/rte_vhost.h | 51 +++ lib/librte_vhost/rte_vhost_version.map | 3 ++ lib/librte_vhost/vhost.c | 63

[dpdk-dev] [PATCH v4 3/5] vhost: add apis for datapath configuration

2018-03-30 Thread Zhihong Wang
This patch adds APIs for datapath configuration. The did of the vhost-user socket can be set to identify the backend device, in this case each vhost-user socket can have only 1 connection. The did is set to -1 by default when the software datapath is used. Signed-off-by: Zhihong Wang

[dpdk-dev] [PATCH v4 4/5] vhost: adapt vhost lib for selective datapath

2018-03-30 Thread Zhihong Wang
This patch adapts vhost lib for selective datapath by calling device ops at the corresponding stage. Signed-off-by: Zhihong Wang --- Changes in v4: 1. Remove the "engine" concept in the lib. --- Changes in v2: 1. Ensure negotiated capabilities are supported in vhost-user lib. 2.

[dpdk-dev] [PATCH v5 2/5] vhost: support selective datapath

2018-04-02 Thread Zhihong Wang
. get_notify_area: Called to get the notify area info of the queue. Signed-off-by: Zhihong Wang --- Changes in v5: 1. Rename the vDPA device ops to follow convention. 2. Improve sanity check. --- Changes in v4: 1. Remove the "engine" concept in the lib. --- Changes in v2: 1

[dpdk-dev] [PATCH v5 4/5] vhost: adapt vhost lib for selective datapath

2018-04-02 Thread Zhihong Wang
This patch adapts vhost lib for selective datapath by calling device ops at the corresponding stage. Signed-off-by: Zhihong Wang --- Changes in v5: 1. Improve sanity check. --- Changes in v4: 1. Remove the "engine" concept in the lib. --- Changes in v2: 1. Ensure negotiated ca

[dpdk-dev] [PATCH v5 1/5] vhost: export vhost feature definitions

2018-04-02 Thread Zhihong Wang
This patch exports vhost-user protocol features to support device driver development. Signed-off-by: Zhihong Wang Reviewed-by: Maxime Coquelin --- Changes in v3: 1. Keep macro names the same as in the spec. lib/librte_vhost/rte_vhost.h | 30 ++ lib/librte_vhost

[dpdk-dev] [PATCH v5 3/5] vhost: add apis for datapath configuration

2018-04-02 Thread Zhihong Wang
This patch adds APIs for datapath configuration. The did of the vhost-user socket can be set to identify the backend device, in this case each vhost-user socket can have only 1 connection. The did is set to -1 by default when the software datapath is used. Signed-off-by: Zhihong Wang

[dpdk-dev] [PATCH v5 0/5] vhost: support selective datapath

2018-04-02 Thread Zhihong Wang
otiated capabilities are supported in vhost-user lib. 2. Add APIs for live migration. 3. Configure the data path at the right time. 4. Add VFIO related vDPA device ops. 5. Rebase on dpdk-next-virtio. Zhihong Wang (5): vhost: export vhost feature definitions vhost: support selective d

[dpdk-dev] [PATCH v5 5/5] vhost: add apis for live migration

2018-04-02 Thread Zhihong Wang
need to be read from the virtio_net structure and set into the device. Signed-off-by: Zhihong Wang Reviewed-by: Maxime Coquelin --- lib/librte_vhost/rte_vhost.h | 51 +++ lib/librte_vhost/rte_vhost_version.map | 3 ++ lib/librte_vhost/vhost.c | 63

[dpdk-dev] [PATCH] vhost: fix ANY_LAYOUT definition for old kernels

2018-01-30 Thread Zhihong Wang
This patch fixes compile failure with old kernels which have no VIRTIO_F_ANY_LAYOUT defined. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost.h | 4 1 file changed, 4 insertions(+) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index ba80584..646aad3 100644 --- a

[dpdk-dev] [PATCH 0/7] vhost: support selective datapath

2018-02-02 Thread Zhihong Wang
. d. Register vhost-user callbacks. e. Start to wait for connection. 4. When connection comes and virtio device data structure is negotiated, configure the device with all needed info. Zhihong Wang (7): vhost: make capabilities configurable vhost: expose vhost feature definitions

[dpdk-dev] [PATCH 1/7] vhost: make capabilities configurable

2018-02-02 Thread Zhihong Wang
: Zhihong Wang --- lib/librte_vhost/rte_vhost.h | 50 lib/librte_vhost/socket.c | 77 +++ lib/librte_vhost/vhost_user.c | 48 --- 3 files changed, 164 insertions(+), 11 deletions(-) diff --git a/lib

[dpdk-dev] [PATCH 3/7] vhost: support selective datapath

2018-02-02 Thread Zhihong Wang
. vring_state_set: Called to change the state of the vring in the actual device when vring state changes. d. feature_set: Called to set the negotiated features to device. e. migration_done: Called to allow the device to response to RARP sending. Signed-off-by: Zhihong Wang --- lib

[dpdk-dev] [PATCH 2/7] vhost: export vhost feature definitions

2018-02-02 Thread Zhihong Wang
This patch exports vhost-user protocol features to support device driver development. Signed-off-by: Zhihong Wang --- lib/librte_vhost/rte_vhost.h | 8 lib/librte_vhost/vhost.h | 4 +--- lib/librte_vhost/vhost_user.c | 9 + lib/librte_vhost/vhost_user.h | 20

[dpdk-dev] [PATCH 4/7] vhost: add apis for datapath configuration

2018-02-02 Thread Zhihong Wang
to use. Each vhost-user socket can have only 1 connection in this case. Signed-off-by: Zhihong Wang --- lib/librte_vhost/rte_vhost.h | 68 lib/librte_vhost/socket.c| 65 ++ lib/librte_vhost/vhost.c | 44

[dpdk-dev] [PATCH 6/7] vhost: get callfd before device setup

2018-02-02 Thread Zhihong Wang
From: Xiao Wang This patch is to make sure device is configured with all needed guest info. According to QEMU vhost message sequence, the real callfd comes just before SET_VRING_ENABLE. Signed-off-by: Xiao Wang --- lib/librte_vhost/vhost_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 delet

[dpdk-dev] [PATCH 7/7] vhost: export new apis

2018-02-02 Thread Zhihong Wang
This patch exports new APIs as experimental. Signed-off-by: Zhihong Wang --- lib/librte_vhost/rte_vdpa.h| 16 +++- lib/librte_vhost/rte_vhost.h | 30 -- lib/librte_vhost/rte_vhost_version.map | 18 ++ 3 files changed

[dpdk-dev] [PATCH 5/7] vhost: adapt vhost lib for selective datapath

2018-02-02 Thread Zhihong Wang
This patch adapts vhost lib for selective datapath by calling device ops at the corresponding stage. Signed-off-by: Zhihong Wang --- lib/librte_vhost/socket.c | 3 +++ lib/librte_vhost/vhost.c | 5 + lib/librte_vhost/vhost_user.c | 48

[dpdk-dev] [PATCH v2 1/6] vhost: export vhost feature definitions

2018-03-05 Thread Zhihong Wang
This patch exports vhost-user protocol features to support device driver development. Signed-off-by: Zhihong Wang --- lib/librte_vhost/rte_vhost.h | 8 lib/librte_vhost/vhost.h | 4 +--- lib/librte_vhost/vhost_user.c | 9 + lib/librte_vhost/vhost_user.h | 20

  1   2   >