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

parse/size: support IEEE 1541 size units v2 #11471

Closed
wants to merge 3 commits into from

Conversation

victorjulien
Copy link
Member

Introduce KiB, MiB and GiB. They are case sensitive as a lower case 'b'
means bits in the IEEE 1541 scheme.

KiB = 1024
MiB = 1048576
GiB = 1073741824

Ticket: OISF#1457.
@victorjulien victorjulien requested a review from a team as a code owner July 10, 2024 18:22
Copy link

codecov bot commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 98.54015% with 2 lines in your changes missing coverage. Please review.

Project coverage is 82.55%. Comparing base (090079c) to head (9da0df3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11471      +/-   ##
==========================================
+ Coverage   82.52%   82.55%   +0.02%     
==========================================
  Files         938      938              
  Lines      248297   248321      +24     
==========================================
+ Hits       204917   205006      +89     
+ Misses      43380    43315      -65     
Flag Coverage Δ
fuzzcorpus 60.68% <75.00%> (+0.23%) ⬆️
livemode 18.70% <50.00%> (+<0.01%) ⬆️
pcap 43.76% <50.00%> (-0.02%) ⬇️
suricata-verify 61.55% <75.00%> (+0.01%) ⬆️
unittests 59.43% <97.08%> (+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 21483

@inashivb inashivb self-requested a review July 12, 2024 04:56
Copy link
Member

@inashivb inashivb left a comment

Choose a reason for hiding this comment

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

Looking good. Some nits inline and missing small updates to the configuration file below.

Config options:

  • types.alert.payload-buffer-size: 4kb
  • types.frame.payload-buffer-size: 4kb
  • datasets.defaults.memcap: 100mb

Config comments:

  • the reserved memory (memcap) for flows is 32MB
  • The memcap can be specified in kb, mb, gb
  • reassemble 1mb into a stream
  • Default is unlimited, values can be 64mb

@@ -410,7 +410,7 @@ outputs:

# File size limit. Can be specified in kb, mb, gb. Just a number
Copy link
Member

Choose a reason for hiding this comment

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

nit: comment still says kb, mb, gb..

# string-log-limit: 1kb # limit size of logged strings in bytes.
# Can be specified in kb, mb, gb. Just a number
# string-log-limit: 1KiB # limit size of logged strings in bytes.
# Can be specified in KiB, MiB, GiB. Just a number
# is parsed as bytes. Default is 1KB.
Copy link
Member

Choose a reason for hiding this comment

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

nit: KB

@victorjulien victorjulien mentioned this pull request Jul 12, 2024
@victorjulien
Copy link
Member Author

Replaced by #11485

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