mlx5dv_get_data_direct_sysfs_path(3)

mlx5dv_get_data_direct_sysfs_path3

Get the sysfs path of a data direct device

Usage

#include <infiniband/mlx5dv.h>
int mlx5dv_get_data_direct_sysfs_path(struct ibv_context *context, char *buf,
                                      size_t buf_len)

Overview

Get the sysfs path of the data direct device that is associated with the given context.

This lets an application to discover whether/which data direct device is associated with the given context.

Arguments

context

RDMA device context to work on.

buf

The buffer where to place the sysfs path of the associated data direct device.

buf_len
  The length of the buffer.

Return value

Upon success 0 is returned or the value of errno on a failure.

Errors

The below specific error values should be considered.

ENODEV
  There is no associated data direct device for the given *context*.
ENOSPC
  The input buffer size is too small to hold the full sysfs path.

Notes

Upon succees, the caller should add the /sys/ prefix to get the full sysfs path.

Releases

2 releases since Debian 13 (Trixie); the text changed 1 time.

  1. 13
  2. Arch

Author

Yishai Hadas ⟨[email protected]⟩\c

From rdma-core 65.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.