, 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
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
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
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
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
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
.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
. 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
+++
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 |
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
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_
> 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
>
> ---
>
> 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
.
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
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
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
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
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
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
. 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
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
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
. 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
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 - 100 of 104 matches
Mail list logo