Commit 389f4a9
bpf: Add BPF_F_CPU and BPF_F_ALL_CPUS flags support for percpu_array maps
Introduce support for the BPF_F_ALL_CPUS flag in percpu_array maps to
allow updating values for all CPUs with a single value for both
update_elem and update_batch APIs.
Introduce support for the BPF_F_CPU flag in percpu_array maps to allow:
* update value for specified CPU for both update_elem and update_batch
APIs.
* lookup value for specified CPU for both lookup_elem and lookup_batch
APIs.
The BPF_F_CPU flag is passed via:
* map_flags of lookup_elem and update_elem APIs along with embedded cpu
info.
* elem_flags of lookup_batch and update_batch APIs along with embedded
cpu info.
Signed-off-by: Leon Hwang <[email protected]>1 parent c559a29 commit 389f4a9
3 files changed
+31
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2762 | 2762 | | |
2763 | 2763 | | |
2764 | 2764 | | |
2765 | | - | |
| 2765 | + | |
2766 | 2766 | | |
2767 | 2767 | | |
2768 | 2768 | | |
| |||
3831 | 3831 | | |
3832 | 3832 | | |
3833 | 3833 | | |
3834 | | - | |
| 3834 | + | |
| 3835 | + | |
| 3836 | + | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
3835 | 3840 | | |
3836 | 3841 | | |
3837 | 3842 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
328 | 334 | | |
329 | 335 | | |
330 | 336 | | |
331 | 337 | | |
332 | 338 | | |
| 339 | + | |
333 | 340 | | |
334 | 341 | | |
335 | 342 | | |
| |||
398 | 405 | | |
399 | 406 | | |
400 | 407 | | |
401 | | - | |
| 408 | + | |
402 | 409 | | |
| 410 | + | |
403 | 411 | | |
404 | | - | |
| 412 | + | |
405 | 413 | | |
406 | 414 | | |
407 | 415 | | |
| |||
422 | 430 | | |
423 | 431 | | |
424 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
425 | 440 | | |
426 | | - | |
427 | | - | |
428 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
429 | 445 | | |
| 446 | + | |
430 | 447 | | |
431 | 448 | | |
432 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| |||
0 commit comments