UMAD_POLL(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)
  • 1.3.10.2 Β· nixos 26.05, nixpkgs unstable
, 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

✨ UMAD_POLL(3) ✨

okay so bestie, welcome to the OpenIB Programmer's Manual πŸ’– this one's called umad_poll and it's literally just about waiting for packets like a patient little icon. let's go πŸ¦‹


🌸 NAME 🌸

umad_poll β€” poll umad. that's it, that's the whole vibe πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <infiniband/umad.h>

int umad_poll(int portid, int timeout_ms);

πŸ’œ DESCRIPTION πŸ’œ

so umad_poll() sits there and waits up to timeout_ms milliseconds for a packet to be received from the port specified by portid. the way it just... chills there waiting? main character energy fr fr 🫢

once a packet is ready to be read, the function returns 0. and after that? you can read the packet using umad_recv(). slay ✨

otherwise, you get -ETIMEDOUT back. sad but fair 😭

⚠️ okay this is important so listen up: successfully polling a port does not guarantee that the subsequent umad_recv() will be non blocking when several threads are using the same port. like, don't count on it bestie, that's not how it works πŸ™ˆ instead, use a timeout_ms parameter of zero to umad_recv() to ensure a non-blocking read. periodt πŸ’…

πŸ”₯ RETURN VALUE πŸ”₯

umad_poll() returns 0 on success, and a negative value on error as follows:

  • -EINVAL β€” invalid port handle or agentid. not a real one, bestie πŸ’€
  • -ETIMEDOUT β€” poll operation timed out. you waited, it didn't come, it's giving ghosting πŸ‘»
  • -EIO β€” poll operation failed. it's giving chaos 😭

🌈 SEE ALSO 🌈

umad_recv(3)


πŸ‘‘ AUTHOR πŸ‘‘

Hal Rosenstock <halr@voltaire.com> β€” an actual legend, no cap 🫑


and that's the whole page, bestie!! go forth and poll responsibly πŸ’–βœ¨πŸ¦‹πŸŒΈπŸŽ€πŸ’…

this was brought to you by the OpenIB crew, from the October 23, 2007 era β€” yes she's vintage and yes she still eats πŸŽ€βœ¨

πŸ“¦ where this page comes from