From de1c73dcbd242682ec05714238052ecb8ec570d4 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Sun, 6 Jan 2013 23:18:30 +0100 Subject: [PATCH] trafgen: when using a inter-pkt-gap > 0, use only 1 core It's slow anyway, so no need to multithread; therefore, we have a correct interpacket gap. Signed-off-by: Daniel Borkmann --- src/trafgen.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/trafgen.c b/src/trafgen.c index 40c4f46a..30fa1f73 100644 --- a/src/trafgen.c +++ b/src/trafgen.c @@ -507,6 +507,9 @@ int main(int argc, char **argv) case 't': slow = true; ctx.gap = strtoul(optarg, NULL, 0); + if (ctx.gap > 0) + /* Fall back to single core to have correct timing */ + cpus = 1; break; case 'S': ptr = optarg; -- 2.11.4.GIT