RDMA_DISCONNECT(3)
π RDMA_DISCONNECT π
okay so bestie, welcome to RDMA_DISCONNECT(3) from the Librdmacm Programmer's Manual β yes it's a section 3 page, yes it's giving library-function realness, and yes we're gonna read it together like the iconic duo we are π«Ά
β¨ NAME β¨
rdma_disconnect β this function disconnects a connection. that's it. that's the whole job. she does one thing and she does it flawlessly π
β¨ SYNOPSIS β¨
#include <rdma/rdma_cma.h>
int rdma_disconnect (struct rdma_cm_id *id);
look at her. one include, one function call, zero drama (until the disconnect, but we'll get there) β¨
β¨ ARGUMENTS β¨
idβ the RDMA identifier. she's the main character here, the whole connection's little passport π
β¨ DESCRIPTION β¨
so here's the tea, bestie β β rdma_disconnect disconnects a connection, and it also transitions any associated QP (queue pair, iykyk) to the error state. and when a QP goes into the error state, that means it will flush any posted work requests straight to the completion queue. like, everything in flight gets yeeted to the CQ. periodt.
this routine should be called by both the client side and the server side of a connection. not just one. both. it takes two to tango and it takes two to disconnect, apparently π
and after successfully disconnecting, an RDMA_CM_EVENT_DISCONNECTED event will be generated on both sides of the connection. so like, mutual closure. we love to see it π
β¨ RETURN VALUE β¨
- returns
0on success π - returns
-1on error π
and if an error occurs, errno will be set to indicate the failure reason. classic. she's not gonna tell you what went wrong out loud, you have to go check errno yourself. mysterious queen energy π
lowkey important:errnois where the actual truth lives, so always peek at it when you get that-1bestie, fr fr.
β¨ SEE ALSO β¨
the whole friend group π«Ά go read them too, they're all part of the same slay π
librdmacm Β· 2008-01-02 β that's the source, the version and the date, babes, and that's the whole page. you now know how to disconnect an RDMA connection like a pro. go forth and close those connections gracefully, bestie, and remember: QP to error state, work requests flushed, both sides get the event. slay π β¨π¦
π¦ 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
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- 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