examples: new txburst application
PATCH 1/1 examples: new txburst application
Test application to transmit 32-packet bursts of 220-byte UDP packets every 50 us, approximating 240,000 pps. We found it useful for testing hypervisor performance for a transmit-heavy but bursty workload in a VM with DPDK.
--- examples/Makefile | 1 + examples/txburst/Makefile | 53 +++++++++ examples/txburst/burst.c | 221 +++++++++++++++++++++++++++++++++++ examples/txburst/burst.h | 55 +++++++++ examples/txburst/txburst.c | 278 ++++++++++++++++++++++++++++++++++++++++++++ examples/txburst/txburst.h | 40 +++++++ 6 files changed, 648 insertions(+), 0 deletions(-) create mode 100644 examples/txburst/Makefile create mode 100644 examples/txburst/burst.c create mode 100644 examples/txburst/burst.h create mode 100644 examples/txburst/txburst.c create mode 100644 examples/txburst/txburst.h
examples/Makefile +1 -0
@@ -62,6 +62,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_METER) += qos_meter DIRS-$(CONFIG_RTE_LIBRTE_SCHED) += qos_sched DIRS-y += quota_watermark DIRS-y += timer +DIRS-y += txburst DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost DIRS-$(CONFIG_RTE_LIBRTE_XEN_DOM0) += vhost_xen DIRS-y += vmdq
examples/txburst/Makefile new file +53 -0
53 lines not on this page · raw message
examples/txburst/burst.c new file +221 -0
221 lines not on this page · raw message
examples/txburst/burst.h new file +55 -0
55 lines not on this page · raw message
examples/txburst/txburst.c new file +278 -0
278 lines not on this page · raw message
examples/txburst/txburst.h new file +40 -0
@@ -0,0 +1,40 @@ +/********************************************************* +* Copyright (C) 2014 VMware, Inc. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +* SUCH DAMAGE. +* +*********************************************************/ + +#ifndef _MAIN_H_ +#define _MAIN_H_ + + +#ifdef RTE_EXEC_ENV_BAREMETAL +#define MAIN _main +#else +#define MAIN main +#endif + +int MAIN (int argc,char *argv[]); + +#endif /* ifndef _MAIN_H_ */
Signature · 1 line
1.7.1
A message that is not in the archive (sent off-list or not yet received): 1416335575-30717-1-git-send-email-bhavesh-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org
Hi Bhavesh,
2014-11-18 10:32, Bhavesh Davda:
Quoted 5 lines
Test application to transmit 32-packet bursts of 220-byte UDP packets every 50 us, approximating 240,000 pps. We found it useful for testing hypervisor performance for a transmit-heavy but bursty workload in a VM with DPDK.
Signed-off-by Bhavesh Davda <[email protected]>
There was no review of your patch.
Maybe you should explain why you think it should be integrated as an example. What is new compared to other examples?
Thanks
Signature · 1 line
Thomas
Hi Thomas,
Quoted 8 lines
Hi Bhavesh,
2014-11-18 10:32, Bhavesh Davda:
Quoted 1 line
Test application to transmit 32-packet bursts of 220-byte UDP packets
every
Quoted 1 line
50 us, approximating 240,000 pps. We found it useful for testing
hypervisor
Quoted 1 line
performance for a transmit-heavy but bursty workload in a VM with
Quoted 8 lines
DPDK.
Quoted 2 lines
Signed-off-by Bhavesh Davda <[email protected]>There was no review of your patch.
Maybe you should explain why you think it should be integrated as an example.
What is new compared to other examples?
[Bhavesh Davda] Thanks for catching that. I was wondering why nobody responded.
I leave it up to you and the wider DPDK community to decide if this example is useful. It was useful to us (VMware) and a couple of partner companies in reproducing a packet drop on transmit issue at a telco/NFV operator lab more easily than setting up the DPDK-based VNF from the vendor along with a hardware load generator to generate the application-specific packet load. It was much easier to just run this example application in a VM to reproduce the packet drop issue.
What is different? I didn't find any other simple apps that only mimic Tx bursty behavior similar to this application. Maybe I missed some example application that has such a capability.
Quoted 4 lines
Thanks
--
Thomas
A message that is not in the archive (sent off-list or not yet received): 72e5096b3711419f93a9161a20c9fa11-kzjMWN3NnNCWIEBtBWqfuiWTkRzJkiQl@public.gmane.org
2015-01-30 16:29, Bhavesh Davda:
Quoted 12 lines
Hi Thomas,
Quoted 10 lines
Hi Bhavesh,
2014-11-18 10:32, Bhavesh Davda:
Quoted 1 line
Test application to transmit 32-packet bursts of 220-byte UDP packets
every
Quoted 1 line
50 us, approximating 240,000 pps. We found it useful for testing
hypervisor
Quoted 1 line
performance for a transmit-heavy but bursty workload in a VM with
DPDK.
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Signed-off-by Bhavesh Davda <[email protected]>There was no review of your patch.
Maybe you should explain why you think it should be integrated as an example.
What is new compared to other examples?[Bhavesh Davda] Thanks for catching that. I was wondering why nobody
responded.
Quoted 9 lines
I leave it up to you and the wider DPDK community to decide if this example is useful. It was useful to us (VMware) and a couple of partner companies in reproducing a packet drop on transmit issue at a telco/NFV operator lab more easily than setting up the DPDK-based VNF from the vendor along with a hardware load generator to generate the application-specific packet load. It was much easier to just run this example application in a VM to reproduce the packet drop issue.
Quoted 3 lines
What is different? I didn't find any other simple apps that only mimic Tx bursty behavior similar to this application. Maybe I missed some example application that has such a capability.
Did you know pktgen-dpdk?
http://dpdk.org/browse/apps/pktgen-dpdk/tree/README.md
Do you think it could replace your application?
Signature · 1 line
Thomas
Quoted 5 lines
Did you know pktgen-dpdk?
http://dpdk.org/browse/apps/pktgen-dpdk/tree/README.mdDo you think it could replace your application?
[Bhavesh Davda] Yes, I regularly use pktgen-dpdk, and love the app (thanks Keith!) but I couldn't quite get it to do this simplistic job of generating a stream of X-byte UDP packets in burst of Y spread apart by Z microseconds.
A message that is not in the archive (sent off-list or not yet received): e679dd353cf2450ea98f459bf042db43-kzjMWN3NnNCWIEBtBWqfuiWTkRzJkiQl@public.gmane.org
Sent from my iPhone
Quoted 6 lines · Bhavesh Davda
Quoted 4 lines
Did you know pktgen-dpdk?
http://dpdk.org/browse/apps/pktgen-dpdk/tree/README.mdDo you think it could replace your application?
[Bhavesh Davda] Yes, I regularly use pktgen-dpdk, and love the app (thanks Keith!) but I couldn't quite get it to do this simplistic job of generating a stream of X-byte UDP packets in burst of Y spread apart by Z microseconds.
Hmmm, sounds like an enhancement request to pktgen is needed here. I will look at adding it to pktgen and it is up to everyone if the example is reasonable to have. For me it does seem reasonable to include as it maybe simpler to setup, but if and when I can add that support to pktgen it may no longer be needed.
Let me have a look at adding the support and will let you guys know next week.
Thanks Keith
A message that is not in the archive (sent off-list or not yet received): 3AD66C8B-4AF4-494C-8CDE-85DFFDE16C15-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Quoted 16 lines · Keith
Sent from my iPhone
Quoted 9 lines · Bhavesh Davda
Quoted 4 lines
Did you know pktgen-dpdk?
http://dpdk.org/browse/apps/pktgen-dpdk/tree/README.mdDo you think it could replace your application?
[Bhavesh Davda] Yes, I regularly use pktgen-dpdk, and love the app (thanks Keith!) but I couldn't quite get it to do this simplistic job of generating a stream of X-byte UDP packets in burst of Y spread apart by Z microseconds.
Quoted 8 lines
Hmmm, sounds like an enhancement request to pktgen is needed here. I will look at adding it to pktgen and it is up to everyone if the example is reasonable to have. For me it does seem reasonable to include as it maybe simpler to setup, but if and when I can add that support to pktgen it may no longer be needed.
Let me have a look at adding the support and will let you guys know next week.
Looking at the txburst code and your description needing to send a burst of 220 byte UDP packets with an interval of 50us is mostly doable via Pktgen. In Pktgen you can setup a packet 220+UDP+other parameters already in single packet mode or sequence mode. You can set the rate at a given percentage per second of packets, but you can not set the interval rate between burst easily. The number of packets in a burst is also adjustable via the burst command ¹set <portlist> burst <value>'.
Did I describe the problem here correctly?
The current percentage rate is in whole numbers in Pktgen may not be fine enough gain rate for some tests. I do have in Pktgen a way to adjust the time between burst of packets using a debug command to fine tune the number of clock ticks (HPET) to a given number ¹set <portlist> tx_cycles <value>', would that command be useful and solve your given test case?
The tx_cycles option is not listed in the help text :-) Maybe I should make it not hidden.
Quoted 2 lines
Thanks Keith