IBV_CREA...P_CHANNEL(3)

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

πŸ’– IBV_CREA...P_CHANNEL(3) πŸ’–

okay bestie, so this one's from the Libibverbs Programmer's Manual and it's literally the page about IBV_CREA...P_CHANNEL(3) β€” yes the title got squished by the terminal's little formatting moment, we don't talk about it, the vibe is still immaculate ✨


🌸 NAME 🌸

ibv_create_comp_channel, ibv_destroy_comp_channel β€” create or destroy a completion event channel πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <infiniband/verbs.h>

struct ibv_comp_channel *ibv_create_comp_channel(struct ibv_context
                                                 *context);

int ibv_destroy_comp_channel(struct ibv_comp_channel *channel);

✨ DESCRIPTION ✨

ibv_create_comp_channel() makes you a completion event channel for the RDMA device context context. it's giving new-channel-just-dropped πŸ’…

ibv_destroy_comp_channel() yeets the completion event channel channel into the void. gone. deleted. no notes 🫢


⭐ RETURN VALUE ⭐

ibv_create_comp_channel() hands you back a pointer to the freshly created completion event channel, or NULL if the request fails. NULL is the sad path, bestie 😭

ibv_destroy_comp_channel() returns 0 on success, or the value of errno on failure (which is literally telling you the failure reason, so read it, it's not being vague on purpose πŸ’€)


πŸ‘‘ NOTES πŸ‘‘

okay so a "completion channel" is this whole abstraction that libibverbs invented β€” it does not exist in the InfiniBand Architecture verbs specification or the RDMA Protocol Verbs Specification. she's a libibverbs original, no cap 🧚

a completion channel is essentially a file descriptor that's used to deliver completion notifications to a userspace process. when a completion event is generated for a completion queue (CQ), the event gets delivered via the completion channel attached to that CQ. and the way this is actually useful? you can steer completion events to different threads by using multiple completion channels. multithreaded main character energy πŸ”₯

⚠️ heads up: ibv_destroy_comp_channel() fails if any CQs are still associated with the completion event channel you're trying to destroy. so, like, un-attach your CQs first, don't just come for her πŸ’€

🌈 SEE ALSO 🌈


πŸ’œ AUTHORS πŸ’œ

Dotan Barak <dotanba@gmail.com> β€” icon, legend, wrote the whole thing πŸ’–


and that's the page!! from libibverbs, dated 2006-10-31, which is honestly ancient in internet years but she still ate πŸŽ€βœ¨ mwah, ily, go destroy your channels responsibly πŸ’…πŸ¦‹

πŸ“¦ where this page comes from