diff options
author | Andrii Nakryiko <[email protected]> | 2020-06-29 23:15:00 -0700 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2020-06-30 16:31:55 +0200 |
commit | 517bbe1994a3cee29a35c730662277bb5daff582 (patch) | |
tree | e1c863b9b31b8101e280f2c8b8a5b1443f274c74 /tools/testing/selftests/bpf/prog_tests/tcp_rtt.c | |
parent | 7e0245753f1794f17de472dcf4694fa5ed527384 (diff) |
bpf: Enforce BPF ringbuf size to be the power of 2
BPF ringbuf assumes the size to be a multiple of page size and the power of
2 value. The latter is important to avoid division while calculating position
inside the ring buffer and using (N-1) mask instead. This patch fixes omission
to enforce power-of-2 size rule.
Fixes: 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it")
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_rtt.c')
0 files changed, 0 insertions, 0 deletions