Skip to content

Commit

Permalink
add sampling check to align with all other ebpf hooks
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamed Mahmoud <[email protected]>
  • Loading branch information
msherif1234 committed Jul 15, 2024
1 parent a593b2a commit f19b640
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bpf/ovs_monitoring.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static inline int trace_ovs_dp(struct sk_buff *skb, struct psample_metadata *md)
SEC("kprobe/psample_sample_packet")
int BPF_KPROBE(ovs_dp_monitor, void *group, struct sk_buff *skb, u32 sample_rate,
struct psample_metadata *md) {
if (enable_ovs_monitoring == 0) {
if (enable_ovs_monitoring == 0 || do_sampling == 0) {
return 0;
}
if (skb == NULL || md == NULL) {
Expand Down
Binary file modified pkg/ebpf/bpf_arm64_bpfel.o
Binary file not shown.
Binary file modified pkg/ebpf/bpf_powerpc_bpfel.o
Binary file not shown.
Binary file modified pkg/ebpf/bpf_s390_bpfeb.o
Binary file not shown.
Binary file modified pkg/ebpf/bpf_x86_bpfel.o
Binary file not shown.

0 comments on commit f19b640

Please sign in to comment.