Message ID | 20221116072351.1168938-2-houtao@huaweicloud.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 689eb2f1ba46b4b02195ac2a71c55b96d619ebf8 |
Delegated to: | BPF |
Headers | show |
Series | libbpf: Fixes for ring buffer | expand |
diff --git a/tools/lib/bpf/libbpf_probes.c b/tools/lib/bpf/libbpf_probes.c index f3a8e8e74eb8..d504d96adc83 100644 --- a/tools/lib/bpf/libbpf_probes.c +++ b/tools/lib/bpf/libbpf_probes.c @@ -234,7 +234,7 @@ static int probe_map_create(enum bpf_map_type map_type) case BPF_MAP_TYPE_USER_RINGBUF: key_size = 0; value_size = 0; - max_entries = 4096; + max_entries = sysconf(_SC_PAGE_SIZE); break; case BPF_MAP_TYPE_STRUCT_OPS: /* we'll get -ENOTSUPP for invalid BTF type ID for struct_ops */