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

new(drivers): add dns dynamic snaplen #2035

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

Andreagit97
Copy link
Member

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

Does this PR require a change in the driver versions?

What this PR does / why we need it:

See the payload of DNS query/response could be usually interesting. This patch increases the dynamic snaplen when the DNS PORT (53) is detected. It is disabled by default if do_dynamic_snaplen is not enabled.

This PR continues the reactor of network drivers tests

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
@FedeDP
Copy link
Contributor

FedeDP commented Aug 29, 2024

Do you really want this for next-driver that is now targeting the release ahead of the next one, or you wanted to target 7.3.0+driver?

@FedeDP
Copy link
Contributor

FedeDP commented Aug 29, 2024

/milestone 7.3.0+driver

@poiana poiana modified the milestones: next-driver, 7.3.0+driver Aug 29, 2024
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.

/approve

@poiana
Copy link
Contributor

poiana commented Aug 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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:

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

@poiana
Copy link
Contributor

poiana commented Aug 29, 2024

LGTM label has been added.

Git tree hash: 3069159c9d2c1accc236971ed275fcd44e557646

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.30%. Comparing base (e2c5174) to head (f507af5).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2035      +/-   ##
==========================================
- Coverage   74.31%   74.30%   -0.01%     
==========================================
  Files         253      253              
  Lines       30966    30966              
  Branches     5403     5421      +18     
==========================================
- Hits        23011    23010       -1     
- Misses       7942     7952      +10     
+ Partials       13        4       -9     
Flag Coverage Δ
libsinsp 74.30% <ø> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Perf diff from master - unit tests

     2.91%     +1.56%  [.] gzfile_read
     6.41%     -1.30%  [.] next
     3.17%     +1.28%  [.] sinsp_parser::process_event
     7.24%     +0.94%  [.] sinsp::next
     1.92%     -0.80%  [.] sinsp::fetch_next_event
     0.44%     +0.70%  [.] std::_Hashtable<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Identity, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true> >::find
     3.22%     +0.69%  [.] sinsp_thread_manager::get_thread_ref
     0.49%     +0.67%  [.] std::_Hashtable<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, libsinsp::state::dynamic_struct::field_info>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, libsinsp::state::dynamic_struct::field_info> >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::find
    10.83%     -0.61%  [.] sinsp_parser::reset
     1.42%     -0.59%  [.] sinsp_evt::get_direction

Heap diff from master - unit tests

peak heap memory consumption: -5.18K
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Benchmarks diff from master

Comparing gbench_data.json to /root/actions-runner/_work/libs/libs/build/gbench_data.json
Benchmark                                                         Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------
BM_sinsp_split_mean                                            -0.0118         -0.0118           147           145           147           145
BM_sinsp_split_median                                          -0.0137         -0.0138           147           145           147           145
BM_sinsp_split_stddev                                          +1.7205         +1.7217             0             1             0             1
BM_sinsp_split_cv                                              +1.7529         +1.7541             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.1145         +0.1145            43            48            43            48
BM_sinsp_concatenate_paths_relative_path_median                +0.1188         +0.1188            43            48            43            48
BM_sinsp_concatenate_paths_relative_path_stddev                -0.5779         -0.5771             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    -0.6213         -0.6205             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0057         -0.0057            17            17            17            17
BM_sinsp_concatenate_paths_empty_path_median                   -0.0019         -0.0019            17            17            17            17
BM_sinsp_concatenate_paths_empty_path_stddev                   -0.4149         -0.4150             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       -0.4116         -0.4116             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.0885         +0.0884            45            48            45            48
BM_sinsp_concatenate_paths_absolute_path_median                +0.1064         +0.1064            45            49            45            49
BM_sinsp_concatenate_paths_absolute_path_stddev               +10.8783        +10.8680             0             2             0             2
BM_sinsp_concatenate_paths_absolute_path_cv                    +9.9130         +9.9036             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0047         +0.0047           350           351           350           351
BM_sinsp_split_container_image_median                          +0.0023         +0.0023           350           351           350           351
BM_sinsp_split_container_image_stddev                          -0.3684         -0.3675             3             2             3             2
BM_sinsp_split_container_image_cv                              -0.3714         -0.3704             0             0             0             0

@poiana poiana merged commit 5ed00b2 into falcosecurity:master Aug 29, 2024
51 of 55 checks passed
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