.\" Automatically generated by Pandoc 1.16.0.2
.\"
.TH "mlx5dv_get_data_direct_sysfs_path" "3" "" "" ""
.hy
.SH NAME
.PP
mlx5dv_get_data_direct_sysfs_path \- Get the sysfs path of a data direct
device
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <infiniband/mlx5dv.h>

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