.\" Automatically generated by Pandoc 3.6.1 .\" .TH "manadv_set_context_attr" "3" "" "" .SH NAME manadv_set_context_attr \- Set context attributes .SH SYNOPSIS .IP .EX #include \f[B]\f[R] int manadv_set_context_attr(\f[B]struct\f[R] ibv_context *context, \f[B]enum\f[R] manadv_set_ctx_attr_type attr_type, void *attr); .EE .SH DESCRIPTION manadv_set_context_attr gives the ability to set vendor specific attributes on the RDMA context. .SH ARGUMENTS .TP \f[I]context\f[R] RDMA device context to work on. .TP \f[I]attr_type\f[R] The type of the provided attribute. .TP \f[I]attr\f[R] Pointer to the attribute to be set. .SS attr_type .IP .EX \f[B]enum\f[R] manadv_set_ctx_attr_type { \f[I]/* Attribute type uint8_t */\f[R] MANADV_SET_CTX_ATTR_BUF_ALLOCATORS = 0, }; .EE .TP \f[I]MANADV_SET_CTX_ATTR_BUF_ALLOCATORS\f[R] Provide an external buffer allocator .IP .EX \f[B]struct\f[R] manadv_ctx_allocators { void *(*alloc)(size_t size, void *priv_data); void (*free)(void *ptr, void *priv_data); void *data; }; .EE .TP \f[I]alloc\f[R] Function used for buffer allocation instead of libmana internal method .TP \f[I]free\f[R] Function used to free buffers allocated by alloc function .TP \f[I]data\f[R] Metadata that can be used by alloc and free functions .SH RETURN VALUE Returns 0 on success, or the value of errno on failure (which indicates the failure reason). .SH AUTHOR Long Li \c .MT longli@microsoft.com .ME \c