Skip to content

Commit

Permalink
flow-bypass: Set bypass thread to running state
Browse files Browse the repository at this point in the history
When running Suricata in XDP bypass mode (bypass: yes),

Suricata started up with error:
Error: threads: thread "FB" failed to start in time: flags 0003

"FB" thread does not transition from THV_INIT_DONE to THV_RUNNING.

Set "FB" thread THV_RUNNING state in BypassedFlowManager().

Bug: OISF#6254

Signed-off-by: Vincent Li <[email protected]>
  • Loading branch information
vincentmli authored and victorjulien committed Jan 17, 2024
1 parent 6896a93 commit f80d26d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/flow-bypass.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,14 @@ static TmEcode BypassedFlowManager(ThreadVars *th_v, void *thread_data)
if (!found)
return TM_ECODE_OK;

TmThreadsSetFlag(th_v, THV_RUNNING);

while (1) {
if (TmThreadsCheckFlag(th_v, THV_PAUSE)) {
TmThreadsSetFlag(th_v, THV_PAUSED);
TmThreadTestThreadUnPaused(th_v);
TmThreadsUnsetFlag(th_v, THV_PAUSED);
}
SCLogDebug("Dumping the table");
gettimeofday(&tv, NULL);
TIMEVAL_TO_TIMESPEC(&tv, &curtime);
Expand Down

0 comments on commit f80d26d

Please sign in to comment.