MLX5DV_RESERVED_QPN_ALLOC(3)
okay bestie, this is the mlx5dv_res...c / dealloc(3) page from the mlx5 Programmer’s Manual — let’s get into it 💅
✨ NAME ✨
mlx5dv_reserved_qpn_alloc— allocate a reserved QP number from devicemlx5dv_reserved_qpn_dealloc— release the reserved QP number
🛠️ SYNOPSIS 🛠️
#include <infiniband/mlx5dv.h>
int mlx5dv_reserved_qpn_alloc(struct ibv_context *ctx, uint32_t *qpn);
int mlx5dv_reserved_qpn_dealloc(struct ibv_context *ctx, uint32_t qpn);
💖 DESCRIPTION 💖
okay so when you’re working with RDMA_CM RDMA_TCP_PS + external QP support, a client node needs GUID level unique QP numbers to comply with the CM’s timewait logic. no cap, that’s the whole vibe check here 🫶
If a real unique QP is not allocated, a device global QPN value is required and can be allocated via this interface. lowkey iconic ✨
The mlx5 DCI QP is such an example, which could connect to the remote DCT’s multiple times as long as the application provides unique QPN for each new RDMA_CM connection. it’s giving “unique QPN per connection” energy 🔥
These 2 APIs provide the allocation/deallocation of a unique QP number from/to device. This qpn can be used with DC QPN in RDMA_CM connection establishment, which will comply with the CM timewait kernel logic. periodt 💅
🌸 ARGUMENTS 🌸
ctx— the device context to issue the action on.qpn— the allocated QP number (for alloc API), or the QP number to be deallocated (for dealloc API).
⭐ RETURN VALUE ⭐
0 on success; EOPNOTSUPP if not supported, or other errno value on other failures.
👑 AUTHOR 👑
Mark Zhang <markzhang@nvidia.com>Alex Rosenbaum <alexr@nvidia.com>
Source: mlx5 • Date: 2020-12-29 • Page: mlx5dv_res...c / dealloc(3) — catch u later bestie, mwah 🫶💖
📦 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
- ubuntu jammy: libibverbs-dev 39.0-1 · BSD-MIT OR GPL-2.0-only
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms