Skip to content

[Request] Expose ibv_advise_mr #55

@yinghai

Description

@yinghai

ibv_advise_mr is quite useful in some usecases but currently it's static inline in verbs.h (https://github.com/linux-rdma/rdma-core/blob/76a7321311b131fe12787b2dad4bb0c113897dbb/libibverbs/verbs.h#L2731). It would be nice to expose the rust binding to it. I think there can be 2 options.

  1. Follow How to handle `static inline` functions rust-lang/rust-bindgen#2405. I tested locally and it seems to work. It will expose all the static inline symbols though.
  2. Expose verbs_context(https://github.com/linux-rdma/rdma-core/blob/76a7321311b131fe12787b2dad4bb0c113897dbb/libibverbs/verbs.h#L2139) in the allow list. And we can add some rust code to implement the equivalent of ibv_advise_mr (e.g. https://github.com/RDMA-Rust/rdma-mummy-sys/blob/45d16c6f012d8753b8dab6d08ac323cb8528f74c/src/verbs.rs#L471-L485). This will give user more control on what they want to do.

I think either is fine. But having that option to use ibv_advise_mr would be cool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions