Closed bfforever closed 2 weeks ago
Attention: Patch coverage is 0%
with 67 lines
in your changes missing coverage. Please review.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Flag | Coverage Δ | |
---|---|---|
unittests | 36.41% <0.00%> (+4.40%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Files | Coverage Δ | |
---|---|---|
pkg/controller/controller.go | 0.00% <0.00%> (ø) |
|
pkg/status/status_server.go | 13.22% <0.00%> (-2.32%) |
:arrow_down: |
pkg/logger/logger.go | 34.42% <0.00%> (-56.88%) |
:arrow_down: |
can we use
bpf_snprintf_btf
, which is supported since 5.10
Possiblely can't, I see this function use to render type info with type value of a certain struct, to output a string, not provide format capability.
/hold
/unhold
Good Job~ The following two points can be optimized in the future:
ip2str
can be extracted.ip2str
according to the log level. (e.g: IP2STR_ON_ERR/IP2STR_ON_DBG/...)/lgtm /approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: nlgwcy
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Good Job~ The following two points can be optimized in the future:
- byte order conversion in
ip2str
can be extracted.- execute
ip2str
according to the log level. (e.g: IP2STR_ON_ERR/IP2STR_ON_DBG/...)
Okay.
can you add a document on this feature to website https://kmesh.net/en/docs/
can you add a document on this feature to website https://kmesh.net/en/docs/
Of course.
What type of PR is this? /kind feature /kind enhancement
What this PR does / why we need it:
Kmesh eBPF log user space dumping. version > 5.13 dump bpf log to userspace, otherwise print log in trace pipe.
Support dynamic bpf log level.
k exec ds/kmesh -n kmesh-system -- curl -s localhost:15200/debug/bpfLogLevel/3
Which issue(s) this PR fixes: Fixes 388
Special notes for your reviewer:![bpf_log_3](https://github.com/kmesh-net/kmesh/assets/39798612/4ead1822-5dc8-47f9-97a4-52fb9f73f1ae)
Does this PR introduce a user-facing change?:
When print bpf log to kmesh daemon process or user space, just use BPF_LOG_U instead of BPF_LOG, the args which input is same as BPF_LOG.