Commit 3082cf8
bpf: Introduce BPF_F_CPU flag for percpu_cgroup_storage maps
Introduce BPF_F_ALL_CPUS flag support for percpu_cgroup_storage maps to
allow updating values for all CPUs with a single value.
Introduce BPF_F_CPU flag support for percpu_cgroup_storage maps to allow
updating value for specified CPU.
This enhancement enables:
* Efficient update values across all CPUs with a single value when
BPF_F_ALL_CPUS is set for update_elem API.
* Targeted update or lookup for a specified CPU when BPF_F_CPU is set.
The BPF_F_CPU flag is passed via map_flags of lookup_elem and update_elem
APIs along with embedded cpu field.
Signed-off-by: Leon Hwang <[email protected]>1 parent d9c4951 commit 3082cf8
File tree
4 files changed
+46
-23
lines changed- include/linux
- kernel/bpf
4 files changed
+46
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
| 176 | + | |
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| |||
467 | 468 | | |
468 | 469 | | |
469 | 470 | | |
470 | | - | |
| 471 | + | |
471 | 472 | | |
472 | 473 | | |
473 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3733 | 3733 | | |
3734 | 3734 | | |
3735 | 3735 | | |
3736 | | - | |
| 3736 | + | |
3737 | 3737 | | |
3738 | 3738 | | |
3739 | 3739 | | |
3740 | 3740 | | |
3741 | 3741 | | |
| 3742 | + | |
3742 | 3743 | | |
3743 | 3744 | | |
3744 | 3745 | | |
| |||
3756 | 3757 | | |
3757 | 3758 | | |
3758 | 3759 | | |
3759 | | - | |
| 3760 | + | |
3760 | 3761 | | |
3761 | 3762 | | |
3762 | 3763 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
190 | 194 | | |
191 | 195 | | |
192 | 196 | | |
193 | | - | |
194 | | - | |
| 197 | + | |
| 198 | + | |
195 | 199 | | |
196 | 200 | | |
197 | 201 | | |
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
201 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
202 | 211 | | |
203 | 212 | | |
204 | 213 | | |
205 | 214 | | |
206 | 215 | | |
| 216 | + | |
207 | 217 | | |
208 | | - | |
| 218 | + | |
209 | 219 | | |
210 | 220 | | |
211 | 221 | | |
212 | 222 | | |
213 | 223 | | |
214 | 224 | | |
215 | 225 | | |
216 | | - | |
| 226 | + | |
217 | 227 | | |
218 | 228 | | |
219 | | - | |
| 229 | + | |
220 | 230 | | |
221 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
222 | 236 | | |
223 | 237 | | |
224 | 238 | | |
225 | | - | |
226 | | - | |
| 239 | + | |
| 240 | + | |
227 | 241 | | |
228 | 242 | | |
229 | 243 | | |
| |||
233 | 247 | | |
234 | 248 | | |
235 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
236 | 255 | | |
237 | 256 | | |
238 | 257 | | |
239 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
240 | 264 | | |
| 265 | + | |
241 | 266 | | |
242 | | - | |
| 267 | + | |
243 | 268 | | |
244 | 269 | | |
245 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
143 | 139 | | |
144 | 140 | | |
145 | 141 | | |
| |||
318 | 314 | | |
319 | 315 | | |
320 | 316 | | |
321 | | - | |
| 317 | + | |
322 | 318 | | |
323 | 319 | | |
324 | 320 | | |
| |||
0 commit comments