Commit 5b46d23
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 dfa2ca7 commit 5b46d23
3 files changed
+29
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2698 | 2698 | | |
2699 | 2699 | | |
2700 | 2700 | | |
2701 | | - | |
| 2701 | + | |
2702 | 2702 | | |
2703 | 2703 | | |
2704 | 2704 | | |
| |||
3718 | 3718 | | |
3719 | 3719 | | |
3720 | 3720 | | |
3721 | | - | |
| 3721 | + | |
| 3722 | + | |
| 3723 | + | |
| 3724 | + | |
| 3725 | + | |
| 3726 | + | |
3722 | 3727 | | |
3723 | 3728 | | |
3724 | 3729 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
316 | 322 | | |
317 | 323 | | |
318 | 324 | | |
319 | 325 | | |
320 | 326 | | |
| 327 | + | |
321 | 328 | | |
322 | 329 | | |
323 | 330 | | |
| |||
390 | 397 | | |
391 | 398 | | |
392 | 399 | | |
393 | | - | |
| 400 | + | |
394 | 401 | | |
395 | 402 | | |
396 | 403 | | |
| |||
411 | 418 | | |
412 | 419 | | |
413 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
414 | 427 | | |
415 | 428 | | |
416 | 429 | | |
417 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
418 | 435 | | |
| 436 | + | |
419 | 437 | | |
420 | 438 | | |
421 | 439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| |||
0 commit comments