From dc5783816136f5569622193cdaba22571b20d81e Mon Sep 17 00:00:00 2001 From: Ivan Koveshnikov Date: Mon, 29 Mar 2021 17:38:01 +0500 Subject: trafgen: allow to use a range of CPUs starting from any CPU Signed-off-by: Ivan Koveshnikov --- trafgen.8 | 16 +++++++++++---- trafgen.c | 70 +++++++++++++++++++++++++++++++++++++++++---------------------- 2 files changed, 58 insertions(+), 28 deletions(-) diff --git a/trafgen.8 b/trafgen.8 index 1b032b2..97b9479 100644 --- a/trafgen.8 +++ b/trafgen.8 @@ -131,11 +131,15 @@ than one packet is defined in a packet configuration, packets are scheduled for transmission in a round robin fashion. With this option, they are selected randomly instread. .TP -.B -P , --cpus +.B -P [-], --cpus [-] Specify the number of processes trafgen shall .BR fork (2) -off. By default trafgen will start as many processes as CPUs that are online and -pin them to each, respectively. Allowed value must be within interval [1,CPUs]. +off or list exact CPUs to use. By default trafgen will start as many processes +as CPUs that are online and pin them to each, respectively. A single integer +within interval [1,CPUs] overrides number of processes, which will be spawned +starting from the first CPU. A pair of integers within interval [0,CPUs-1], and +separated using ''-'' represents an interval of CPUs, which will be used to +spawn worker processes. .TP .B -t