[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: Zhi

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

2016-09-09 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 v5 5/6] vhost: batch update used ring

2016-09-09 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 4/6] vhost: add desc prefetch

2016-09-09 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 3/6] vhost: remove useless volatile

2016-09-09 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 2/6] vhost: rewrite enqueue

2016-09-09 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 1/6] vhost: fix windows vm hang

2016-09-09 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 0/6] vhost: optimize enqueue

2016-09-09 Thread Zhihong Wang
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: fix window

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

2016-08-30 Thread Zhihong Wang
2. Rename variables to follow naming convention. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost_rxtx.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c index ddc7b21..fc5dc4a 100644 --- a

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

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

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

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

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

2016-08-30 Thread Zhihong Wang
This patch removes useless volatile attribute to allow compiler optimization. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost-net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost-net.h b/lib/librte_vhost/vhost-net.h index 38593a2..51fdf3d

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

2016-08-30 Thread Zhihong Wang
for clearer logic. 2. Add PRINT_PACKET for debugging. --- Changes in v3: 1. Rewrite enqueue and delete the obsolete in the same patch. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost_rxtx.c | 525 -- 1 file changed, 145 insertions(+), 380

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

2016-08-30 Thread Zhihong Wang
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 --- lib/librte_vhost/vhost_rxtx.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib

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

2016-08-30 Thread Zhihong Wang
ches 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 lib/librte_vhost/vhost-net.h | 6 +- lib/librte_v

[dpdk-dev] [PATCH v3 5/5] vhost: optimize cache access

2016-08-19 Thread Zhihong Wang
2. Rename variables to follow naming convention. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost_rxtx.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c index c4abaf1..e3ba4e0 100644 --- a

[dpdk-dev] [PATCH v3 4/5] vhost: batch update used ring

2016-08-19 Thread Zhihong Wang
This patch enables batch update of the used ring for better efficiency. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost-net.h | 4 +++ lib/librte_vhost/vhost_rxtx.c | 68 +-- lib/librte_vhost/virtio-net.c | 15 -- 3 files changed, 68

[dpdk-dev] [PATCH v3 3/5] vhost: add desc prefetch

2016-08-19 Thread Zhihong Wang
This patch adds descriptor prefetch to hide cache access latency. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost_rxtx.c | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c index b09a9c3..7523b2d 100644 --- a/lib

[dpdk-dev] [PATCH v3 2/5] vhost: remove useless volatile

2016-08-19 Thread Zhihong Wang
This patch removes useless volatile attribute to allow compiler optimization. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost-net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost-net.h b/lib/librte_vhost/vhost-net.h index 38593a2..51fdf3d

[dpdk-dev] [PATCH v3 1/5] vhost: rewrite enqueue

2016-08-19 Thread Zhihong Wang
This patch implements the vhost logic from scratch into a single function designed for high performance and better maintainability. --- Changes in v3: 1. Rewrite enqueue and delete the obsolete in the same patch. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost_rxtx.c | 537

[dpdk-dev] [PATCH v3 0/5] vhost: optimize enqueue

2016-08-19 Thread Zhihong Wang
plit the big function into several small ones. 2. Use multiple patches to explain each optimization. 3. Add comments. Zhihong Wang (5): vhost: rewrite enqueue vhost: remove useless volatile vhost: add desc prefetch vhost: batch update used ring vhost: optimize cache access

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

2016-08-18 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 --- lib/librte_vhost/vhost_rxtx.c | 23 --- 1

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

2016-08-18 Thread Zhihong Wang
This patch enables batch update of the used ring for better efficiency. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost-net.h | 4 +++ lib/librte_vhost/vhost_rxtx.c | 68 +-- lib/librte_vhost/virtio-net.c | 15 -- 3 files changed, 68

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

2016-08-18 Thread Zhihong Wang
This patch adds descriptor prefetch to hide cache access latency. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost_rxtx.c | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c index 939957d..7db83d0 100644 --- a/lib

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

2016-08-18 Thread Zhihong Wang
This patch removes useless volatile attribute to allow compiler optimization. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost-net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost-net.h b/lib/librte_vhost/vhost-net.h index 38593a2..51fdf3d

[dpdk-dev] [PATCH v2 2/6] vhost: remove obsolete

2016-08-18 Thread Zhihong Wang
This patch removes obsolete functions. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost_rxtx.c | 408 -- 1 file changed, 408 deletions(-) diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c index 8e6d782..939957d 100644

[dpdk-dev] [PATCH v2 1/6] vhost: rewrite enqueue

2016-08-18 Thread Zhihong Wang
This patch implements the vhost logic from scratch into a single function designed for high performance and better maintainability. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost_rxtx.c | 212 -- 1 file changed, 205 insertions(+), 7 deletions

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

2016-08-18 Thread Zhihong Wang
. Split the big function into several small ones 2. Use multiple patches to explain each optimization 3. Add comments Zhihong Wang (6): vhost: rewrite enqueue vhost: remove obsolete vhost: remove useless volatile vhost: add desc prefetch vhost: batch update used ring vhost: optimize

[dpdk-dev] [PATCH] optimize vhost enqueue

2016-08-16 Thread Zhihong Wang
especially for mrg_rxbuf turned on cases. It also fixes the issue working with Windows VMs. Signed-off-by: Zhihong Wang --- lib/librte_vhost/vhost-net.h | 6 +- lib/librte_vhost/vhost_rxtx.c | 582 ++ lib/librte_vhost/virtio-net.c | 15 +- 3 files changed

[dpdk-dev] [PATCH v3] doc: virtio PMD Rx/Tx callbacks

2016-07-01 Thread Zhihong Wang
This patch explains current virtio PMD Rx/Tx callbacks, to help understand what's the difference, and how to enable the right ones. Signed-off-by: Zhihong Wang Acked-by: John McNamara -- Changes in v3: 1. Rephrase for clearer description. -- Changes in v2: 1

[dpdk-dev] [PATCH v2] doc: virtio pmd versions

2016-06-14 Thread Zhihong Wang
This patch explains all the versions of current virtio pmd implementation, what's the difference, and how to choose the right version. -- Changes in v2: 1. Changes on format and few descriptions. Signed-off-by: Zhihong Wang --- doc/guides/nics/virtio.rst | 64

[dpdk-dev] [PATCH v3 5/5] testpmd: show topology at forwarding start

2016-06-14 Thread Zhihong Wang
This patch show topology at forwarding start. "show config fwd" also does this, but showing it directly can reduce the possibility of misconfiguration. Currently fwd_config_display() calls fwd_config_setup(), this misleading behavior will be fixed in other patches. Signed-off-by: Zh

[dpdk-dev] [PATCH v3 4/5] testpmd: handle all rxqs in rss setup

2016-06-14 Thread Zhihong Wang
recent example: http://openvswitch.org/pipermail/dev/2016-June/072110.html Signed-off-by: Zhihong Wang --- app/test-pmd/config.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index ede7c78..4719a08 100644 --- a/app/test

[dpdk-dev] [PATCH v3 3/5] testpmd: show throughput in port stats

2016-06-14 Thread Zhihong Wang
This patch adds throughput numbers (in the period since last use of this command) in port statistics display for "show port stats (port_id|all)". Signed-off-by: Zhihong Wang --- app/test-pmd/config.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/ap

[dpdk-dev] [PATCH v3 2/5] testpmd: configurable tx_first burst number

2016-06-14 Thread Zhihong Wang
This patch enables configurable tx_first burst number. Use "start tx_first (burst_num)" to specify how many bursts of packets to be sent before forwarding start, or "start tx_first" like before for the default 1 burst send. Signed-off-by: Zhihong Wang Acked-by: Pablo de Lar

[dpdk-dev] [PATCH v3 1/5] testpmd: add retry option

2016-06-14 Thread Zhihong Wang
This patch adds retry option in testpmd to prevent most packet losses. It can be enabled by "set fwd retry". All modes except rxonly support this option. Adding retry mechanism expands test case coverage to support scenarios where packet loss affects test results. Signed-off-by: Zh

[dpdk-dev] [PATCH v3 0/5] vhost/virtio performance loopback utility

2016-06-14 Thread Zhihong Wang
r the performance. -- Changes in v2: 1. Add retry as an option for existing forwarding engines except rxonly. 2. Minor code adjustment and more detailed patch description. -- Changes in v3: 1. Add more details in commit log. 2. Give variables more meaningful name

[dpdk-dev] [PATCH v2 5/5] testpmd: show topology at forwarding start

2016-06-01 Thread Zhihong Wang
This patch show topology at forwarding start. "show config fwd" also does this, but showing it directly can reduce the possibility of misconfiguration. Signed-off-by: Zhihong Wang --- app/test-pmd/cmdline.c | 2 +- app/test-pmd/config.c | 4 ++-- app/test-pmd/testpmd.c | 2 +- ap

[dpdk-dev] [PATCH v2 4/5] testpmd: handle all rxqs in rss setup

2016-06-01 Thread Zhihong Wang
This patch removes constraints in rxq handling when multiqueue is enabled to handle all the rxqs. Current testpmd forces a dedicated core for each rxq, some rxqs may be ignored when core number is less than rxq number, and that causes confusion and inconvenience. Signed-off-by: Zhihong Wang

[dpdk-dev] [PATCH v2 3/5] testpmd: show throughput in port stats

2016-06-01 Thread Zhihong Wang
This patch adds throughput numbers (in the period since last use of this command) in port statistics display for "show port stats (port_id|all)". Signed-off-by: Zhihong Wang --- app/test-pmd/config.c | 20 1 file changed, 20 insertions(+) diff --git a/ap

[dpdk-dev] [PATCH v2 2/5] testpmd: configurable tx_first burst number

2016-06-01 Thread Zhihong Wang
This patch enables configurable tx_first burst number. Use "start tx_first (burst_num)" to specify how many bursts of packets to be sent before forwarding start, or "start tx_first" like before for the default 1 burst send. Signed-off-by: Zhihong Wang --- ap

[dpdk-dev] [PATCH v2 1/5] testpmd: add retry option

2016-06-01 Thread Zhihong Wang
This patch adds retry option in testpmd to prevent most packet losses. It can be enabled by "set fwd retry". All modes except rxonly support this option. Adding retry mechanism expands test case coverage to support scenarios where packet loss affects test results. Signed-off-by: Zh

[dpdk-dev] [PATCH v2 0/5] vhost/virtio performance loopback utility

2016-06-01 Thread Zhihong Wang
xisting forwarding engines except rxonly. 2. Minor code adjustment and more detailed patch description. Zhihong Wang (5): testpmd: add retry option testpmd: configurable tx_first burst number testpmd: show throughput in port stats testpmd: handle all rxqs in rss setup testpmd: show t

[dpdk-dev] [PATCH] eal: fix rte_memcpy perf in hsw/bdw

2016-05-24 Thread Zhihong Wang
is used. Signed-off-by: Zhihong Wang --- .../common/include/arch/x86/rte_memcpy.h | 116 ++--- 1 file changed, 30 insertions(+), 86 deletions(-) diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h index

[dpdk-dev] [PATCH 6/6] testpmd: update documentation

2016-05-05 Thread Zhihong Wang
This patch updates documentation for testpmd. Signed-off-by: Zhihong Wang --- doc/guides/testpmd_app_ug/run_app.rst | 1 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 10 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/guides/testpmd_app_ug/run_app.rst b

[dpdk-dev] [PATCH 5/6] testpmd: show topology at forwarding start

2016-05-05 Thread Zhihong Wang
This patch show topology at forwarding start. "show config fwd" also does this, but showing it directly can reduce the possibility of misconfiguration. Signed-off-by: Zhihong Wang --- app/test-pmd/testpmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ap

[dpdk-dev] [PATCH 4/6] testpmd: handle all rxqs in rss setup

2016-05-05 Thread Zhihong Wang
This patch removes constraints in rxq handling when multiqueue is enabled to handle all the rxqs. Current testpmd forces a dedicated core for each rxq, some rxqs may be ignored when core number is less than rxq number, and that causes confusion and inconvenience. Signed-off-by: Zhihong Wang

[dpdk-dev] [PATCH 3/6] testpmd: show throughput in port stats

2016-05-05 Thread Zhihong Wang
This patch adds throughput numbers (in the period since last use of this command) in port statistics display for "show port stats (port_id|all)". Signed-off-by: Zhihong Wang --- app/test-pmd/config.c | 20 1 file changed, 20 insertions(+) diff --git a/ap

[dpdk-dev] [PATCH 2/6] testpmd: configurable tx_first burst number

2016-05-05 Thread Zhihong Wang
This patch enables configurable tx_first burst number. Use "start tx_first (burst_num)" to specify how many bursts of packets to be sent before forwarding start, or "start tx_first" like before for the default 1 burst send. Signed-off-by: Zhihong Wang --- app/tes

[dpdk-dev] [PATCH 1/6] testpmd: add io_retry forwarding

2016-05-05 Thread Zhihong Wang
ss affects test results. Signed-off-by: Zhihong Wang --- app/test-pmd/Makefile | 1 + app/test-pmd/iofwd-retry.c | 139 + app/test-pmd/testpmd.c | 1 + app/test-pmd/testpmd.h | 1 + 4 files changed, 142 insertions(+) create mode 10064

[dpdk-dev] [PATCH 0/6] vhost/virtio performance loopback utility

2016-05-05 Thread Zhihong Wang
ly 1 virtio pmd port connected to the corresponding vhost pmd port. 3. "set fwd io_retry" in testpmds in both host and guest. 4. "start" in testpmd in guest. 5. "start tx_first 8" in testpmd in host. Then use "show port stats all" t

[dpdk-dev] [PATCH] doc: virtio pmd versions

2016-04-21 Thread Zhihong Wang
This patch explains all the versions of current virtio pmd implementation, what's the difference, and how to choose the right version. Signed-off-by: Zhihong Wang --- doc/guides/nics/virtio.rst | 57 ++ 1 file changed, 57 insertions(+) diff --git

[dpdk-dev] [RFC PATCH 2/2] testpmd: add portfwd commands

2016-04-20 Thread Zhihong Wang
show route Signed-off-by: Zhihong Wang --- app/test-pmd/cmdline.c | 279 - 1 file changed, 277 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index c5b9479..6a076a4 100644 --- a/app/test-pmd/cmdline.c +++

[dpdk-dev] [RFC PATCH 1/2] testpmd: add portfwd engine

2016-04-20 Thread Zhihong Wang
These "extra" overheads are actually what happens in real applications. Modifications are: 1) Add the portfwd engine in portfwd.c 2) Add related data structures 3) Add support functions Signed-off-by: Zhihong Wang --- app/test-pmd/Makefile |

[dpdk-dev] [RFC PATCH 0/2] performance utility in testpmd

2016-04-20 Thread Zhihong Wang
native-linuxapp-gcc/app/testpmd -c 0xf0 -n 4 --socket-mem 4096,0 --vdev 'eth_vhost0,iface=/tmp/sock0,queues=2' --vdev 'eth_vhost1,iface=/tmp/sock1,queues=2' -- -i --rxq=2 --txq=2 --rss-ip --nb-cores=2 Zhihong Wang (2): testpmd: add portfwd engine testpmd: add porfwd commands

[dpdk-dev] [PATCH] eal/x86: Fix build with clang for old AVX

2016-02-03 Thread Zhihong Wang
platforms without AVX512") Signed-off-by: Zhihong Wang Reported-by: De Lara Guarch, Pablo --- lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_

[dpdk-dev] [dpdk-dev,v2] Clean up rte_memcpy.h file

2016-01-27 Thread Zhihong Wang
> Remove unnecessary type casting in functions. > > Tested on Ubuntu (14.04 x86_64) with "make test". > "make test" results match the results with baseline. > "Memcpy perf" results match the results with baseline. > > Signed-off-by: Ravi Kerur > Acked-by: Stephen Hemminger > > --- >

[dpdk-dev] [dpdk-dev, v3] Implement memcmp using Intel SIMD instrinsics.

2016-01-27 Thread Zhihong Wang
> diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcmp.h b/lib > /librte_eal/common/include/arch/x86/rte_memcmp.h [...] > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +/** > + * Compare bytes between two locations. The locations must not overlap. > + * Parameter names should be

[dpdk-dev] [PATCH v2 5/5] lib/librte_eal: Tune memcpy for prior platforms

2016-01-17 Thread Zhihong Wang
For prior platforms, add condition for unalignment handling, to keep this operation from interrupting the batch copy loop for aligned cases. Signed-off-by: Zhihong Wang --- .../common/include/arch/x86/rte_memcpy.h | 22 +- 1 file changed, 13 insertions(+), 9

[dpdk-dev] [PATCH v2 4/5] app/test: Adjust alignment unit for memcpy perf test

2016-01-17 Thread Zhihong Wang
Decide alignment unit for memcpy perf test based on predefined macros. Signed-off-by: Zhihong Wang --- app/test/test_memcpy_perf.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c index 754828e..73babec 100644 --- a/app/test

[dpdk-dev] [PATCH v2 3/5] lib/librte_eal: Optimize memcpy for AVX512 platforms

2016-01-17 Thread Zhihong Wang
Signed-off-by: Zhihong Wang --- .../common/include/arch/x86/rte_memcpy.h | 247 - 1 file changed, 243 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h index 6a57426

[dpdk-dev] [PATCH v2 2/5] mk: Predefine AVX512 macro for compiler

2016-01-17 Thread Zhihong Wang
Predefine AVX512 macro if AVX512 is enabled by compiler. Signed-off-by: Zhihong Wang --- mk/rte.cpuflags.mk | 4 1 file changed, 4 insertions(+) diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk index 28f203b..19a3e7e 100644 --- a/mk/rte.cpuflags.mk +++ b/mk/rte.cpuflags.mk @@ -89,6

[dpdk-dev] [PATCH v2 1/5] lib/librte_eal: Identify AVX512 CPU flag

2016-01-17 Thread Zhihong Wang
Read CPUID to check if AVX512 is supported by CPU. Signed-off-by: Zhihong Wang --- lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h b/lib/librte_eal/common/include/arch/x86

[dpdk-dev] [PATCH v2 0/5] Optimize memcpy for AVX512 platforms

2016-01-17 Thread Zhihong Wang
performance for prior platforms Zhihong Wang (5): lib/librte_eal: Identify AVX512 CPU flag mk: Predefine AVX512 macro for compiler lib/librte_eal: Optimize memcpy for AVX512 platforms app/test: Adjust alignment unit for memcpy perf test lib/librte_eal: Tune memcpy for prior platforms app

[dpdk-dev] [PATCH 4/4] app/test: Adjust alignment unit for memcpy perf test

2016-01-14 Thread Zhihong Wang
Decide alignment unit for memcpy perf test based on predefined macros. Signed-off-by: Zhihong Wang --- app/test/test_memcpy_perf.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c index 754828e..73babec 100644 --- a/app/test

[dpdk-dev] [PATCH 3/4] lib/librte_eal: Optimize memcpy for AVX512 platforms

2016-01-14 Thread Zhihong Wang
Signed-off-by: Zhihong Wang --- .../common/include/arch/x86/rte_memcpy.h | 247 - 1 file changed, 243 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h index 6a57426

[dpdk-dev] [PATCH 2/4] mk: Predefine AVX512 macro for compiler

2016-01-14 Thread Zhihong Wang
Predefine AVX512 macro if AVX512 is enabled by compiler. Signed-off-by: Zhihong Wang --- mk/rte.cpuflags.mk | 4 1 file changed, 4 insertions(+) diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk index 28f203b..19a3e7e 100644 --- a/mk/rte.cpuflags.mk +++ b/mk/rte.cpuflags.mk @@ -89,6

[dpdk-dev] [PATCH 1/4] lib/librte_eal: Identify AVX512 CPU flag

2016-01-14 Thread Zhihong Wang
Read CPUID to check if AVX512 is supported by CPU. Signed-off-by: Zhihong Wang --- lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h b/lib/librte_eal/common/include/arch/x86

[dpdk-dev] [PATCH 0/4] Optimize memcpy for AVX512 platforms

2016-01-14 Thread Zhihong Wang
is supported by CPU 2. Predefine AVX512 macro if AVX512 is enabled by compiler 3. Implement AVX512 memcpy and choose the right implementation based on predefined macros 4. Decide alignment unit for memcpy perf test based on predefined macros Zhihong Wang (4): lib/librte_eal

[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 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 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 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 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 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 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 0/3] Handle SIGINT and SIGTERM in DPDK examples

2015-12-29 Thread Zhihong Wang
in 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 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 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 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 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 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

[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 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 0/3] Handle SIGINT and SIGTERM in DPDK examples

2015-12-24 Thread Zhihong Wang
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 and SIGTERM in l2fwd examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd app/test-pmd/cmdline.c | 19 ++--- app/test-pmd

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

[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 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling

2015-11-22 Thread Zhihong Wang
The kernel fills new allocated (huge) pages with zeros. DPDK just has to populate page tables to trigger the allocation. Signed-off-by: Zhihong Wang --- lib/librte_eal/linuxapp/eal/eal_memory.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/lib

[dpdk-dev] [PATCH 1/2] lib/librte_eal: Reduce timer initialization time

2015-11-22 Thread Zhihong Wang
Changing from 1/2 second to 1/10 doesn't compromise the precision, and a 4/10 second is worth saving. Signed-off-by: Zhihong Wang --- lib/librte_eal/linuxapp/eal/eal_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_timer.c b/lib

[dpdk-dev] [PATCH 0/2] Reduce DPDK initialization time

2015-11-22 Thread Zhihong Wang
in RFC v2: 1. Use MAP_POPULATE flag to populate page tables 2. Add comments to avoid future misunderstanding Zhihong Wang (2): lib/librte_eal: Reduce timer initialization time lib/librte_eal: Remove unnecessary hugepage zero-filling lib/librte_eal/linuxapp/eal/eal_memory.c | 20

[dpdk-dev] [PATCH RFC v2 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling

2015-11-19 Thread Zhihong Wang
The kernel fills new allocated (huge) pages with zeros. DPDK just has to touch the pages to trigger the allocation. Signed-off-by: Zhihong Wang --- lib/librte_eal/linuxapp/eal/eal_memory.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/lib/librte_eal

[dpdk-dev] [PATCH RFC v2 1/2] lib/librte_eal: Reduce timer initialization time

2015-11-19 Thread Zhihong Wang
Changing from 1/2 second to 1/10 doesn't compromise the precision, and a 4/10 second is worth saving. Signed-off-by: Zhihong Wang --- lib/librte_eal/linuxapp/eal/eal_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_timer.c b/lib

[dpdk-dev] [PATCH RFC v2 0/2] Reduce DPDK initialization time

2015-11-19 Thread Zhihong Wang
. Memory initialization time can be reduced nearly by half The 2nd topic has been brought up before in this thread: http://dpdk.org/dev/patchwork/patch/4219/ -- Changes in v2: 1. Use MAP_POPULATE flag to populate page tables 2. Add comments to avoid future misunderstanding Zhihong Wang

[dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling

2015-11-17 Thread Zhihong Wang
The kernel fills new allocated (huge) pages with zeros. DPDK just has to touch the pages to trigger the allocation. Signed-off-by: Zhihong Wang --- lib/librte_eal/linuxapp/eal/eal_memory.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal

[dpdk-dev] [RFC PATCH 1/2] lib/librte_eal: Reduce timer initialization time

2015-11-17 Thread Zhihong Wang
Changing from 1/2 second to 1/10 doesn't compromise the precision, and a 4/10 second is worth saving. Signed-off-by: Zhihong Wang --- lib/librte_eal/linuxapp/eal/eal_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_timer.c b/lib

[dpdk-dev] [RFC PATCH 0/2] Reduce DPDK initialization time

2015-11-17 Thread Zhihong Wang
. Memory initialization time can be reduced nearly by half The 2nd topic has been brought up before in this thread: http://dpdk.org/dev/patchwork/patch/4219/ Zhihong Wang (2): lib/librte_eal: Reduce timer initialization time lib/librte_eal: Remove unnecessary hugepage zero-filling lib

[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

  1   2   >