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

Accept access flags for allocate #32

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cholcombe973
Copy link

Addresses #31. Modifies accept to take an optional set of access flags. Pretty straight forward :)

@jonhoo
Copy link
Owner

jonhoo commented Feb 24, 2024

Thanks for the PR! Let's add this as a new method alloc_with_permissions (or something like it), and then have the existing allocate call that one with the default flags. That way the Option isn't needed and we avoid this needing to be breaking change to the API :)

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 10.1%. Comparing base (34f0186) to head (5be807f).

Additional details and impacted files
Files Coverage Δ
ibverbs/src/lib.rs 8.4% <0.0%> (-0.1%) ⬇️

@cholcombe973
Copy link
Author

Sounds good! I'll have an update coming in a few mins

@cholcombe973
Copy link
Author

Let me know if you'd like me to adjust the documentation. I feel like maybe it's a good idea to point out what each permission flag does.

/// `device_attr.max_mr_size`. There isn't any way to know what is the total size of memory
/// that can be registered for a specific device.
///
/// `allocate` currently sets the following permissions for each new `MemoryRegion`:
Copy link
Owner

Choose a reason for hiding this comment

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

Let's also add a line after the list that point at allocate_with_permissions if users need more control 👍

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.

3 participants