mlx5dv_get_export_sizes(3)

πŸ“¦
version 65.0 Β· 3 versions
, in arch rolling

πŸ’… 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 a struct mlx5dv_export_sizes to 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 for mlx5dv_var_export() / mlx5dv_var_import().
  • devx_umem_attrs_size β€” buffer size required for mlx5dv_devx_umem_export() / mlx5dv_devx_umem_import().
  • devx_obj_attrs_size β€” buffer size required for mlx5dv_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_export
  • mlx5dv_devx_umem_export
  • mlx5dv_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