Follow-up commit to 1e33759c788c ("bpf, trace: add BPF_F_CURRENT_CPU flag for bpf_perf_event_output") to add the same functionality into bpf_perf_event_read() helper. The split of index into flags and index component is also safe here, since such large maps are rejected during map allocation time.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -347,7 +347,7 @@ enum bpf_func_id { · 346 unmodified lines | |||
| 347 | #define BPF_F_ZERO_CSUM_TX (1ULL << 1) | 347 | #define BPF_F_ZERO_CSUM_TX (1ULL << 1) |
| 348 | #define BPF_F_DONT_FRAGMENT (1ULL << 2) | 348 | #define BPF_F_DONT_FRAGMENT (1ULL << 2) |
| 349 | 349 | ||
| 350 | /* BPF_FUNC_perf_event_output flags. */ | 350 | /* BPF_FUNC_perf_event_output and BPF_FUNC_perf_event_read flags. */ |
| 351 | #define BPF_F_INDEX_MASK 0xffffffffULL | 351 | #define BPF_F_INDEX_MASK 0xffffffffULL |
| 352 | #define BPF_F_CURRENT_CPU BPF_F_INDEX_MASK | 352 | #define BPF_F_CURRENT_CPU BPF_F_INDEX_MASK |
| 353 | 353 | ||