Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(perf_buffer): perf_buffer relies on traits rather than specific type #939

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

CoderPoet
Copy link
Contributor

@CoderPoet CoderPoet commented Sep 9, 2024

Enhancement

This PR introduces a flexible and generic implementation for PerfBufferBuilder to support any type that implements the MapCore and AsFd traits, rather than being restricted to a specific Map type.

Why This Change is Needed:

Currently, PerfBufferBuilder is limited to a specific Map type, which restricts its usability with other types that implement the required traits. This update increases the extensibility of the PerfBufferBuilder and allows developers to use it with a wider variety of map-like structures. For example, a scenario that uses a pinning map.

@CoderPoet CoderPoet force-pushed the feat/pinning-map-support branch 5 times, most recently from 1f975ad to f4c6b42 Compare September 12, 2024 12:25
Copy link
Collaborator

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

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 3fc706b into libbpf:master Sep 18, 2024
13 checks passed
d-e-s-o added a commit to d-e-s-o/libbpf-rs that referenced this pull request Sep 20, 2024
Add a CHANGELOG entry for pull request libbpf#939, which adjusted the
PerfBufferBuilder type to work with anything implementing the MapCore
trait instead of strictly requiring a Map object.

Signed-off-by: Daniel Müller <deso@posteo.net>
d-e-s-o added a commit that referenced this pull request Sep 20, 2024
Add a CHANGELOG entry for pull request #939, which adjusted the
PerfBufferBuilder type to work with anything implementing the MapCore
trait instead of strictly requiring a Map object.

Signed-off-by: Daniel Müller <deso@posteo.net>
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