manadv_set_context_attr(3)

manadv_set_context_attr3

Set context attributes

Usage

#include <infiniband/manadv.h>
int manadv_set_context_attr(struct ibv_context *context,
                            enum manadv_set_ctx_attr_type attr_type,
                            void *attr);

Overview

manadv_set_context_attr gives the ability to set vendor specific attributes on the RDMA context.

Arguments

context

RDMA device context to work on.

attr_type

The type of the provided attribute.

attr

Pointer to the attribute to be set.

attr_type

enum manadv_set_ctx_attr_type {
    /* Attribute type uint8_t */
    MANADV_SET_CTX_ATTR_BUF_ALLOCATORS = 0,
};
MANADV_SET_CTX_ATTR_BUF_ALLOCATORS

Provide an external buffer allocator

struct manadv_ctx_allocators {
    void *(*alloc)(size_t size, void *priv_data);
    void (*free)(void *ptr, void *priv_data);
    void *data;
};
alloc

Function used for buffer allocation instead of libmana internal method

free

Function used to free buffers allocated by alloc function

data

Metadata that can be used by alloc and free functions

Return value

Returns 0 on success, or the value of errno on failure (which indicates the failure reason).

Releases

3 releases since Debian 12 (Bookworm); the text changed 2 times.

  1. 12
  2. 13
  3. Arch

Author

Long Li ⟨[email protected]⟩\c

From rdma-core 65.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.