-
Notifications
You must be signed in to change notification settings - Fork 111
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
Complete the work on TCP packet context propagation #1290
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1290 +/- ##
===========================================
+ Coverage 58.77% 72.61% +13.83%
===========================================
Files 138 140 +2
Lines 14129 14231 +102
===========================================
+ Hits 8305 10334 +2029
+ Misses 5216 3215 -2001
- Partials 608 682 +74
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - you may need to rebase onto #1293 for the tests to pass
} else { \ | ||
__builtin_memcpy(__trace__->log, fmt, sizeof(__trace__->log)); \ | ||
} \ | ||
bpf_ringbuf_submit(__trace__, 0); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps add a note saying the reason for this is because tc programs do not support the bpf_get_current_comm
helper, for future reference
@@ -32,6 +32,20 @@ struct { | |||
|
|||
enum bpf_func_id___x { BPF_FUNC_snprintf___x = 42 /* avoid zero */ }; | |||
|
|||
#ifdef BPF_DEBUG_TC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering whether we should add the following to the top of this file, just so that we can pass -DBPF_DEBUG_TC
directly:
#ifdef BPF_DEBUG_TC
#define BPF_DEBUG
#endif
@@ -24,7 +24,7 @@ import ( | |||
) | |||
|
|||
//go:generate $BPF2GO -cc $BPF_CLANG -cflags $BPF_CFLAGS -target amd64,arm64 bpf ../../../../bpf/tc_tracer.c -- -I../../../../bpf/headers | |||
//go:generate $BPF2GO -cc $BPF_CLANG -cflags $BPF_CFLAGS -target amd64,arm64 bpf_debug ../../../../bpf/tc_tracer.c -- -I../../../../bpf/headers -DBPF_DEBUG | |||
//go:generate $BPF2GO -cc $BPF_CLANG -cflags $BPF_CFLAGS -target amd64,arm64 bpf_debug ../../../../bpf/tc_tracer.c -- -I../../../../bpf/headers -DBPF_DEBUG -DBPF_DEBUG_TC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only in the case you accept my other suggestion regarding BPF_DEBUG_TC
//go:generate $BPF2GO -cc $BPF_CLANG -cflags $BPF_CFLAGS -target amd64,arm64 bpf_debug ../../../../bpf/tc_tracer.c -- -I../../../../bpf/headers -DBPF_DEBUG -DBPF_DEBUG_TC | |
//go:generate $BPF2GO -cc $BPF_CLANG -cflags $BPF_CFLAGS -target amd64,arm64 bpf_debug ../../../../bpf/tc_tracer.c -- -I../../../../bpf/headers -DBPF_DEBUG_TC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
With this PR I'm completing the work on TCP packet context propagation:
I'll follow-up with a PR to rename the option to something that makes sense.