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

Convert byte_extract parser to Rust. #10624

Closed
wants to merge 2 commits into from
Closed

Conversation

jlucovsky
Copy link
Contributor

@jlucovsky jlucovsky commented Mar 12, 2024

Convert the byte_extract option parser from C to Rust.

Link to redmine ticket: 6873

Describe changes:

  • Refactor code in rust/src/detect to support re-usability
  • Implement the byte_extract parser in Rust, with unittests
  • Modify the existing byte_extract module to use the Rust parser

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=

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 19262

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 97.42729% with 23 lines in your changes are missing coverage. Please review.

Project coverage is 82.72%. Comparing base (e41c2f1) to head (d8dc98d).
Report is 16 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10624      +/-   ##
==========================================
+ Coverage   82.69%   82.72%   +0.03%     
==========================================
  Files         926      927       +1     
  Lines      247574   247513      -61     
==========================================
+ Hits       204719   204756      +37     
+ Misses      42855    42757      -98     
Flag Coverage Δ
fuzzcorpus 64.21% <79.41%> (+0.16%) ⬆️
suricata-verify 62.00% <61.27%> (+0.12%) ⬆️
unittests 62.19% <95.63%> (-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 19332

@catenacyber catenacyber added the needs ticket Needs (link to) redmine ticket label Mar 14, 2024
Issue: 6873

Refactor the enums for endian and base handling for broader use.
Implement the keyword parser in Rust.

Issue: 6831
@jlucovsky jlucovsky marked this pull request as ready for review March 19, 2024 14:24
@jlucovsky jlucovsky requested a review from victorjulien as a code owner March 19, 2024 14:24
@jlucovsky jlucovsky changed the title Draft: Convert byte_extract parser to Rust. Convert byte_extract parser to Rust. Mar 19, 2024
@jlucovsky jlucovsky removed the needs ticket Needs (link to) redmine ticket label Mar 19, 2024
@suricata-qa
Copy link

WARNING:

field baseline test %
SURI_TLPR1_stats_chk
.tcp.pseudo 2810 19562 696.16%

Pipeline 19629

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, looks good overall, some nits though

@jlucovsky
Copy link
Contributor Author

Continued in #10706

@jlucovsky jlucovsky closed this Mar 24, 2024
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.

4 participants