.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "mlx5dv_open_device" "3" "" "" ""
.hy
.SH NAME
.PP
mlx5dv_open_device - Open an RDMA device context for the mlx5 provider
.SH SYNOPSIS
.IP
.nf
\f[C]
#include <infiniband/mlx5dv.h>

struct ibv_context *
mlx5dv_open_device(struct ibv_device *device, struct mlx5dv_context_attr *attr);
\f[R]
.fi
.SH DESCRIPTION
.PP
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
.nf
\f[C]
struct mlx5dv_context_attr {
        uint32_t flags;
        uint64_t comp_mask;
        struct ibv_fd_arr *fds;
};
\f[R]
.fi
.TP
\f[I]flags\f[R]
.IP
.nf
\f[C]
A bitwise OR of the various values described below.

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

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