mlx5dv_get_export_sizes(3)
π mlx5dv_get_export_sizes(3) β the Library Functions Manual glow-up β¨
okay bestie, so this one lives in section 3 of the Library Functions Manual, and it's literally the "how big does my buffer need to be" page. let's get into it π«Ά
πΈ NAME πΈ
mlx5dv_get_export_sizes β query export buffer sizes for mlx5 objects. yes, that's the whole vibe: you ask, it tells you how much room you need. no cap π
β¨ SYNOPSIS β¨
#include <infiniband/mlx5dv.h>
struct mlx5dv_export_sizes {
uint32_t var_attrs_size;
uint32_t devx_umem_attrs_size;
uint32_t devx_obj_attrs_size;
};
void mlx5dv_get_export_sizes(struct mlx5dv_export_sizes *sizes);
like, look at that struct. three uint32_t fields. she's simple, she's iconic, she's the blueprint π
π¦ DESCRIPTION π¦
so mlx5dv_get_export_sizes() hands you back the buffer sizes that the export/import APIs need for each supported object type. basically it's the friend who tells you the dress code before you show up π
the caller β that's you, bestie β should use these sizes to allocate data buffers before calling the corresponding export/import functions. allocate first, then call. no showing up empty-handed.
β οΈ heads up: the sizes it returns reflect the library's internal data layout and may change between library versions. so don't hardcode them, don't screenshot them, don't get attached. query every time, it's giving "nothing is permanent" π
π ARGUMENTS π
sizesβ pointer to astruct mlx5dv_export_sizesto be filled. you give her an empty struct, she gives you the numbers. a fair trade tbh π«Ά
π§ mlx5dv_export_sizes
var_attrs_sizeβ buffer size required formlx5dv_var_export()/mlx5dv_var_import().devx_umem_attrs_sizeβ buffer size required formlx5dv_devx_umem_export()/mlx5dv_devx_umem_import().devx_obj_attrs_sizeβ buffer size required formlx5dv_devx_obj_export()/mlx5dv_devx_obj_import().
three fields, three responsibilities. each one is a matching set of export + import. she's organized, I love that for her π
π SEE ALSO π
mlx5dv_var_exportmlx5dv_devx_umem_exportmlx5dv_devx_obj_export
go read these next, they're the ones actually using the sizes you just got. iykyk π
π AUTHOR π
Maher Sanalla β msanalla@nvidia.com. thank you for your service, legend π«‘
and that's the whole page, bestie! this was mlx5dv_get_export_sizes(3) straight out of the Library Functions Manual β no version or date info was printed down there in the footer, just the page name, so I'm not gonna make one up fr fr. catch you on the next manpage ππβ¨
π¦ where this page comes from
- arch rolling: rdma-core 65.0-1 Β· GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-MIT AND GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-FreeBSD AND GPL-2.0-or-later OR LicenseRef-Intel-BSD-3-Clause AND GPL-2.0-or-later OR LicenseRef-PathScale-BSD-Patent-License AND CC0-1.0 AND MIT AND BSD-2-Clause AND CPL-1.0 OR BSD-2-Clause OR GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms