Skip to content

Commit 07ebcf3

Browse files
committed
Skip skb funcs
Signed-off-by: Sachin Tiptur <[email protected]>
1 parent c4b80f2 commit 07ebcf3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"makefile.configureOnOpen": true
3+
}

main.go

+7
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,13 @@ func main() {
139139
}
140140
}
141141

142+
// Skip the skb funcs when --filter-trace-only-bpf is enabled
143+
if flags.FilterTraceOnlyBpf {
144+
for i := 1; i <= 5; i++ {
145+
delete(bpfSpec.Programs, fmt.Sprintf("kprobe_skb_%d", i))
146+
delete(bpfSpec.Programs, fmt.Sprintf("kprobe_multi_skb_%d", i))
147+
}
148+
}
142149
for name, program := range bpfSpec.Programs {
143150
// Skip the skb-tracking ones that should not inject pcap-filter.
144151
switch name {

0 commit comments

Comments
 (0)