@@ -45,6 +45,10 @@ __bpf_kfunc_start_defs();
45
45
*
46
46
* bpf_cpumask_create() allocates memory using the BPF memory allocator, and
47
47
* will not block. It may return NULL if no memory is available.
48
+ *
49
+ * Return:
50
+ * * A pointer to a new struct bpf_cpumask instance on success.
51
+ * * NULL if the BPF memory allocator is out of memory.
48
52
*/
49
53
__bpf_kfunc struct bpf_cpumask * bpf_cpumask_create (void )
50
54
{
@@ -71,6 +75,10 @@ __bpf_kfunc struct bpf_cpumask *bpf_cpumask_create(void)
71
75
* Acquires a reference to a BPF cpumask. The cpumask returned by this function
72
76
* must either be embedded in a map as a kptr, or freed with
73
77
* bpf_cpumask_release().
78
+ *
79
+ * Return:
80
+ * * The struct bpf_cpumask pointer passed to the function.
81
+ *
74
82
*/
75
83
__bpf_kfunc struct bpf_cpumask * bpf_cpumask_acquire (struct bpf_cpumask * cpumask )
76
84
{
@@ -106,6 +114,9 @@ CFI_NOSEAL(bpf_cpumask_release_dtor);
106
114
*
107
115
* Find the index of the first nonzero bit of the cpumask. A struct bpf_cpumask
108
116
* pointer may be safely passed to this function.
117
+ *
118
+ * Return:
119
+ * * The index of the first nonzero bit in the struct cpumask.
109
120
*/
110
121
__bpf_kfunc u32 bpf_cpumask_first (const struct cpumask * cpumask )
111
122
{
@@ -119,6 +130,9 @@ __bpf_kfunc u32 bpf_cpumask_first(const struct cpumask *cpumask)
119
130
*
120
131
* Find the index of the first unset bit of the cpumask. A struct bpf_cpumask
121
132
* pointer may be safely passed to this function.
133
+ *
134
+ * Return:
135
+ * * The index of the first zero bit in the struct cpumask.
122
136
*/
123
137
__bpf_kfunc u32 bpf_cpumask_first_zero (const struct cpumask * cpumask )
124
138
{
@@ -133,6 +147,9 @@ __bpf_kfunc u32 bpf_cpumask_first_zero(const struct cpumask *cpumask)
133
147
*
134
148
* Find the index of the first nonzero bit of the AND of two cpumasks.
135
149
* struct bpf_cpumask pointers may be safely passed to @src1 and @src2.
150
+ *
151
+ * Return:
152
+ * * The index of the first bit that is nonzero in both cpumask instances.
136
153
*/
137
154
__bpf_kfunc u32 bpf_cpumask_first_and (const struct cpumask * src1 ,
138
155
const struct cpumask * src2 )
@@ -414,6 +431,9 @@ __bpf_kfunc u32 bpf_cpumask_any_and_distribute(const struct cpumask *src1,
414
431
* @cpumask: The cpumask being queried.
415
432
*
416
433
* Count the number of set bits in the given cpumask.
434
+ *
435
+ * Return:
436
+ * * The number of bits set in the mask.
417
437
*/
418
438
__bpf_kfunc u32 bpf_cpumask_weight (const struct cpumask * cpumask )
419
439
{
0 commit comments