aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2019-12-11 17:36:09 -0800
committerAlexei Starovoitov <ast@kernel.org>2019-12-13 13:00:09 -0800
commit783b8f01f5942a786998f5577bd9ff3992f22a1a (patch)
tree0015cd8dd301c2b5fb8d1224713a4c3c97b42017 /tools/testing/selftests/bpf
parentselftests/bpf: Add CPU mask parsing tests (diff)
downloadlinux-dev-783b8f01f5942a786998f5577bd9ff3992f22a1a.tar.xz
linux-dev-783b8f01f5942a786998f5577bd9ff3992f22a1a.zip
libbpf: Don't attach perf_buffer to offline/missing CPUs
It's quite common on some systems to have more CPUs enlisted as "possible", than there are (and could ever be) present/online CPUs. In such cases, perf_buffer creationg will fail due to inability to create perf event on missing CPU with error like this: libbpf: failed to open perf buffer event on cpu #16: No such device This patch fixes the logic of perf_buffer__new() to ignore CPUs that are missing or currently offline. In rare cases where user explicitly listed specific CPUs to connect to, behavior is unchanged: libbpf will try to open perf event buffer on specified CPU(s) anyways. Fixes: fb84b8224655 ("libbpf: add perf buffer API") Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20191212013609.1691168-1-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf')
0 files changed, 0 insertions, 0 deletions