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

fix(userspace): compute the drop ratio in the right way #2128

Merged
merged 1 commit into from
Jul 13, 2022

Conversation

Andreagit97
Copy link
Member

@Andreagit97 Andreagit97 commented Jul 12, 2022

Signed-off-by: Andrea Terzolo andrea.terzolo@polito.it
Co-authored-by: Shane Lawrence shane@lawrence.dev

What type of PR is this?

/kind bug

/kind cleanup

Any specific area of the project related to this PR?

/area engine

What this PR does / why we need it:

First of all, I would to thank @shane-lawrence for spotting this issue in #2111! Great catch!

As I said here the n_evts fields, both in kmod and in bpf should be intended as "events seen by the drivers" so they should contain also the number of drops. This is for example what we do in our bpf probe after this variable increment we will increment also the drops number in case the event cannot be pushed into the buffer for example.

According to it, we need to change the way in which we compute the drop ratio

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

fix: compute the `drop ratio` in the right way

Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
Co-authored-by: Shane Lawrence <shane@lawrence.dev>
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

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

That's a great catch!
/approve

@poiana
Copy link
Contributor

poiana commented Jul 12, 2022

LGTM label has been added.

Git tree hash: 076ebb307859204d82cfe46e038f8554fc8a5e0e

Copy link
Contributor

@jasondellaluce jasondellaluce left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Contributor

poiana commented Jul 13, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP, jasondellaluce

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [FedeDP,jasondellaluce]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit a7153f2 into falcosecurity:master Jul 13, 2022
@jasondellaluce jasondellaluce added this to the 0.33.0 milestone Jul 29, 2022
@Andreagit97 Andreagit97 deleted the fix_ratio_logic branch October 15, 2022 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants