Skip to content

feat(userspace/libsinsp)!: pass ipv4 server ports as func parameter #2350

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

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

ekoops
Copy link
Contributor

@ekoops ekoops commented Apr 15, 2025

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:

This PR is part of a series #2343.
It passes ipv4_server_ports as sinsp_threadinfo::fix_sockets_coming_from_proc() method parameter.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

feat(userspace/libsinsp)!: pass ipv4 server ports as func parameter

Pass `ipv4_server_ports` as
`sinsp_threadinfo::fix_sockets_coming_from_proc()` parameter.

BREAKING CHANGE: update
`sinsp_threadinfo::fix_sockets_coming_from_proc()` signature

Signed-off-by: Leonardo Di Giovanna <leonardodigiovanna1@gmail.com>
@poiana
Copy link
Contributor

poiana commented Apr 15, 2025

LGTM label has been added.

Git tree hash: 3a980f9e23ddf497d934ee664f09f8291af00a38

Copy link

codecov bot commented Apr 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.18%. Comparing base (42cf2c7) to head (f9c7cf0).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2350   +/-   ##
=======================================
  Coverage   77.18%   77.18%           
=======================================
  Files         227      227           
  Lines       30194    30194           
  Branches     4611     4612    +1     
=======================================
  Hits        23306    23306           
  Misses       6888     6888           
Flag Coverage Δ
libsinsp 77.18% <100.00%> (ø)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Perf diff from master - unit tests

     4.10%     -0.71%  [.] next_event_from_file
     1.15%     +0.42%  [.] std::_Hashtable<long, std::pair<long const, std::shared_ptr<sinsp_threadinfo> >, std::allocator<std::pair<long const, std::shared_ptr<sinsp_threadinfo> > >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node
     0.71%     -0.38%  [.] sinsp_evt::get_direction
    35.73%     +0.38%  [.] sinsp_thread_manager::create_thread_dependencies
     6.09%     -0.35%  [.] sinsp::next
     1.00%     +0.33%  [.] scap_event_decode_params
     5.92%     -0.31%  [.] sinsp_parser::reset
     0.37%     +0.24%  [.] sinsp_fdtable::find
     1.49%     +0.22%  [.] is_conversion_needed
     0.63%     -0.21%  [.] sinsp_evt::get_param

Heap diff from master - unit tests

peak heap memory consumption: 0B
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.0322         +0.0322           148           153           148           153
BM_sinsp_split_median                                          +0.0348         +0.0347           148           153           148           153
BM_sinsp_split_stddev                                          +2.3970         +2.3957             1             2             1             2
BM_sinsp_split_cv                                              +2.2909         +2.2897             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.0811         +0.0810            57            62            57            62
BM_sinsp_concatenate_paths_relative_path_median                +0.0637         +0.0637            58            61            58            61
BM_sinsp_concatenate_paths_relative_path_stddev                +0.3135         +0.3137             1             2             1             2
BM_sinsp_concatenate_paths_relative_path_cv                    +0.2150         +0.2152             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0079         -0.0079            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_median                   -0.0071         -0.0071            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_stddev                   +0.9671         +0.9710             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +0.9827         +0.9867             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.1025         +0.1025            58            64            58            64
BM_sinsp_concatenate_paths_absolute_path_median                +0.1010         +0.1009            58            64            58            64
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.6332         -0.6337             1             0             1             0
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.6673         -0.6678             0             0             0             0

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

@github-project-automation github-project-automation bot moved this from Todo to In progress in Falco Roadmap Apr 15, 2025
@FedeDP
Copy link
Contributor

FedeDP commented Apr 15, 2025

/milestone 0.21.0

@poiana poiana added this to the 0.21.0 milestone Apr 15, 2025
@poiana
Copy link
Contributor

poiana commented Apr 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ekoops, 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 poiana merged commit ec8810c into falcosecurity:master Apr 15, 2025
47 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Falco Roadmap Apr 15, 2025
@ekoops ekoops deleted the ekoops/server-ports branch April 15, 2025 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants