| NAME | SYNOPSIS | DESCRIPTION | ARGUMENTS | RETURN VALUE | COLOPHON | |
|  | 
mlx4dv_set_context_attr(3)                     mlx4dv_set_context_attr(3)
       mlx4dv_set_context_attr - Set context attributes
              #include <infiniband/mlx4dv.h>
              int mlx4dv_set_context_attr(struct ibv_context *context,
                                          enum mlx4dv_set_ctx_attr_type attr_type,
                                          void *attr);
       mlx4dv_set_context_attr gives the ability to set vendor specific
       attributes on the RDMA context.
       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 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,
              };
       MLX4DV_SET_CTX_ATTR_LOG_WQS_RANGE_SZ
              Change the LOG WQs Range size for RSS
       MLX4DV_SET_CTX_ATTR_BUF_ALLOCATORS
              Provide an external buffer allocator
              struct mlx4dv_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 libmlx4
              internal method
       free   Function used to free buffers allocated by alloc function
       data   Metadata that can be used by alloc and free functions
       Returns 0 on success, or the value of errno on failure (which
       indicates the failure reason).
       #AUTHOR
       Majd Dibbiny ⟨majd@mellanox.com⟩
       This page is part of the rdma-core (RDMA Core Userspace Libraries
       and Daemons) project.  Information about the project can be found
       at ⟨https://github.com/linux-rdma/rdma-core⟩.  If you have a bug
       report for this manual page, send it to
       linux-rdma@vger.kernel.org.  This page was obtained from the
       project's upstream Git repository
       ⟨https://github.com/linux-rdma/rdma-core.git⟩ on 2025-08-11.  (At
       that time, the date of the most recent commit that was found in
       the repository was 2025-08-04.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there is
       a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org
                                               mlx4dv_set_context_attr(3)