manadv_set_context_attr(3)

πŸ’– NAME πŸ’–

okay so manadv_set_context_attr(3) is the manual page for manadv_set_context_attr, and she is here to help you set context attributes. Bestie, this one is giving vendor-specific RDMA context vibes, and we’re gonna get into it. ✨

🌈 SYNOPSIS 🌈

Here’s the exact include and signature, no cap:

#include <infiniband/manadv.h>

int manadv_set_context_attr(struct ibv_context *context,
                            enum manadv_set_ctx_attr_type attr_type,
                            void *attr);

πŸ¦‹ DESCRIPTION πŸ¦‹

manadv_set_context_attr gives the ability to set vendor specific attributes on the RDMA context. That’s the whole main-character job. πŸ‘‘

πŸŽ€ ARGUMENTS πŸŽ€

These are the three arguments, bestie β€” memorize the vibe:

  • 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 🌸

Here’s the enum, and yes, that uint8_t comment is staying:

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.

The struct is literally this:

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).

Slay when it’s 0, bestie β€” and check that errno when it’s not. 😭

πŸ‘‘ AUTHOR πŸ‘‘

Long Li <longli@microsoft.com>


Cute sign-off time: this is manadv_set_context_attr(3), and the footer doesn’t list a source/version/date β€” so that’s the whole page, bestie. πŸ’…πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from