From 4797c007a03dbc0a3415f34147cdc26fae328e5e Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Fri, 19 Sep 2025 04:22:36 +0530 Subject: [PATCH] Define arch in C example --- examples/c-form/ex5.bpf.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/examples/c-form/ex5.bpf.c b/examples/c-form/ex5.bpf.c index 8eaa54c..11ce38b 100644 --- a/examples/c-form/ex5.bpf.c +++ b/examples/c-form/ex5.bpf.c @@ -1,3 +1,5 @@ +#define __TARGET_ARCH_arm64 + #include "vmlinux.h" #include #include @@ -20,13 +22,4 @@ int BPF_KPROBE(trace_start, struct request *req) return 0; } -// Optionally, attach also to blk_mq_start_request -SEC("kprobe/blk_mq_start_request") -int BPF_KPROBE(trace_start_mq, struct request *req) -{ - u64 ts = bpf_ktime_get_ns(); - bpf_map_update_elem(&start, &req, &ts, BPF_ANY); - return 0; -} - char LICENSE[] SEC("license") = "GPL";