Skip to content

detect/transform: Refactor setup/apply pattern#12640

Closed
jlucovsky wants to merge 1 commit intoOISF:masterfrom
jlucovsky:inspectbuffer/2
Closed

detect/transform: Refactor setup/apply pattern#12640
jlucovsky wants to merge 1 commit intoOISF:masterfrom
jlucovsky:inspectbuffer/2

Conversation

@jlucovsky
Copy link
Contributor

@jlucovsky jlucovsky commented Feb 20, 2025

git grep -A 1 -w InspectionBufferSetup shows many cases of the following call patterns:
- InspectionBufferSetup
- InspectionBufferApplyTransforms

Refactor the implementations of those functions into InspectionBufferSetupAndApplyTransforms to reduce function call count.

Issue: 2290 (related to changes needed for this issue)

Describe changes:

  • Replace call sequences of buffer-setup and buffer-apply with buffer-setup-and-apply

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

  • To use an LibHTP, Suricata-Verify or Suricata-Update pull request,
    link to the pull request in the respective _BRANCH variable.
  • Leave unused overrides blank or remove.

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

git grep -A 1 -w InspectionBufferSetup shows many cases of the following
call patterns:
    - InspectionBufferSetup
    - InspectionBufferApplyTransforms

Refactor the implementations of those functions into
InspectionBufferSetupAndApplyTransforms to reduce function call count.

Issue: 2290 (related to changed for this issue)
@codecov
Copy link

codecov bot commented Feb 20, 2025

Codecov Report

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

Project coverage is 80.75%. Comparing base (6fc617c) to head (0548b91).
Report is 22 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12640      +/-   ##
==========================================
- Coverage   80.77%   80.75%   -0.02%     
==========================================
  Files         932      932              
  Lines      259286   259258      -28     
==========================================
- Hits       209437   209374      -63     
- Misses      49849    49884      +35     
Flag Coverage Δ
fuzzcorpus 57.00% <83.33%> (-0.01%) ⬇️
livemode 19.37% <4.16%> (+<0.01%) ⬆️
pcap 44.15% <53.47%> (+<0.01%) ⬆️
suricata-verify 63.47% <93.05%> (-0.01%) ⬇️
unittests 58.35% <31.94%> (+<0.01%) ⬆️

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 24822

@victorjulien victorjulien added this to the 8.0 milestone Feb 20, 2025
@victorjulien
Copy link
Member

Merged in #12653, thanks!

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