RDMA_DEREG_MR(3)

πŸ“¦
version 65.0 Β· 2 versions
  • 65.0 Β· alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 15.1 Β· freebsd 14.5, freebsd 15.1
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 0 on success β€” slay, it worked, iconic, no notes. πŸ‘‘
  • Returns -1 on error β€” and if an error occurs, errno will be set to indicate the failure reason. so like, check errno, 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 ⭐

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