Skip to content

af-packet: speed up thread sync during startup#11806

Closed
victorjulien wants to merge 1 commit intoOISF:masterfrom
victorjulien:af-packet-startup/v2
Closed

af-packet: speed up thread sync during startup#11806
victorjulien wants to merge 1 commit intoOISF:masterfrom
victorjulien:af-packet-startup/v2

Conversation

@victorjulien
Copy link
Member

Threads are initialized sequentially to allow for a predictable mapping of threads and queues. Not all parts of the start up need to be done sequentially. The setting up of the rings can be very expensive, taking of a couple of hundred milliseconds. The ring setup doesn't need to be done sequentially though.

This patch releases the thread early, after bind but before the ring setups.

Replaces #11189

Threads are initialized sequentially to allow for a predictable mapping
of threads and queues. Not all parts of the start up need to be done
sequentially. The setting up of the rings can be very expensive, taking
of a couple of hundred milliseconds. The ring setup doesn't need to be
done sequentially though.

This patch releases the thread early, after bind but before the ring
setups.
@codecov
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (master@1420c83). Learn more about missing BASE report.
Report is 33 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #11806   +/-   ##
=========================================
  Coverage          ?   82.60%           
=========================================
  Files             ?      919           
  Lines             ?   249008           
  Branches          ?        0           
=========================================
  Hits              ?   205701           
  Misses            ?    43307           
  Partials          ?        0           
Flag Coverage Δ
fuzzcorpus 60.47% <0.00%> (?)
livemode 18.83% <75.00%> (?)
pcap 44.12% <0.00%> (?)
suricata-verify 61.88% <0.00%> (?)
unittests 58.99% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 22758

Copy link
Contributor

@catenacyber catenacyber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work. Should there be a ticket ?

CI : ok
Commits segmentation : ok
Commit messages : ok, except there is no redmine ticket id ?
Git ID set : ok
CLA : you already contributed
Doc update : not needed
Redmine ticket : 🟡 there should be one, right ?
Rustfmt : no rust
Tests : I do not think we have a good way to test such optimizations, do we ?
Dependencies added: none
Code : good

@victorjulien
Copy link
Member Author

Replaced by #11828

@victorjulien victorjulien deleted the af-packet-startup/v2 branch January 15, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants