Skip to content

Avoid Vec's allocation for PostRecvGuard with new lowlevel API #120

Description

@IgorErin

Hello! Thank you so much for the project!

I am interested in the possibility to avoid allocations when creating work requests in PostRecvGuard.

The fact is that PostRecvGuard now contains Vec's that are dynamically filled in when constructing new work requests. I would like to avoid this, as it may contribute to memory fragmentation and may incur additional overhead on the data path.

I suggest adding an additional low-level API to work with already allocated elements, for example:

pub unsafe fn post_lowlevel(qp: NonNull<ibv_qp>, wrs: &mut [ibv_recv_wr], sges: &mut [ibv_sge]) -> Result<(), PostRecvError>

It could be used in existing code and offered to the user so that he can use it with preallocated arrays on the stack, for example.

Thank you in advance!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions