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

Mark flow elephant/v3 #12237

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

inashivb
Copy link
Member

@inashivb inashivb commented Dec 5, 2024

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

Previous PR: #12123

Changes since v2:

  • bring out elephant flow marking
  • rebased on top of latest master
  • tried to fill memory gaps in Flow struct (still a WIP)

1. Add user defined elephant flow definition based on rate of bytes
easily configurable in suricata.yaml.
2. Add an elephant flow counter.

Feature 5647
This brings us down from 2 holes of 2 bytes and 4 bytes to one hole of 5
bytes.
There may be more room for improvement.
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

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

Project coverage is 83.18%. Comparing base (b58b886) to head (4584f91).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12237   +/-   ##
=======================================
  Coverage   83.18%   83.18%           
=======================================
  Files         912      912           
  Lines      257169   257185   +16     
=======================================
+ Hits       213914   213949   +35     
+ Misses      43255    43236   -19     
Flag Coverage Δ
fuzzcorpus 61.00% <63.15%> (-0.01%) ⬇️
livemode 19.41% <78.94%> (+<0.01%) ⬆️
pcap 44.41% <94.73%> (+0.03%) ⬆️
suricata-verify 62.79% <94.73%> (+0.01%) ⬆️
unittests 59.18% <10.52%> (-0.02%) ⬇️

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

# number of bytes a flow has seen in either direction divided by the time a
# flow has been alive.
elephant-flow:
rate: 1000000
Copy link
Member

Choose a reason for hiding this comment

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

to me a rate needs a time element, how would that be expressed here?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah. will make it take two args instead: bytes and seconds just like the flow.rate keyword

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants