.\" Automatically generated by Pandoc 1.19.2.4
.\"
.TH "mlx4dv_set_context_attr" "3" "" "" ""
.hy
.SH NAME
.PP
mlx4dv_set_context_attr \- Set context attributes
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <infiniband/mlx4dv.h>

int\ mlx4dv_set_context_attr(struct\ ibv_context\ *context,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ enum\ mlx4dv_set_ctx_attr_type\ attr_type,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ void\ *attr);
\f[]
.fi
.SH DESCRIPTION
.PP
mlx4dv_set_context_attr gives the ability to set vendor specific
attributes on the RDMA context.
.SH ARGUMENTS
.TP
.B \f[I]context\f[]
RDMA device context to work on.
.RS
.RE
.TP
.B \f[I]attr_type\f[]
The type of the provided attribute.
.RS
.RE
.TP
.B \f[I]attr\f[]
Pointer to the attribute to be set.
## attr_type
.RS
.RE
.IP
.nf
\f[C]
enum\ mlx4dv_set_ctx_attr_type\ {
\ \ \ \ /*\ Attribute\ type\ uint8_t\ */
\ \ \ \ MLX4DV_SET_CTX_ATTR_LOG_WQS_RANGE_SZ\ \ \ \ =\ 0,
\ \ \ \ MLX4DV_SET_CTX_ATTR_BUF_ALLOCATORS\ \ =\ 1,
};
\f[]
.fi
.TP
.B \f[I]MLX4DV_SET_CTX_ATTR_LOG_WQS_RANGE_SZ\f[]
Change the LOG WQs Range size for RSS
.RS
.RE
.TP
.B \f[I]MLX4DV_SET_CTX_ATTR_BUF_ALLOCATORS\f[]
Provide an external buffer allocator
.RS
.RE
.IP
.nf
\f[C]
struct\ mlx4dv_ctx_allocators\ {
\ \ \ \ void\ *(*alloc)(size_t\ size,\ void\ *priv_data);
\ \ \ \ void\ (*free)(void\ *ptr,\ void\ *priv_data);
\ \ \ \ void\ *data;
};
\f[]
.fi
.TP
.B \f[I]alloc\f[]
Function used for buffer allocation instead of libmlx4 internal method
.RS
.RE
.TP
.B \f[I]free\f[]
Function used to free buffers allocated by alloc function
.RS
.RE
.TP
.B \f[I]data\f[]
Metadata that can be used by alloc and free functions
.RS
.RE
.SH RETURN VALUE
.PP
Returns 0 on success, or the value of errno on failure (which indicates
the failure reason).
.SH AUTHOR
.PP
Majd Dibbiny <majd@mellanox.com>
