summaryrefslogtreecommitdiff
path: root/tools/leds
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2020-03-25 12:55:21 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2020-03-26 00:13:37 +0100
commit8395f320b407509819cc112f61a1de05780c8cba (patch)
tree05f619c306348627204d7c73646b77b64463a174 /tools/leds
parent9fc9aad99e5d654bd3ea48861bda57f03b118ca9 (diff)
libbpf: Don't allocate 16M for log buffer by default
For each prog/btf load we allocate and free 16 megs of verifier buffer. On production systems it doesn't really make sense because the programs/btf have gone through extensive testing and (mostly) guaranteed to successfully load. Let's assume successful case by default and skip buffer allocation on the first try. If there is an error, start with BPF_LOG_BUF_SIZE and double it on each ENOSPC iteration. v3: * Return -ENOMEM when can't allocate log buffer (Andrii Nakryiko) v2: * Don't allocate the buffer at all on the first try (Andrii Nakryiko) Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200325195521.112210-1-sdf@google.com
Diffstat (limited to 'tools/leds')
0 files changed, 0 insertions, 0 deletions