History

bpf, trace: add BPF_F_CURRENT_CPU flag for bpf_perf_event_read

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.

Daniel Borkmann committed 10 years ago

Commit 6816a7f1 parent d7931332 files · +9 −4Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/bpf.h+1−1
@@ -347,7 +347,7 @@ enum bpf_func_id { · 346 unmodified lines
347347 #define BPF_F_ZERO_CSUM_TX (1ULL << 1)
348348 #define BPF_F_DONT_FRAGMENT (1ULL << 2)
349349
350−/* BPF_FUNC_perf_event_output flags. */
350+/* BPF_FUNC_perf_event_output and BPF_FUNC_perf_event_read flags. */
351351 #define BPF_F_INDEX_MASK 0xffffffffULL
352352 #define BPF_F_CURRENT_CPU BPF_F_INDEX_MASK
353353

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t