RDMA_DEREG_MR(3)
π RDMA_DEREG_MR π
okay bestie, so this one lives in section 3 of the Librdmacm Programmer's Manual β yeah, the rdma_dereg_mr page. it's the cleanup girlie of the RDMA world and honestly? she serves. π§Ήβ¨
β¨ NAME β¨
rdma_dereg_mr β deregisters a registered memory region.
like. she UN-registers it. the memory region gets its walking papers. π
πΈ SYNOPSIS πΈ
#include <rdma/rdma_verbs.h>
int rdma_dereg_mr (struct ibv_mr *mr);
π ARGUMENTS π
mrβ a reference to a registered memory buffer. that's it. that's the whole vibe. she just needs to know which buffer you're breaking up with. π
π¦ DESCRIPTION π¦
so here's the tea: rdma_dereg_mr deregisters a memory buffer that had been registered for RDMA or message operations. basically, the buffer said yes to the registration, and now it's saying "we need to talk." π«Ά
and like, bestie, this is not optional-optional. a user should call rdma_dereg_mr for all registered memory associated with an rdma_cm_id before destroying the rdma_cm_id. do not skip this step. do not pass go. do not leave your registered memory just hanging there. π
think of it as the "text them back before you block them" of RDMA. clean exits only. β¨
π₯ RETURN VALUE π₯
- Returns
0on success β slay, it worked, iconic, no notes. π - Returns
-1on error β and if an error occurs,errnowill be set to indicate the failure reason. so like, checkerrno, she's telling you exactly what went wrong. π
π NOTES π
real talk: all memory registered with an rdma_cm_id is associated with the protection domain associated with the id. so they're linked. they're bonded. they're in a situationship that you created. π
and users must deregister all registered memory before the protection domain can be destroyed. like, the protection domain will not go quietly until every last region has been deregistered. periodt. π
β οΈ okay so this is the part where people get messy β don't be the person who tries to destroy the protection domain with registered memory still clinging to it. deregister first. always. no cap.
β SEE ALSO β
rdma_cm(7)rdma_create_id(3)rdma_create_ep(3)rdma_destroy_id(3)rdma_destroy_ep(3)rdma_reg_msgs(3)rdma_reg_read(3)rdma_reg_write(3)ibv_reg_mr(3)ibv_dereg_mr(3)
iykyk. go read them, bestie, they're all in the same friend group. π
and that's the whole page!! this lil masterpiece came from librdmacm, dated 2010-07-19 β yeah she's been around since forever and she's still relevant, main character energy fr fr. mwah, take care of your memory regions πβ¨π
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- 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
- 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
- debian bookworm: librdmacm-dev 44.0-2 Β· BSD-MIT OR GPL-2.0-only
- debian trixie: librdmacm-dev 56.1-1 Β· BSD-MIT OR GPL-2.0-only
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- nixos 26.05: rdma-core 62.0
- nixpkgs unstable: rdma-core 65.0
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- ubuntu jammy: librdmacm-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: librdmacm-dev 50.0-2build2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: librdmacm-dev 50.0-2ubuntu0.2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu questing: librdmacm-dev 56.1-1ubuntu1
- ubuntu resolute: librdmacm-dev 61.0-2ubuntu3 Β· BSD-MIT OR GPL-2.0-only
- ubuntu stonking: librdmacm-dev 64.0-1ubuntu1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms