Skip to content

Commit

Permalink
flowworker: simplify pseudo packet use
Browse files Browse the repository at this point in the history
Pseudo packets originating in the flow worker do not need to leave the
flow worker. Putting those in the ThreadVars::decode_pq will make them
be evaluated by the next steps in the pipeline, but those will all
ignore pseudo packets.

Instead, this patch returns them to the packet pool, while still honoring
the IPS verdict logic.

(cherry picked from commit 3247e39)
  • Loading branch information
victorjulien committed Oct 17, 2023
1 parent 0f097ac commit 7989e3c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/flow-worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,13 @@ static inline void FlowWorkerStreamTCPUpdate(ThreadVars *tv, FlowWorkerThreadDat
/* no need to keep a flow ref beyond this point */
FlowDeReference(&x->flow);

/* no further work to do for this pseudo packet, so we can return
* it to the pool immediately. */
if (timeout) {
PacketPoolReturnPacket(x);
} else {
/* put these packets in the preq queue so that they are
* by the other thread modules before packet 'p'. */
PacketEnqueueNoLock(&tv->decode_pq, x);
/* to support IPS verdict logic, in the non-timeout case we need to do a bit more */
TmqhOutputPacketpool(tv, x);
}
}
}
Expand Down

0 comments on commit 7989e3c

Please sign in to comment.