.\" Automatically generated by Pandoc 3.8.2.1
.\"
.TH "mlx5dv_open_device" "3" "" ""
.SH NAME
mlx5dv_open_device \- Open an RDMA device context for the mlx5 provider
.SH SYNOPSIS
.IP
.EX
#include \f[B]<infiniband/mlx5dv.h>\f[R]

\f[B]struct\f[R] ibv_context *
mlx5dv_open_device(\f[B]struct\f[R] ibv_device *device, \f[B]struct\f[R] mlx5dv_context_attr *attr);
.EE
.SH DESCRIPTION
Open an RDMA device context with specific mlx5 provider attributes.
.SH ARGUMENTS
.TP
\f[I]device\f[R]
RDMA device to open.
.PP
\f[I]attr\f[R]
.SS mlx5dv_context_attr
.IP
.EX
\f[B]struct\f[R] mlx5dv_context_attr {
        uint32_t flags;
        uint64_t comp_mask;
        \f[B]struct\f[R] ibv_fd_arr *fds;
};
.EE
.TP
\f[I]flags\f[R]
.IP
.EX
  A bitwise OR of the various values described below.

  *MLX5DV_CONTEXT_FLAGS_DEVX*:
  Allocate a DEVX context
.EE
.TP
\f[I]comp_mask\f[R]
.IP
.EX
  Bitmask specifying what fields in the structure are valid

  *MLX5DV_CONTEXT_ATTR_MASK_FD_ARRAY*:
  Valid value in *fds*
.EE
.TP
\f[I]fds\f[R]
.IP
.EX
  Used to pass a file descriptor array.
.EE
.SS ibv_fd_arr
.IP
.EX
\f[B]struct\f[R] ibv_fd_arr {
        int *arr;
        uint32_t count;
};
.EE
.TP
\f[I]arr\f[R]
.IP
.EX
 Pointer to the file descriptor array.
.EE
.TP
\f[I]count\f[R]
.IP
.EX
 Number of elements in the array.
.EE
.SH RETURN VALUE
Returns a pointer to the allocated device context, or NULL if the
request fails.
.SH SEE ALSO
\f[I]ibv_open_device(3)\f[R]
.SH AUTHOR
Yishai Hadas \c
.MT yishaih@mellanox.com
.ME \c
