Re: [PATCH v6 2/3] examples: introduce new l2fwd-jobstats example
From: De Lara Guarch, Pablo <hidden>
Date: 2015-02-24 19:10:53
quoted hunk
-----Original Message----- From: Wodkowski, PawelX Sent: Tuesday, February 24, 2015 4:33 PM To: dev-VfR2kkLFssw@public.gmane.org; De Lara Guarch, Pablo Subject: [PATCH v6 2/3] examples: introduce new l2fwd-jobstats example This app demonstrate usage of new rte_jobstats library. It is basically the orginal l2fwd with following modifications to met library requirements: - main_loop() was split into two jobs: forward job and flush job. Logic for those jobs is almost the same as in original application. - stats is moved to rte_alarm callback to not introduce overhead of printing. - stats are expanded to show rte_jobstats statistics. - added new parameter '-l' to automatic thousands separator. Comparing original l2fwd and l2fwd-jobstats apps will show approach what is needed to properly write own application with rte_jobstats measurements. New available statistics: - Total and % of fwd and flush execution time - management time - overhead of rte_timer + overhead of rte_jobstats library - Idle time and % of time spent waiting for fwd or flush to be ready to execute. - per job execution time and period. Signed-off-by: Pawel Wodkowski <redacted> --- examples/Makefile | 1 + examples/l2fwd-jobstats/Makefile | 51 ++ examples/l2fwd-jobstats/main.c | 1040 ++++++++++++++++++++++++++++++++++++++ mk/rte.app.mk | 4 + 4 files changed, 1096 insertions(+) create mode 100644 examples/l2fwd-jobstats/Makefile create mode 100644 examples/l2fwd-jobstats/main.cdiff --git a/examples/Makefile b/examples/Makefile index 81f1d2f..e847ded 100644 --- a/examples/Makefile +++ b/examples/Makefile@@ -50,6 +50,7 @@ DIRS-$(CONFIG_RTE_MBUF_REFCNT) +=ip_fragmentation DIRS-$(CONFIG_RTE_MBUF_REFCNT) += ipv4_multicast DIRS-$(CONFIG_RTE_LIBRTE_KNI) += kni DIRS-y += l2fwd +DIRS-y += l2fwd-jobstats DIRS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += l2fwd-ivshmem DIRS-y += l3fwd DIRS-$(CONFIG_RTE_LIBRTE_ACL) += l3fwd-acldiff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile new file mode 100644 index 0000000..d57a0ae--- /dev/null +++ b/examples/l2fwd-jobstats/Makefile@@ -0,0 +1,51 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
Fix these dates. Plus, there was a conflict due to a recent commit, modifying examples/Makefile, so make sure you rebase ;) Thanks, Pablo