.\" Automatically generated by Pandoc 3.6 .\" .TH "mlx5dv_devx_umem_export / mlx5dv_devx_umem_import / mlx5dv_devx_umem_unimport" "3" "" "" .SH NAME mlx5dv_devx_umem_export \- Export DEVX UMEM attributes for cross\-process sharing .PP mlx5dv_devx_umem_import \- Import a DEVX UMEM from exported attributes .PP mlx5dv_devx_umem_unimport \- Unimport a DEVX UMEM .SH SYNOPSIS .IP .EX #include \f[B]\f[R] int mlx5dv_devx_umem_export(\f[B]struct\f[R] mlx5dv_devx_umem *umem, void *data); \f[B]struct\f[R] mlx5dv_devx_umem * mlx5dv_devx_umem_import(\f[B]struct\f[R] ibv_context *context, void *data); void mlx5dv_devx_umem_unimport(\f[B]struct\f[R] mlx5dv_devx_umem *umem); .EE .SH DESCRIPTION These functions enable cross\-process sharing of DEVX UMEM objects. .PP \f[I]mlx5dv_devx_umem_export()\f[R] exports DEVX UMEM attributes into a data buffer. The buffer must be allocated by the caller with at least the size returned by \f[I]mlx5dv_get_export_sizes()\f[R] in the \f[I]devx_umem_attrs_size\f[R] field. .PP \f[I]mlx5dv_devx_umem_import()\f[R] returns a DEVX UMEM that is associated with the exported attributes in the given \f[I]context\f[R]. The \f[I]data\f[R] buffer must have been previously filled by \f[I]mlx5dv_devx_umem_export()\f[R]. .PP The \f[I]context\f[R] can be the original UMEM registering context or any context sharing the same kernel resources (e.g., via \f[I]ibv_import_device()\f[R]). .PP \f[I]mlx5dv_devx_umem_unimport()\f[R] unimports a DEVX UMEM that was imported via \f[I]mlx5dv_devx_umem_import()\f[R]. Once the UMEM usage has ended, either \f[I]mlx5dv_devx_umem_dereg()\f[R] or \f[I]mlx5dv_devx_umem_unimport()\f[R] should be called. \f[I]mlx5dv_devx_umem_dereg()\f[R] deregisters the kernel object, while \f[I]mlx5dv_devx_umem_unimport()\f[R] only cleans up local resources without affecting the kernel object. .PP It is the responsibility of the application to coordinate between all contexts that use this UMEM. Once deregistration is done, no other process can use the object except for unimport. All users must collaborate to ensure this. .SH ARGUMENTS .SS mlx5dv_devx_umem_export .TP \f[I]umem\f[R] The DEVX UMEM to export. .TP \f[I]data\f[R] Pointer to a buffer to be filled with the exported attributes. The buffer must be at least \f[I]devx_umem_attrs_size\f[R] bytes as returned by \f[I]mlx5dv_get_export_sizes()\f[R]. .SS mlx5dv_devx_umem_import .TP \f[I]context\f[R] RDMA device context to import the DEVX UMEM into. .TP \f[I]data\f[R] Pointer to a buffer previously filled by \f[I]mlx5dv_devx_umem_export()\f[R]. .SH RETURN VALUE \f[I]mlx5dv_devx_umem_export()\f[R] returns 0 on success, or the value of errno on error. .PP \f[I]mlx5dv_devx_umem_import()\f[R] returns a pointer to a \f[I]struct mlx5dv_devx_umem\f[R] on success, or NULL on error with errno set. .SH SEE ALSO \f[B]mlx5dv_devx_umem_reg\f[R], \f[B]mlx5dv_get_export_sizes\f[R], \f[B]mlx5dv_open_device\f[R] .SH AUTHOR Maher Sanalla \c .MT msanalla@nvidia.com .ME \c