Skip to content

Comments

map: reduce false positives of BPF_F_NO_PREALLOC hint on EINVAL#1776

Merged
ti-mo merged 1 commit intocilium:mainfrom
ti-mo:tb/no-prealloc-hint
May 6, 2025
Merged

map: reduce false positives of BPF_F_NO_PREALLOC hint on EINVAL#1776
ti-mo merged 1 commit intocilium:mainfrom
ti-mo:tb/no-prealloc-hint

Conversation

@ti-mo
Copy link
Contributor

@ti-mo ti-mo commented May 6, 2025

This commit adds a new MapType.mustHaveNoPrealloc() helper to collect map types that need BPF_F_NO_PREALLOC in order to be created successfully. This reduces the potential for red herrings while troubleshooting why map creation returns EINVAL.

Also added a similar warning for map types that are known to require the flag when the user forgets to specify the flag.

Supersedes #1720.

This commit adds a new MapType.mustHaveNoPrealloc() helper to collect map types
that need BPF_F_NO_PREALLOC in order to be created successfully. This reduces the
potential for red herrings while troubleshooting why map creation returns EINVAL.

Also added a similar warning for map types that are known to require the flag when
the user forgets to specify the flag.

Signed-off-by: Timo Beckers <[email protected]>
@ti-mo ti-mo requested a review from a team as a code owner May 6, 2025 11:36
@ti-mo ti-mo requested review from dylandreimerink and removed request for a team May 6, 2025 11:37
@ti-mo ti-mo merged commit 340ec73 into cilium:main May 6, 2025
16 of 17 checks passed
@ti-mo ti-mo deleted the tb/no-prealloc-hint branch May 6, 2025 12:22
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.

2 participants