.\" Automatically generated by Pandoc 3.1.11.1
.\"
.TH "mlx5dv_get_data_direct_sysfs_path" "3" "" "" ""
.SH NAME
mlx5dv_get_data_direct_sysfs_path \- Get the sysfs path of a data direct
device
.SH SYNOPSIS
.IP
.EX
#include <infiniband/mlx5dv.h>

int mlx5dv_get_data_direct_sysfs_path(struct ibv_context *context, char *buf,
                                      size_t buf_len)
.EE
.SH DESCRIPTION
Get the sysfs path of the data direct device that is associated with the
given \f[I]context\f[R].
.PP
This lets an application to discover whether/which data direct device is
associated with the given \f[I]context\f[R].
.SH ARGUMENTS
.TP
\f[I]context\f[R]
RDMA device context to work on.
.TP
\f[I]buf\f[R]
The buffer where to place the sysfs path of the associated data direct
device.
.TP
\f[I]buf_len\f[R]
.IP
.EX
The length of the buffer.
.EE
.SH RETURN VALUE
Upon success 0 is returned or the value of errno on a failure.
.SH ERRORS
The below specific error values should be considered.
.TP
ENODEV
.IP
.EX
There is no associated data direct device for the given *context*.
.EE
.TP
ENOSPC
.IP
.EX
The input buffer size is too small to hold the full sysfs path.
.EE
.SH NOTES
Upon succees, the caller should add the /sys/ prefix to get the full
sysfs path.
.SH SEE ALSO
\f[I]mlx5dv_reg_dmabuf_mr(3)\f[R]
.SH AUTHOR
Yishai Hadas \c
.MT yishaih@nvidia.com
.ME \c
