diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-11-24 14:12:31 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-11-24 14:12:31 +0100 |
commit | 5cac312a213b527080b3d87278fc6762e62533fb (patch) | |
tree | 1b0269f8d312e5b7b536e371d6ecaf82c857bad5 /trafgen.c | |
parent | b7ee1387d5375dee1b54fc465c60f0d487860a45 (diff) |
trafgen: Preprocess packets directly after compiling
No need to duplicate the call to preprocess_packets(), just call it
directly after compile_packets()/compile_packets_str().
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen.c')
-rw-r--r-- | trafgen.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -556,8 +556,6 @@ static void xmit_slowpath_or_die(struct ctx *ctx, unsigned int cpu, unsigned lon drop_privileges(ctx->enforce, ctx->uid, ctx->gid); - preprocess_packets(); - bug_on(gettimeofday(&start, NULL)); while (likely(sigint == 0 && num > 0 && plen > 0)) { @@ -647,8 +645,6 @@ static void xmit_fastpath_or_die(struct ctx *ctx, unsigned int cpu, unsigned lon if (ctx->num == 0 && orig_num > 0) num = 0; - preprocess_packets(); - bug_on(gettimeofday(&start, NULL)); while (likely(sigint == 0 && num > 0 && plen > 0)) { @@ -834,6 +830,8 @@ static void main_loop(struct ctx *ctx, char *confname, bool slow, else compile_packets(confname, ctx->verbose, cpu, invoke_cpp); + preprocess_packets(); + xmit_packet_precheck(ctx, cpu); if (cpu == 0) { |