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-engine-iponly: improve ip list performance - v4 #10352

Conversation

cccs-sadugas
Copy link
Contributor

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

Link to redmine ticket:

Describe changes:

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

To use a pull request use a branch name like pr/N where N is the
pull request number.

Alternatively, SV_BRANCH may also be a link to an
OISF/suricata-verify pull-request.

SV_REPO=
SV_BRANCH=
SU_REPO=
SU_BRANCH=
LIBHTP_REPO=
LIBHTP_BRANCH=

The runtime complexity of insertion sort is approx. O(h*n)^2 where
h is the size of the HOME_NET and n is the number of ip only rules
that use the HOME_NET.

Replacing this with qsort significantly improves rule load time when
a large HOME_NET is used in combination with a moderate amount of ip
only rules.
Copy link

github-actions bot commented Feb 9, 2024

NOTE: This PR may contain new authors.

Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (7e4dba7) 82.32% compared to head (212f21b) 82.32%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10352      +/-   ##
==========================================
- Coverage   82.32%   82.32%   -0.01%     
==========================================
  Files         978      978              
  Lines      272147   272189      +42     
==========================================
+ Hits       224057   224090      +33     
- Misses      48090    48099       +9     
Flag Coverage Δ
fuzzcorpus 63.59% <94.87%> (+<0.01%) ⬆️
suricata-verify 61.47% <94.87%> (-0.02%) ⬇️
unittests 62.83% <82.69%> (+<0.01%) ⬆️

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

@cccs-sadugas
Copy link
Contributor Author

Going to fix this one for Fedora 38:

Invalid printf with size_t (not casted to uintmax_t) at /__w/suricata/suricata/src/detect-engine-iponly.c:133

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