.\" Automatically generated by Pandoc 1.16.0.2
.\"
.TH "mlx5dv_get_vfio_device_list" "3" "" "" ""
.hy
.SH NAME
.PP
mlx5dv_get_vfio_device_list \- Get list of available devices to be used
over VFIO
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <infiniband/mlx5dv.h>

struct\ ibv_device\ **
mlx5dv_get_vfio_device_list(struct\ mlx5dv_vfio_context_attr\ *attr);
\f[]
.fi
.SH DESCRIPTION
.PP
Returns a NULL\-terminated array of devices based on input
\f[I]attr\f[].
.SH ARGUMENTS
.TP
.B \f[I]attr\f[]
Describe the VFIO devices to return in list.
.RS
.RE
.SS \f[I]attr\f[] argument
.IP
.nf
\f[C]
struct\ mlx5dv_vfio_context_attr\ {
\ \ \ \ const\ char\ *pci_name;
\ \ \ \ uint32_t\ flags;
\ \ \ \ uint64_t\ comp_mask;
};
\f[]
.fi
.TP
.B \f[I]pci_name\f[]
The PCI name of the required device.
.RS
.RE
.TP
.B \f[I]flags\f[]
.IP
.nf
\f[C]
A\ bitwise\ OR\ of\ the\ various\ values\ described\ below.

*MLX5DV_VFIO_CTX_FLAGS_INIT_LINK_DOWN*:
Upon\ device\ initialization\ link\ should\ stay\ down.
\f[]
.fi
.RS
.RE
.TP
.B \f[I]comp_mask\f[]
.IP
.nf
\f[C]
Bitmask\ specifying\ what\ fields\ in\ the\ structure\ are\ valid.
\f[]
.fi
.RS
.RE
.SH RETURN VALUE
.PP
Returns the array of the matching devices, or sets errno and returns
NULL if the request fails.
.SH NOTES
.PP
Client code should open all the devices it intends to use with
ibv_open_device() before calling ibv_free_device_list().
Once it frees the array with ibv_free_device_list(), it will be able to
use only the open devices; pointers to unopened devices will no longer
be valid.
.SH SEE ALSO
.PP
\f[I]ibv_open_device(3)\f[] \f[I]ibv_free_device_list(3)\f[]
.SH AUTHOR
.PP
Yishai Hadas <yishaih@nvidia.com>
