On Wed, Mar 19, 2025 at 03:21:47PM -0700, JP Kobryn wrote: > The rstat updated/flush API functions are exported as kfuncs so bpf > programs can make the same calls that in-kernel code can. Split these API > functions into separate in-kernel and bpf versions. Function signatures > remain unchanged. The kfuncs are named with the prefix "bpf_". This > non-functional change allows for future commits which will modify the > signature of the in-kernel API without impacting bpf call sites. The > implementations of the kfuncs serve as adapters to the in-kernel API. This made me look up https://docs.kernel.org/bpf/kfuncs.html#bpf-kfunc-lifecycle-expectations The series reworks existing kfuncs anyway, is it necessary to have the bpf_ versions? The semantics is changed too from base+all subsystems flush to only base flush (bpf_rstat_flush()). I'd perhaps do the changes freely w/out taking kfuncs into account and then add possible reconstructive patches towards the end of the series. (I'm not unsure whether the modified btf_type_tag_percpu.c selftest survives the latest unionization of base stats.) Michal