mlx5dv_get_data_direct_sysfs_path(3)
π mlx5dv_get_data_direct_sysfs_path(3) β the girlies' guide to finding your data direct device path
okay so bestie, this is a mlx5dv manpage, section 3 of the manual, and it's about one little function that tells you where your data direct device lives in sysfs. no cap, that's the whole vibe. let's get into it π
β¨ SYNOPSIS β¨
#include <infiniband/mlx5dv.h>
int mlx5dv_get_data_direct_sysfs_path(struct ibv_context *context, char *buf,
size_t buf_len)
that's the whole cast of characters right there π«Ά
πΈ DESCRIPTION πΈ
okay so picture this: you've got a context, right? and you wanna know if there's a data direct device attached to it, and if there is β which one. this function is literally the one that hands you the sysfs path of the data direct device that's associated with the given context. β¨
like, this is the moment where an application gets to discover whether a data direct device is even associated with the given context, and if so, which one it is. main character discovery energy, honestly. π₯
π ARGUMENTS π
contextβ the RDMA device context you wanna work on. your starting point, your home base πbufβ the buffer where thesysfspath of the associated data direct device gets placed. this is where the magic lands β¨buf_lenβ the length of that buffer. keep it honest, bestie, because size matters here π
π RETURN VALUE π
upon success, 0 is returned β slay. π
or, if things go sideways, you get the value of errno. and yes, that's errno, the classic "something went wrong and here's the drama" number. π
π ERRORS π
these are the specific error values you should genuinely be considering, fr fr:
ENODEVβ there's no associated data direct device for the givencontext. it's giving "nobody's home" π«ENOSPCβ the input buffer size is too small to hold the fullsysfspath. yourbufsimply did not eat enough to hold the whole thing, and honestly? it's giving cramped. π
π¦ NOTES π¦
okay this bit is important so pay attention: upon success, the caller should add the /sys/ prefix to get the full sysfs path. yes, you have to do it. the function hands you the path and you finish the look. π
β¨
literally don't forget the /sys/ prefix. ngl it's the whole point of the note. π
π SEE ALSO π
mlx5dv_reg_dmabuf_mr(3)β go read this one next, iykyk π
π AUTHOR π
Yishai Hadas <yishaih@nvidia.com> β thank you for your service, icon π
and that's the whole page, bestie π§ this was mlx5dv_get_data_direct_sysfs_path(3), brought to you by the mlx5dv_get_data_direct_sysfs_path(3) manual page itself β same title in the header, same title down in the footer, the way that it's bookended is honestly iconic. periodt. π
β
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms