.\" Automatically generated by Pandoc 3.1.11.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 <infiniband/mlx5dv.h>

struct ibv_context *
mlx5dv_open_device(struct ibv_device *device, struct 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.
.SS \f[I]attr\f[R] argument
.IP
.EX
struct mlx5dv_context_attr {
        uint32_t flags;
        uint64_t comp_mask;
};
.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
.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
