Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detect: Inline default pkt inspect engines #10201

Conversation

coledishington
Copy link
Contributor

Scenarios with a small number of rules, no MPM-based rules, experienced a 6%-14% performance degradation from the commit 0965afd detect: pkt inspect engines
inwhich the default pkt inspect engines were converted to callbacks to simplify adding extra pkt inspect engines.

Avoid adding the default pkt inspect engines to the callback chain and instead call them directly in an inlined function within DetectRulePacketRules().

Bug: #6291

Make sure these boxes are signed before submitting your Pull Request -- thank you.

Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/6291

Describe changes:
Updated from Suricata 4.0.6 to Suricata 7, this performance degradation was noticed on a setup with the following:

  • 176 signatures
  • 3 are inspecting packet payload
  • 33 inspect application layer
  • 83 are decoder event only
    This performance impact was significant when running a small number of lightweight rules, but was not significant on larger (and more heavy-duty) rule sets.

The changes make the default packet inspection engines inline, like they were in Suricata 4 before extra packet inspection engines were supported.

Provide values to any of the below to override the defaults.

No Suricata-verify test.

Scenarios with a small number of rules, no MPM-based rules,
experienced a 6%-14% performance degradation from the commit
0965afd detect: pkt inspect engines
inwhich the default pkt inspect engines were converted to callbacks to
simplify adding extra pkt inspect engines.

Avoid adding the default pkt inspect engines to the callback chain and
instead call them directly in an inlined function within
DetectRulePacketRules().

Bug: OISF#6291
@coledishington
Copy link
Contributor Author

Missed changes. Replaced by #10202.

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.

1 participant