Re: [PATCH v3 05/18] rv: Add generic monitor event tracepoints and BPF kfuncs

From: Nam Cao

Date: Sun Dec 06 2026 - 14:46:06 EST


Gabriele Monaco <gmonaco@xxxxxxxxxx> writes:
> On Tue, 2026-12-01 at 21:25 +0000, Alexei Starovoitov wrote:
>> Porbably no need for copies.
>> If your names are in rodata than __str suffix on kfunc args will do. Like:
>>
>>   void bpf_rv_da_event(const char *mon__str, const int *id__nullable,
>>                        const char *state__str, const char *event__str,
>>                        const char *next_state__str);

This function signature works fine for DA monitor, and somewhat fits the
LTL monitors. But I fear it will be inadequate for future monitor types.

I am not sure how to write a kfunc, but perhaps something along the
lines of

void bpf_rv_da_event(const char *mon_type__str, const char *mon__str,
const int *id__nullable, union rv_data *data)

mon_type__str determines the data format in *data, and for DA monitors
*data has (state, event, next_state).

Nam