.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .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 struct ibv_device ** mlx5dv_get_vfio_device_list(struct mlx5dv_vfio_context_attr *attr); \f[R] .fi .SH DESCRIPTION .PP Returns a NULL-terminated array of devices based on input \f[I]attr\f[R]. .SH ARGUMENTS .TP \f[I]attr\f[R] Describe the VFIO devices to return in list. .SS \f[I]attr\f[R] argument .IP .nf \f[C] struct mlx5dv_vfio_context_attr { const char *pci_name; uint32_t flags; uint64_t comp_mask; }; \f[R] .fi .TP \f[I]pci_name\f[R] The PCI name of the required device. .TP \f[I]flags\f[R] .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[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 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[R] \f[I]ibv_free_device_list(3)\f[R] .SH AUTHOR .PP Yishai Hadas