mlx5dv_alloc_dm(3)
π NAME π
This is mlx5dv_alloc_dm(3), bestie β fresh out of the mlx5 Programmerβs Manual β¨
mlx5dv_alloc_dm β allocates device memory (DM) π«Ά
πΈ SYNOPSIS πΈ
#include <infiniband/mlx5dv.h>
struct ibv_dm *mlx5dv_alloc_dm(struct ibv_context *context,
struct ibv_alloc_dm_attr *dm_attr,
struct mlx5dv_alloc_dm_attr *mlx5_dm_attr)
π¦ DESCRIPTION π¦
mlx5dv_alloc_dm() allocates device memory (DM) with specific driver properties. Thatβs the whole assignment, and it understood it π
π ARGUMENTS π
For context and dm_attr, please go look at the ibv_alloc_dm(3) man page β itβs all there, iykyk πβ¨
π§ mlx5_dm_attr π§
struct mlx5dv_alloc_dm_attr {
enum mlx5dv_alloc_dm_type type;
uint64_t comp_mask;
};
β type β
This is the device memory type the user wishes to allocate, and there are so many vibes to choose from:
MLX5DV_DM_TYPE_MEMICβ Device memory of type MEMIC: on-chip memory that can be allocated and used as a memory region for transmitting/receiving packet directly from/to the memory on the chip. On-chip realness. π₯MLX5DV_DM_TYPE_STEERING_SW_ICMβ Device memory of type STEERING SW ICM: this memory is used by the device to store the packet steering tables and rules. It can be used for direct table and steering rules creation when allocated by a privileged user. Privileged-user energy. πMLX5DV_DM_TYPE_HEADER_MODIFY_SW_ICMβ Device memory of type HEADER MODIFY SW ICM: this memory is used by the device to store the packet header modification tables and rules. It can be used for direct table and header modification rules creation when allocated by a privileged user. Header-modification icon behavior. π§MLX5DV_DM_TYPE_HEADER_MODIFY_PATTERN_SW_ICMβ Device memory of type HEADER MODIFY PATTERN SW ICM: this memory is used by the device to store packet header modification patterns/templates. It can be used for direct table and header modification rules creation when allocated by a privileged user. Patterns and templates, literally. πΈMLX5DV_DM_TYPE_ENCAP_SW_ICMβ Device memory of type PACKET ENCAP SW ICM: this memory is used by the device to store packet encap data. It can be used for packet encap reformat rules creation when allocated by a privileged user. Encap data said slay. π
π comp_mask π
Bitmask specifying what fields in the structure are valid. Currently reserved and should be set to 0. No cap, just set it to zero π
π RETURN VALUE π
mlx5dv_alloc_dm() returns a pointer to the created DM. On error, NULL will be returned and errno will be set. Bestie, check that NULL and errno, fr fr. π
π«Ά SEE ALSO π«Ά
π AUTHOR π
Ariel Levkovich <lariel@mellanox.com> π
Source/version: mlx5 π Date: 2018-9-1 π Thatβs the whole manual-page moment, bestie β go allocate some device memory and be iconic π
π¦ 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