flow: avoid double state update on reuse

Avoids an unnecessary atomic operation.
pull/5247/head
Victor Julien 5 years ago
parent fd2dff8542
commit 9b13c1b804

@ -574,6 +574,7 @@ static Flow *TcpReuseReplace(ThreadVars *tv, DecodeThreadVars *dtv,
FlowInit(f, p);
f->flow_hash = hash;
f->fb = fb;
FlowUpdateState(f, FLOW_STATE_NEW);
f->thread_id[0] = thread_id[0];
f->thread_id[1] = thread_id[1];
@ -952,8 +953,6 @@ static Flow *FlowGetUsedFlow(ThreadVars *tv, DecodeThreadVars *dtv)
FlowClearMemory(f, f->protomap);
FlowUpdateState(f, FLOW_STATE_NEW);
FLOWLOCK_UNLOCK(f);
return f;
}

Loading…
Cancel
Save