Lines Matching refs:kfunc

14 2. Defining a kfunc
20 valid context. To enforce this, visibility of a kfunc can be per program type.
25 2.1 Creating a wrapper kfunc
28 When defining a wrapper kfunc, the wrapper function should have extern linkage.
29 This prevents the compiler from optimizing away dead code, as this wrapper kfunc
31 prototype in a header for the wrapper kfunc.
47 A wrapper kfunc is often needed when we need to annotate parameters of the
48 kfunc. Otherwise one may directly make the kfunc visible to the BPF program by
51 2.2 Annotating kfunc parameters
57 kfunc with a __tag, where tag may be one of the supported annotations.
72 of the pointer is used. Without __sz annotation, a kfunc cannot accept a void
89 type of kfunc(s) being registered with the BPF subsystem. To do so, we define
97 This set encodes the BTF ID of each kfunc listed above, and encodes the flags
103 The KF_ACQUIRE flag is used to indicate that the kfunc returns a pointer to a
105 is eventually released using a release kfunc, or transferred to a map using a
113 The KF_RET_NULL flag is used to indicate that the pointer returned by the kfunc
115 returned from the kfunc before making use of it (dereferencing or passing to
122 The KF_RELEASE flag is used to indicate that the kfunc releases the pointer
125 kfunc with this flag.
130 The KF_KPTR_GET flag is used to indicate that the kfunc takes the first argument
133 arguments of a kfunc. The KF_KPTR_GET flag should be used in conjunction with
145 kfunc or BPF helper is passed as an argument to this kfunc without any
153 some operation) on an object that was obtained using an acquire kfunc. Such
175 Once the kfunc is prepared for use, the final step to making it visible is