Skip to content

Commit e39b906

Browse files
committed
fix PR comments
1 parent bc36508 commit e39b906

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

bpf/common/trace_common.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,6 @@ static __always_inline unsigned char *bpf_strstr_tp_loop__legacy(unsigned char *
9898

9999
const u16 k_besteffort_max_loops = 400; // Limited best-effort search to stay within insns limit
100100
for (u16 i = 0; i + TRACE_PARENT_HEADER_LEN < k_besteffort_max_loops; i++) {
101-
if (i != 0 && buf[i - 1] != '\n') {
102-
continue;
103-
}
104-
105101
if (is_traceparent(&buf[i])) {
106102
return &buf[i];
107103
}

bpf/generictracer/protocol_http.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,14 +493,14 @@ static __always_inline int __obi_protocol_http(unsigned char *(*tp_loop_fn)(unsi
493493

494494
// k_tail_protocol_http
495495
SEC("kprobe/http")
496-
static int obi_protocol_http(void *ctx) {
496+
int obi_protocol_http(void *ctx) {
497497
(void)ctx;
498498
return __obi_protocol_http(bpf_strstr_tp_loop);
499499
}
500500

501501
// k_tail_protocol_http
502502
SEC("kprobe/http")
503-
static int obi_protocol_http_legacy(void *ctx) {
503+
int obi_protocol_http_legacy(void *ctx) {
504504
(void)ctx;
505505
return __obi_protocol_http(bpf_strstr_tp_loop__legacy);
506506
}

pkg/components/ebpf/common/common.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ func SupportsContextPropagationWithProbe(log *slog.Logger) bool {
306306
}
307307

308308
func SupportsEBPFLoops(log *slog.Logger, overrideKernelVersion bool) bool {
309-
// TODO(matt): probe for BPF_FUNC_loop instead of relying on kernel version?
310309
if overrideKernelVersion {
311310
log.Debug("Skipping kernel version check for bpf_loop functionality: user supplied confirmation of support")
312311
return true

pkg/components/ebpf/instrumenter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020

2121
"github.com/cilium/ebpf"
2222
"github.com/cilium/ebpf/link"
23-
"github.com/containers/common/pkg/cgroupv2"
23+
v2 "github.com/containers/common/pkg/cgroupv2"
2424
"github.com/prometheus/procfs"
2525
"golang.org/x/sys/unix"
2626

@@ -488,7 +488,7 @@ func processMaps(pid int32) ([]*procfs.ProcMap, error) {
488488
func getCgroupPath() (string, error) {
489489
cgroupPath := "/sys/fs/cgroup"
490490

491-
enabled, err := cgroupv2.Enabled()
491+
enabled, err := v2.Enabled()
492492
if !enabled {
493493
if _, pathErr := os.Stat(filepath.Join(cgroupPath, "unified")); pathErr == nil {
494494
slog.Debug("discovered hybrid cgroup hierarchy, will attempt to attach sockops")

0 commit comments

Comments
 (0)