diff mbox series

[4/5] test: l2fwd script: limit number of generator cpus

Message ID 1486556381-22233-5-git-send-email-petri.savolainen@linaro.org
State Accepted
Commit 0c3ee63ae7b133defa2e74d2573f541d68dae040
Headers show
Series Packet test fixes | expand

Commit Message

Petri Savolainen Feb. 8, 2017, 12:19 p.m. UTC
During 'make check' run generator on up to four cpus. Generator on
all cpus was an overkill compared to l2fwd on two cpus. Generator
and l2fwd still share cpus (on odp-linux) as cpumask_default_worker()
returns the same cpumask for both.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
 test/common_plat/performance/odp_l2fwd_run.sh | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

-- 
2.8.1
diff mbox series

Patch

diff --git a/test/common_plat/performance/odp_l2fwd_run.sh b/test/common_plat/performance/odp_l2fwd_run.sh
index 757cf53..dd42ede 100755
--- a/test/common_plat/performance/odp_l2fwd_run.sh
+++ b/test/common_plat/performance/odp_l2fwd_run.sh
@@ -66,12 +66,14 @@  run_l2fwd()
 		exit 1
 	fi
 
-	#@todo: limit odp_generator to cores
-	#https://bugs.linaro.org/show_bug.cgi?id=1398
+	# Max 4 workers
+	# @todo: ensure that generator and l2fwd workers are not allocated to
+	# the same CPUs
 	(odp_generator${EXEEXT} --interval $FLOOD_MODE -I $IF0 \
 			--srcip 192.168.0.1 --dstip 192.168.0.2 \
-			-m u 2>&1 > /dev/null) \
+			-m u -w 4 2>&1 > /dev/null) \
 			2>&1 > /dev/null &
+
 	GEN_PID=$!
 
 	# this just turns off output buffering so that you still get periodic
@@ -82,6 +84,8 @@  run_l2fwd()
 		STDBUF=
 	fi
 	LOG=odp_l2fwd_tmp.log
+
+	# Max 2 workers
 	$STDBUF odp_l2fwd${EXEEXT} -i $IF1,$IF2 -m 0 -t 30 -c 2 | tee $LOG
 	ret=$?