UMAD_RECV(3)
π UMAD_RECV(3) β the OpenIB Programmer's Manual girlies know
okay so bestie, welcome to umad_recv(3) π«Ά this is the one where you literally just wait for a MAD message to show up at your port. it's giving patient main character energy. no cap.
β¨ NAME β¨
umad_recv β receive umad π
πΈ SYNOPSIS πΈ
#include <infiniband/umad.h>
int umad_recv(int portid, void *umad, int *length, int timeout_ms);
π DESCRIPTION π
umad_recv() sits there and waits up to timeout_ms milliseconds for an incoming MAD message to be received from the port that portid points at. it's literally just vibing until the mail arrives. π
a MAD "message" is either a single MAD packet or a coalesced multipacket RMPP transmission. in the RMPP case, the header of the first RMPP packet gets returned as the header of the buffer, and the buffer data holds the coalesced data section of every subsequent RMPP MAD packet in that transmission. so basically all the RMPP headers except the first one do NOT get copied to user space from the kernel β ngl, that's just how it is. π
the message gets copied into the umad buffer if there's enough room, and the received length is indicated. if the buffer is not big enough, then the size of the umad buffer you actually need is returned in length instead. π
- a negative
timeout_msmakes the function block until a packet is received (commitment issues? not this function. it'll wait forever for you π) - a
timeout_msof zero means a non blocking read π¦
note bestie:lengthis a pointer to the length of the data portion of theumadbuffer. that meansumadmust point to a buffer at leastumad_size() + *lengthbytes long. do the math, slay. β¨
also note: *length must be >= 256 bytes. this length allows for at least a single MAD packet to be returned. periodt. π
π RETURN VALUE π
umad_recv() on success returns the agentid. on error, errno is set and a negative value is returned as follows:
-EINVALβ invalid port handle or agentid, or*lengthis less than the minimum supported π-EIOβ receive operation failed π-EWOULDBLOCKβ non blocking read can't be fulfilled, it's giving "no thoughts, head empty" π-ENOSPCβ the provided buffer is not long enough for the complete message. it's giving too small, bestie π
π₯ SEE ALSO π₯
π AUTHOR π
Hal Rosenstock <halr@voltaire.com>
and that's the whole page fr fr π this was the OpenIB era, dated May 11, 2007 β iconic, historic, we stan a legacy manpage πβ¨π bye bestie, go receive some MADs π¦
π¦ 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: libibumad-dev 44.0-2 Β· BSD-MIT OR GPL-2.0-only
- debian trixie: libibumad-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: libibumad-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: libibumad-dev 50.0-2build2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: libibumad-dev 50.0-2ubuntu0.2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu questing: libibumad-dev 56.1-1ubuntu1
- ubuntu resolute: libibumad-dev 61.0-2ubuntu3 Β· BSD-MIT OR GPL-2.0-only
- ubuntu stonking: libibumad-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