Commit e7bec0f
bpf: Introduce BPF_F_CPU flag 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.
Introduce support for the BPF_F_CPU flag in percpu_array 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 and update_batch APIs.
* 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.
* elem_flags of lookup_batch and update_batch APIs along with embedded
cpu field.
Signed-off-by: Leon Hwang <[email protected]>1 parent cdaa18f commit e7bec0f
File tree
5 files changed
+67
-23
lines changed- include
- linux
- uapi/linux
- kernel/bpf
- tools/include/uapi/linux
5 files changed
+67
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2697 | 2697 | | |
2698 | 2698 | | |
2699 | 2699 | | |
2700 | | - | |
| 2700 | + | |
| 2701 | + | |
2701 | 2702 | | |
2702 | 2703 | | |
2703 | 2704 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1372 | 1372 | | |
1373 | 1373 | | |
1374 | 1374 | | |
| 1375 | + | |
| 1376 | + | |
1375 | 1377 | | |
1376 | 1378 | | |
1377 | 1379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
304 | | - | |
| 303 | + | |
| 304 | + | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
309 | 316 | | |
310 | 317 | | |
311 | 318 | | |
312 | 319 | | |
313 | 320 | | |
314 | 321 | | |
315 | 322 | | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
320 | 332 | | |
321 | 333 | | |
322 | 334 | | |
| |||
385 | 397 | | |
386 | 398 | | |
387 | 399 | | |
| 400 | + | |
388 | 401 | | |
389 | 402 | | |
390 | | - | |
391 | | - | |
| 403 | + | |
| 404 | + | |
392 | 405 | | |
393 | | - | |
| 406 | + | |
394 | 407 | | |
395 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
396 | 416 | | |
397 | 417 | | |
398 | 418 | | |
| |||
411 | 431 | | |
412 | 432 | | |
413 | 433 | | |
414 | | - | |
415 | | - | |
| 434 | + | |
| 435 | + | |
416 | 436 | | |
417 | | - | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
418 | 448 | | |
419 | 449 | | |
420 | 450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| |||
314 | 316 | | |
315 | 317 | | |
316 | 318 | | |
317 | | - | |
| 319 | + | |
318 | 320 | | |
319 | 321 | | |
320 | 322 | | |
| |||
1656 | 1658 | | |
1657 | 1659 | | |
1658 | 1660 | | |
1659 | | - | |
| 1661 | + | |
1660 | 1662 | | |
1661 | 1663 | | |
1662 | 1664 | | |
1663 | 1665 | | |
1664 | 1666 | | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
1665 | 1674 | | |
1666 | 1675 | | |
1667 | 1676 | | |
| |||
1695 | 1704 | | |
1696 | 1705 | | |
1697 | 1706 | | |
1698 | | - | |
| 1707 | + | |
1699 | 1708 | | |
1700 | 1709 | | |
1701 | 1710 | | |
| |||
1762 | 1771 | | |
1763 | 1772 | | |
1764 | 1773 | | |
1765 | | - | |
| 1774 | + | |
1766 | 1775 | | |
1767 | 1776 | | |
1768 | 1777 | | |
| |||
1962 | 1971 | | |
1963 | 1972 | | |
1964 | 1973 | | |
1965 | | - | |
| 1974 | + | |
1966 | 1975 | | |
1967 | 1976 | | |
1968 | 1977 | | |
| |||
2021 | 2030 | | |
2022 | 2031 | | |
2023 | 2032 | | |
2024 | | - | |
| 2033 | + | |
2025 | 2034 | | |
2026 | 2035 | | |
2027 | 2036 | | |
| |||
2143 | 2152 | | |
2144 | 2153 | | |
2145 | 2154 | | |
2146 | | - | |
| 2155 | + | |
2147 | 2156 | | |
2148 | 2157 | | |
2149 | 2158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1372 | 1372 | | |
1373 | 1373 | | |
1374 | 1374 | | |
| 1375 | + | |
| 1376 | + | |
1375 | 1377 | | |
1376 | 1378 | | |
1377 | 1379 | | |
| |||
0 commit comments