.\" 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.
.SS \f[I]attr\f[R] argument
.IP
.nf
\f[C]
struct mlx5dv_context_attr {
        uint32_t flags;
        uint64_t comp_mask;
};
\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
\f[R]
.fi
.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>
