Skip to content

map: Add corresponding function for parsing memlock as u64 - #1467

Merged
d-e-s-o merged 1 commit into
libbpf:masterfrom
andraprs:memlock-u64-parse
Oct 9, 2026
Merged

d-e-s-o merged 1 commit into
libbpf:masterfrom
andraprs:memlock-u64-parse

Conversation

@andraprs

@andraprs andraprs commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Currently, the memlock field of MapFdInfo is parsed as an u32 value. Given that the field is marked as an u64 value, add a function for parsing an u64 value. This can be helpful to parse memlock values higher than u32::MAX and not returning an error in this case.

Thank you for considering a contribution!

In order to streamline review experience for contributors and reviewers, please
be sure to read and follow the Contributor's Guide. It
lays out basic best practices, which, if followed will reduce unnecessary back
and forth and, ultimately, minimize the time it takes to get your change into
the library.

Currently, the memlock field of MapFdInfo is parsed as an u32 value.
Given that the field is marked as an u64 value, add a function for
parsing an u64 value. This can be helpful to parse memlock values
higher than u32::MAX and not returning an error in this case.

Signed-off-by: Andra Paraschiv <andra.paraschiv@gcore.com>

@d-e-s-o d-e-s-o left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me, thanks.

@d-e-s-o
d-e-s-o merged commit 54e9b99 into libbpf:master Oct 9, 2026
17 checks passed
@andraprs

andraprs commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Seems fine to me, thanks.

Thank you for review.

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