Open hsqStephenZhang opened 2 years ago
eBPF programs can be written to be portable across many kernel versions, so we can't do this at compile time. I think we should somehow generate a "minimum kernel version" section in the documentation for helpers, like we do for other APIs, eg: https://docs.rs/aya/0.10.6/aya/programs/struct.BtfTracePoint.html#minimum-kernel-version
yeah, that's a better approach
i noticed that linux 5.15 add time related bpf helper functions, it just changes so fast, maybe checking the kernel version? Or just adding some '#[cfg(some_version)]' so that developer will not misuse helper functions?