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

Use struct with pid and Go routine addr for Go BPF maps #1201

Merged
merged 11 commits into from
Sep 30, 2024

Conversation

marctc
Copy link
Contributor

@marctc marctc commented Sep 25, 2024

Follow up PR of #1182
Change more BPF maps to use structs with addr + PID.

@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.96%. Comparing base (5006cbd) to head (896bc13).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1201   +/-   ##
=======================================
  Coverage   81.95%   81.96%           
=======================================
  Files         136      136           
  Lines       11420    11420           
=======================================
+ Hits         9359     9360    +1     
+ Misses       1534     1533    -1     
  Partials      527      527           
Flag Coverage Δ
integration-test 60.37% <ø> (-0.06%) ⬇️
k8s-integration-test 58.61% <ø> (-0.07%) ⬇️
oats-test 36.07% <ø> (ø)
unittests 53.11% <ø> (ø)

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.

@marctc marctc marked this pull request as ready for review September 26, 2024 14:37
@@ -498,6 +498,7 @@ func TestSuite_OverrideServiceName(t *testing.T) {
}

func TestSuiteNodeClient(t *testing.T) {
t.Skip("seems flaky, we need to look into this")
Copy link
Contributor

Choose a reason for hiding this comment

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

You can reenable them if you merge your branch with main.

Copy link
Contributor

@rafaelroquetto rafaelroquetto left a comment

Choose a reason for hiding this comment

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

LGTM! Groovy!

bpf/go_grpc.h Outdated
@@ -150,7 +150,7 @@ int uprobe_netFdReadGRPC(struct pt_regs *ctx) {
bpf_dbg_printk("tr %llx", tr);
if (tr) {
go_addr_key_t tr_key = {};
go_addr_key_from_id(&tr_key, tr);
go_addr_key_from_id(&tr_key, (u64 *)tr);
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks strange, given go_addr_key_from_id takes a void*, I'd expect this to have no side-effect.

@marctc marctc merged commit 79d6d2b into main Sep 30, 2024
12 checks passed
@marctc marctc deleted the use_structs_go_maps_2 branch September 30, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants