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

2018-03-05 Thread Zhihong Wang
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 (6): vhost: export vhost feature definitions vhost: support selective datapath vhost: add apis for datapath configuration vhost: adapt vhost lib

[dpdk-dev] [PATCH v2 3/6] vhost: add apis for datapath configuration

2018-03-05 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 | 64 +++ lib/librte_vhost/socket.c| 65 lib/librte_vhost/vhost.c | 50

[dpdk-dev] [PATCH v2 2/6] vhost: support selective datapath

2018-03-05 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 v2 4/6] vhost: adapt vhost lib for selective datapath

2018-03-05 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 v2 5/6] vhost: add apis for live migration

2018-03-05 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 | 49 ++ lib/librte_vhost/vhost.c | 63 2 files changed, 112 insertions(+) diff --git

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

2018-03-05 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 | 33 ++--- lib/librte_vhost/rte_vhost_version.map | 19 +++ 3 files

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

2017-12-22 Thread Zhihong Wang
data structure is created, set the eid and did in the new_device callback. Zhihong Wang (2): vhost: make capabilities configurable vhost: support selective datapath lib/librte_vhost/Makefile | 4 +- lib/librte_vhost/rte_vdpa.h | 126 ++ lib

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

2017-12-22 Thread Zhihong Wang
This patch makes vhost device capabilities configurable to adopt various engines. Such capabilities include supported features, protocol features, queue number. APIs are introduced to let app configure these capabilities. Signed-off-by: Zhihong Wang --- lib/librte_vhost/rte_vhost.h | 50

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

2017-12-22 Thread Zhihong Wang
This patch introduces support for selective datapath in DPDK vhost-user lib to enable acceleration. The default selection is the existing software implementation, while more options are available when more engines are present. Signed-off-by: Zhihong Wang --- lib/librte_vhost/Makefile | 4

[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 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 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 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 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 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 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 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 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 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 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] [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] [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 > > --- > .../common

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

2016-06-14 Thread Zhihong Wang
use "show port stats all" to monitor 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 comm

[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 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 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 4/5] testpmd: handle all rxqs in rss setup

2016-06-14 Thread Zhihong Wang
this, one 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 ---

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

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

2016-06-30 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:

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

2016-05-31 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 0/5] vhost/virtio performance loopback utility

2016-05-31 Thread Zhihong Wang
Changes in v2: 1. Add retry as an option for existing 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 testp

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

2016-05-31 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-05-31 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 3/5] testpmd: show throughput in port stats

2016-05-31 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 4/5] testpmd: handle all rxqs in rss setup

2016-05-31 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] [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] [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

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

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

[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 0/6] vhost/virtio performance loopback utility

2016-05-05 Thread Zhihong Wang
2. Start testpmd in guest with only 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 us

[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 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 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 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 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 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] [RFC PATCH 0/2] performance utility in testpmd

2016-04-20 Thread Zhihong Wang
ike: ./x86_64-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 engin

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

2016-04-20 Thread Zhihong Wang
overheads 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/Mak

[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] [PATCH] doc: virtio pmd versions

2016-04-20 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 --

[dpdk-dev] [PATCH] optimize vhost enqueue

2016-08-15 Thread Zhihong Wang
g behavior 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 fil

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

2016-08-18 Thread Zhihong Wang
: 1. 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: opt

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

[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 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 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 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 v3 0/5] vhost: optimize enqueue

2016-08-19 Thread Zhihong Wang
1. Split 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 acc

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

2016-08-29 Thread Zhihong Wang
ple 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 lib/librte_vhost/vhost-net.h | 6 +- li

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

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

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

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

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

2016-08-29 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 6/6] vhost: optimize cache access

2016-08-29 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] eal/x86: Fix build with clang for old AVX

2016-02-03 Thread Zhihong Wang
x86: tune memcpy for 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_mem

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

2016-05-24 Thread Zhihong Wang
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] maintainers: resign from virtio and vhost

2020-10-14 Thread Zhihong Wang
I'm resigning from DPDK virtio and vhost maintainer as I'm leaving Intel. Sincerely thank Maxime, Chenbo and the community for all the support. Signed-off-by: Zhihong Wang --- MAINTAINERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index cdaf0b05c.

<    1   2