change c-file test structure

This commit is contained in:
2025-11-20 17:24:02 +05:30
parent 902a52a07d
commit 144d9b0ab4
3 changed files with 23 additions and 5 deletions

View File

@ -0,0 +1,15 @@
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
char LICENSE[] SEC("license") = "GPL";
SEC("kprobe/blk_mq_start_request")
int example(struct pt_regs *ctx)
{
struct request *req = (struct request *)(ctx->di);
u32 data_len = req->__data_len;
bpf_printk("data length %u\n", data_len);
return 0;
}