Skip to content

Conversation

hengyoush
Copy link

example:

struct {
	__uint(type, BPF_MAP_TYPE_RINGBUF);
	__uint(max_entries, 4097);
} rb SEC(".maps");

then output:

program dev_hard_start_xmit: map rb: EINVAL (ring map size 4097 not a power of two page size(pageSize 4096))

@hengyoush hengyoush requested a review from a team as a code owner April 8, 2024 06:32
@hengyoush hengyoush force-pushed the ring-map-size-error branch from 4c4228f to 7638f55 Compare April 8, 2024 06:35
@hengyoush hengyoush force-pushed the ring-map-size-error branch from 3c49b2e to f8c12e5 Compare April 8, 2024 09:37
@hengyoush hengyoush requested a review from florianl April 8, 2024 09:38
Move pow() from package btf to package internal.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb force-pushed the ring-map-size-error branch from f8c12e5 to d882b65 Compare April 10, 2024 09:52
@lmb
Copy link
Collaborator

lmb commented Apr 10, 2024

I've pushed a small refactoring to reuse an existing implementation of pow we already had in the code base.

Signed-off-by: hengyouhai <hengyouhai@tuhu.cn>
@lmb lmb force-pushed the ring-map-size-error branch from 7c294df to 7e0b9c1 Compare April 10, 2024 11:31
@lmb lmb merged commit d4bceb5 into cilium:main Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants