diff options
author | Andrii Nakryiko <[email protected]> | 2021-12-09 11:38:35 -0800 |
---|---|---|
committer | Andrii Nakryiko <[email protected]> | 2021-12-10 15:29:18 -0800 |
commit | b3ce907950350a58880b94fed2b6022f160b8b9a (patch) | |
tree | 077877ec876560290c69d4e499bd2971c450a600 /tools/perf/scripts/python/net_dropmonitor.py | |
parent | 2eda2145ebfc76569fd088f46356203fc0c785a1 (diff) |
libbpf: Add per-program log buffer setter and getter
Allow to set user-provided log buffer on a per-program basis ([0]). This
gives great deal of flexibility in terms of which programs are loaded
with logging enabled and where corresponding logs go.
Log buffer set with bpf_program__set_log_buf() overrides kernel_log_buf
and kernel_log_size settings set at bpf_object open time through
bpf_object_open_opts, if any.
Adjust bpf_object_load_prog_instance() logic to not perform own log buf
allocation and load retry if custom log buffer is provided by the user.
[0] Closes: https://github.com/libbpf/libbpf/issues/418
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions