testpmd: simulating noisy host environment
v3 cover testpmd: simulating noisy host environment
This series adds a new forwarding mode 'noisy'. It proposes enhancements to testpmd to simulate more realistic behavior of a guest machine engaged in receiving and sending packets performing Virtual Network Function (VNF).
The goal is to enable simple of measuring performance impact on cache and memory footprint utilization from various VNF co-located on the same host machine.
This series of patches adds the new command line switches to testpmd:
--noisy-buffersize-before-sending [packet numbers]
Keep the mbuf in a FIFO and forward the over flooding packets from the FIFO. This queue is per TX-queue (after all other packet processing).
--noisy-flush-timeout [delay]
Flush the packet queue if no packets have been seen during [delay]. As long as packets are seen, the timer is reset.
Options to simulate route lookups:
--noisy-memory-footprint [size]
Size of the VNF internal memory (MB), in which the random read/write will be done, allocated by rte_malloc (hugepages).
--noisy-nb-rnd-write [num]
Number of random writes in memory per packet should be performed, simulating hit-flags update. 64 bits per write, all write in different cache lines.
--noisy-nb-rnd-read [num]
Number of random reads in memory per packet should be performed, simulating FIB/table lookups. 64 bits per read, all write in different cache lines.
--noisy-nb-rnd-read-write [num]
Number of random reads and writes in memory per packet should be performed, simulating stats update. 64 bits per read-write, all reads and writes in different cache lines.
Comments are appreciated.
regards,
Jens
Jens Freimann (2):
testpmd: add forwarding mode to simulate a noisy neighbour
testpmd: update testpmd documentation to include noisy forwarding mode
app/test-pmd/Makefile | 1 + app/test-pmd/noisy_vnf.c | 184 ++++++++++++++++++++++++++++ app/test-pmd/noisy_vnf.h | 41 +++++++ app/test-pmd/parameters.c | 55 ++++++++- app/test-pmd/testpmd.c | 68 ++++++++++ app/test-pmd/testpmd.h | 17 +++ doc/guides/testpmd_app_ug/run_app.rst | 27 ++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 7 +- 8 files changed, 397 insertions(+), 3 deletions(-) create mode 100644 app/test-pmd/noisy_vnf.c create mode 100644 app/test-pmd/noisy_vnf.h
Signature · 1 line
2.14.3
PATCH v3 1/2 testpmd: add forwarding mode to simulate a noisy neighbour
This adds a new forwarding mode to testpmd to simulate more realistic behavior of a guest machine engaged in receiving and sending packets performing Virtual Network Function (VNF).
The goal is to enable a simple way of measuring performance impact on cache and memory footprint utilization from various VNF co-located on the same host machine. For this it does:
* Buffer packets in a FIFO:
Create a fifo to buffer received packets. Once it flows over put those packets into the actual tx queue. The fifo is created per tx queue and its size can be set with the --buffersize-before-sending commandline parameter.
A second commandline parameter is used to set a timeout in milliseconds after which the fifo is flushed.
--noisy-buffersize-before-sending [packet numbers]
Keep the mbuf in a FIFO and forward the over flooding packets from the FIFO. This queue is per TX-queue (after all other packet processing).
--noisy-flush-timeout [delay]
Flush the packet queue if no packets have been seen during [delay]. As long as packets are seen, the timer is reset.
Add several options to simulate route lookups (memory reads) in tables that can be quite large, as well as route hit statistics update. These options simulates the while stack traversal and
will trash the cache. Memory access is random.
* simulate route lookups:
Allocate a buffer and perform reads and writes on it as specified by commandline options:
--noisy-memory-footprint [size]
Size of the VNF internal memory (MB), in which the random read/write will be done, allocated by rte_malloc (hugepages).
--noisy-nb-rnd-write [num]
Number of random writes in memory per packet should be performed, simulating hit-flags update. 64 bits per write, all write in different cache lines.
--noisy-nb-rnd-read [num]
Number of random reads in memory per packet should be performed, simulating FIB/table lookups. 64 bits per read, all write in different cache lines.
--noisy-nb-rnd-read-write [num]
Number of random reads and writes in memory per packet should be performed, simulating stats update. 64 bits per read-write, all reads and writes in different cache lines.
--- app/test-pmd/Makefile | 1 + app/test-pmd/noisy_vnf.c | 184 ++++++++++++++++++++++++++++++++++++++++++++++ app/test-pmd/noisy_vnf.h | 41 +++++++++++ app/test-pmd/parameters.c | 55 +++++++++++++- app/test-pmd/testpmd.c | 68 +++++++++++++++++ app/test-pmd/testpmd.h | 17 +++++ 6 files changed, 365 insertions(+), 1 deletion(-) create mode 100644 app/test-pmd/noisy_vnf.c create mode 100644 app/test-pmd/noisy_vnf.h
app/test-pmd/Makefile +1 -0
@@ -32,6 +32,7 @@ SRCS-y += rxonly.c SRCS-y += txonly.c SRCS-y += csumonly.c SRCS-y += icmpecho.c +SRCS-y += noisy_vnf.c SRCS-$(CONFIG_RTE_LIBRTE_IEEE1588) += ieee1588fwd.c ifeq ($(CONFIG_RTE_LIBRTE_PMD_SOFTNIC)$(CONFIG_RTE_LIBRTE_SCHED),yy)
app/test-pmd/noisy_vnf.c new file +184 -0
184 lines not on this page · raw message
app/test-pmd/noisy_vnf.h new file +41 -0
41 lines not on this page · raw message
app/test-pmd/parameters.c +54 -1
67 lines not on this page · raw message
app/test-pmd/testpmd.c +68 -0
110 lines not on this page · raw message
app/test-pmd/testpmd.h +17 -0
@@ -9,6 +9,7 @@#include <rte_bus_pci.h> #include <rte_gro.h> #include <rte_gso.h> +#include "noisy_vnf.h" #define RTE_PORT_ALL (~(portid_t)0x0)
@@ -109,6 +110,14 @@ struct fwd_stream {#endif }; +struct noisy_config { +struct rte_ring *f; +uint64_t prev_time; +char *vnf_mem; +}; +struct noisy_config *noisy_cfg; + +/** Descriptor for a single flow. */ struct port_flow {size_t size;/**< Allocated space including data[]. */
@@ -251,6 +260,7 @@ extern struct fwd_engine rx_only_engine;extern struct fwd_engine tx_only_engine;extern struct fwd_engine csum_fwd_engine;extern struct fwd_engine icmp_echo_engine; +extern struct fwd_engine noisy_vnf_engine;#ifdef TM_MODE extern struct fwd_engine softnic_tm_engine;extern struct fwd_engine softnic_tm_bypass_engine;
@@ -382,6 +392,13 @@ extern int8_t rx_drop_en;extern int16_t tx_free_thresh;extern int16_t tx_rs_thresh; +extern uint16_t noisy_bsize_before_send; +extern uint16_t noisy_flush_timer; +extern uint64_t noisy_vnf_memory_footprint; +extern uint64_t noisy_nb_rnd_write; +extern uint64_t noisy_nb_rnd_read; +extern uint64_t noisy_nb_rnd_read_write; +extern uint8_t dcb_config;extern uint8_t dcb_test;
Signature · 1 line
2.14.3
Re: [PATCH 1/2] testpmd: add forwarding mode to simulate a noisy neighbour
Hi Jens,
Quoted 59 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Jens Freimann
Sent: Thursday, April 19, 2018 8:00 AM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; Richardson, Bruce <[email protected]>; [email protected]; [email protected]; Ananyev, Konstantin <[email protected]>; Yigit, Ferruh <[email protected]>
Subject: [dpdk-dev] [PATCH 1/2] testpmd: add forwarding mode to simulate a noisy neighbourThis adds a new forwarding mode to testpmd to simulate more realistic behavior of a guest machine engaged in receiving and sending packets performing Virtual Network Function (VNF).
The goal is to enable a simple way of measuring performance impact on cache and memory footprint utilization from various VNF co-located on the same host machine. For this it does:
* Buffer packets in a FIFO:
Create a fifo to buffer received packets. Once it flows over put those packets into the actual tx queue. The fifo is created per tx queue and its size can be set with the --buffersize-before-sending commandline parameter.
A second commandline parameter is used to set a timeout in milliseconds after which the fifo is flushed.
--noisy-buffersize-before-sending [packet numbers] Keep the mbuf in a FIFO and forward the over flooding packets from the FIFO. This queue is per TX-queue (after all other packet processing).
--noisy-flush-timeout [delay]
Flush the packet queue if no packets have been seen during [delay]. As long as packets are seen, the timer is reset.Add several options to simulate route lookups (memory reads) in tables that can be quite large, as well as route hit statistics update. These options simulates the while stack traversal and will trash the cache. Memory access is random.
* simulate route lookups:
Allocate a buffer and perform reads and writes on it as specified by commandline options:
--noisy-memory-footprint [size]
Size of the VNF internal memory (MB), in which the random read/write will be done, allocated byrte_malloc(hugepages).--noisy-nb-rnd-write [num]
Number of random writes in memory per packet should be performed, simulating hit-flags update. 64 bits per write, all write in different cache lines.--noisy-nb-rnd-read [num]
Number of random reads in memory per packet should be performed, simulating FIB/table lookups. 64 bits per read, all write in different cache lines.
Quoted 7 lines
--noisy-nb-rnd-read-write [num]
Number of random reads and writes in memory per packet should be performed, simulating stats update. 64 bits per read-write, all reads and writes in different cache lines.Signed-off-by Jens Freimann <[email protected]>---
<snip>
This patch fails to apply to dpdk_18_08.rc0
checkpatch.pl reports 7 errors and 15 warnings.
Regards,
Bernard.
PATCH v3 2/2 testpmd: update testpmd documentation to include noisy forwarding mode
In reply to Jens Freimann--- doc/guides/testpmd_app_ug/run_app.rst | 27 +++++++++++++++++++++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 7 +++++-- 2 files changed, 32 insertions(+), 2 deletions(-)
doc/guides/testpmd_app_ug/run_app.rst +27 -0
@@ -340,6 +340,7 @@ The commandline options are: icmpecho ieee1588 tm + noisy * ``--rss-ip``
@@ -479,3 +480,29 @@ The commandline options are: Set the hexadecimal bitmask of TX queue offloads. The default value is 0. + +* ``--noisy-buffersize-before-sending=N`` + + Set the number of maximum elements of the FIFO queue to be created + for buffering packets. Only available with the noisy forwarding mode. + The default value is 0. + +* ``--noisy-flush-timeout=N`` + + Set the size of the FIFO queue to be created for buffering packets. + Only available with the noisy forwarding mode. The default value is 0. + +* ``--noisy-nb-rnd-read=N`` + + Set the number of reads to be done in noisy neighbour simulation memory buffer. + Only available with the noisy forwarding mode. The default value is 0. + +* ``--noisy-nb-rnd-write=N`` + + Set the number of writes to be done in noisy neighbour simulation memory buffer. + Only available with the noisy forwarding mode. The default value is 0. + +* ``--noisy-nb-rnd-write=N`` + + Set the number of r/w access to be done in noisy neighbour simulation memory buffer. + Only available with the noisy forwarding mode. The default value is 0.
doc/guides/testpmd_app_ug/testpmd_funcs.rst +5 -2
@@ -289,7 +289,7 @@ set fwd Set the packet forwarding mode:: testpmd> set fwd (io|mac|macswap|flowgen| \ - rxonly|txonly|csum|icmpecho) (""|retry) + rxonly|txonly|csum|icmpecho|noisy) (""|retry) ``retry`` can be specified for forwarding engines except ``rx_only``.
@@ -327,8 +327,11 @@ The available information categories are: also modify the default hierarchy or specify the new hierarchy through CLI for implementing QoS scheduler. Requires ``CONFIG_RTE_LIBRTE_PMD_SOFTNIC=y`` ``CONFIG_RTE_LIBRTE_SCHED=y``. -Example:: +* ``noisy``: Noisy neighbour simulation. + Simulate more realistic behavior of a guest machine engaged in receiving + and sending packets performing Virtual Network Function (VNF). +Example:: testpmd> set fwd rxonly Set rxonly packet forwarding mode
Signature · 1 line
2.14.3
Hi Jens,
<snip>
Quoted 44 lines
Subject: [dpdk-dev] [PATCH v3 0/2] testpmd: simulating noisy host environment
This series adds a new forwarding mode 'noisy'. It proposes enhancements to testpmd to simulate more realistic behavior of a guest machine engaged in receiving and sending packets performing Virtual Network Function (VNF).
The goal is to enable simple of measuring performance impact on cache and memory footprint utilization from various VNF co-located on the same host machine.
This series of patches adds the new command line switches to testpmd:
--noisy-buffersize-before-sending [packet numbers]
Keep the mbuf in a FIFO and forward the over flooding packets from the FIFO. This queue is per TX-queue (after all other packet processing).
--noisy-flush-timeout [delay]
Flush the packet queue if no packets have been seen during [delay]. As long as packets are seen, the timer is reset.Options to simulate route lookups:
--noisy-memory-footprint [size]
Size of the VNF internal memory (MB), in which the random read/write will be done, allocated byrte_malloc(hugepages).--noisy-nb-rnd-write [num]
Number of random writes in memory per packet should be performed, simulating hit-flags update. 64 bits per write, all write in different cache lines.--noisy-nb-rnd-read [num]
Number of random reads in memory per packet should be performed, simulating FIB/table lookups. 64 bits per read, all write in different cache lines.--noisy-nb-rnd-read-write [num]
Number of random reads and writes in memory per packet should be performed, simulating stats update. 64 bits per read-write, all reads and writes in different cache lines.
Quoted 5 lines
Comments are appreciated.
regards,
Jens
<snip>
This patch set does not apply to the current master branch, could you rebase please to the latest master branch.
Regards,
Bernard.
Hi Bernard,
Quoted 48 lines · Bernard
Hi Jens,
<snip>
Quoted 44 lines
Subject: [dpdk-dev] [PATCH v3 0/2] testpmd: simulating noisy host environment
This series adds a new forwarding mode 'noisy'. It proposes enhancements to testpmd to simulate more realistic behavior of a guest machine engaged in receiving and sending packets performing Virtual Network Function (VNF).
The goal is to enable simple of measuring performance impact on cache and memory footprint utilization from various VNF co-located on the same host machine.
This series of patches adds the new command line switches to testpmd:
--noisy-buffersize-before-sending [packet numbers]
Keep the mbuf in a FIFO and forward the over flooding packets from the FIFO. This queue is per TX-queue (after all other packet processing).
--noisy-flush-timeout [delay]
Flush the packet queue if no packets have been seen during [delay]. As long as packets are seen, the timer is reset.Options to simulate route lookups:
--noisy-memory-footprint [size]
Size of the VNF internal memory (MB), in which the random read/write will be done, allocated byrte_malloc(hugepages).--noisy-nb-rnd-write [num]
Number of random writes in memory per packet should be performed, simulating hit-flags update. 64 bits per write, all write in different cache lines.--noisy-nb-rnd-read [num]
Number of random reads in memory per packet should be performed, simulating FIB/table lookups. 64 bits per read, all write in different cache lines.--noisy-nb-rnd-read-write [num]
Number of random reads and writes in memory per packet should be performed, simulating stats update. 64 bits per read-write, all reads and writes in different cache lines.
Quoted 8 lines
Quoted 5 lines
Comments are appreciated.
regards,
Jens<snip>
This patch set does not apply to the current master branch, could you rebase please to the latest master branch.
As Jens isn't available until mid-July, I'll take care to rebase it.
Thanks for the notification,
Maxime
Quoted 4 lines
Regards,
Bernard.