threading: improve/add thread queues explanations

pull/8085/head
Victor Julien 3 years ago
parent 951bcde0b2
commit b07c7ad14c

@ -78,7 +78,8 @@ typedef struct FlowWorkerThreadData_ {
uint16_t local_bypass_bytes;
uint16_t both_bypass_pkts;
uint16_t both_bypass_bytes;
/** Queue to put pseudo packets that have been created by the stream (RST response) and by the
* flush logic following a protocol change. */
PacketQueueNoLock pq;
FlowLookupStruct fls;
@ -401,7 +402,7 @@ static inline void FlowWorkerStreamTCPUpdate(ThreadVars *tv, FlowWorkerThreadDat
if (timeout) {
PacketPoolReturnPacket(x);
} else {
/* put these packets in the preq queue so that they are
/* put these packets in the decode queue so that they are processed
* by the other thread modules before packet 'p'. */
PacketEnqueueNoLock(&tv->decode_pq, x);
}

@ -104,8 +104,10 @@ typedef struct ThreadVars_ {
void *outctx;
void (*tmqh_out)(struct ThreadVars_ *, struct Packet_ *);
/** queue for decoders to temporarily store extra packets they
* generate. */
/** Queue for decoders to temporarily store extra packets they
* generate. These packets are generated as part of the tunnel
* handling, and are processed directly after the "real" packet
* from the current position in the pipeline. */
PacketQueueNoLock decode_pq;
/** Stream packet queue for flow time out injection. Either a pointer to the

@ -125,7 +125,7 @@ TmEcode TmThreadsSlotVarRun(ThreadVars *tv, Packet *p, TmSlot *slot)
return TM_ECODE_FAILED;
}
/* handle new packets */
/* handle new pseudo packets immediately */
while (tv->decode_pq.top != NULL) {
Packet *extra_p = PacketDequeueNoLock(&tv->decode_pq);
if (unlikely(extra_p == NULL))

Loading…
Cancel
Save