From 2caeb8c0141dcf488f2d68aa8e8c44d1f85ed28b Mon Sep 17 00:00:00 2001 From: Pawel Wodkowski Date: Tue, 24 Feb 2015 17:33:24 +0100 Subject: [PATCH] examples/l2fwd-jobstats: new 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 Acked-by: Pablo de Lara --- examples/Makefile | 1 + mk/rte.app.mk | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/examples/Makefile b/examples/Makefile index 3c241537a0..d5490266b2 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -52,6 +52,7 @@ DIRS-y += ipv4_multicast DIRS-$(CONFIG_RTE_LIBRTE_KNI) += kni DIRS-y += l2fwd DIRS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += l2fwd-ivshmem +DIRS-$(CONFIG_RTE_LIBRTE_JOBSTATS) += l2fwd-jobstats DIRS-y += l3fwd DIRS-$(CONFIG_RTE_LIBRTE_ACL) += l3fwd-acl DIRS-$(CONFIG_RTE_LIBRTE_POWER) += l3fwd-power diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 5a93b466a4..2d90a4fc83 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -107,6 +107,10 @@ ifeq ($(CONFIG_RTE_LIBRTE_HASH),y) LDLIBS += -lrte_hash endif +ifeq ($(CONFIG_RTE_LIBRTE_JOBSTATS),y) +LDLIBS += -lrte_jobstats +endif + ifeq ($(CONFIG_RTE_LIBRTE_LPM),y) LDLIBS += -lrte_lpm endif