RDMA_GET_RECV_COMP(3)

✨ RDMA_GET_RECV_COMP(3) ✨

okay so bestie, welcome to the librdmacm programmer's manual πŸ’– this one's about rdma_get_recv_comp and it is literally the girl who fetches your finished receive requests for you. no cap.


🌸 NAME 🌸

rdma_get_recv_comp β€” retrieves a completed receive request. that's it, that's the job πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <rdma/rdma_verbs.h>

int rdma_get_recv_comp (struct rdma_cm_id *id, struct ibv_wc *wc);

look at her. two params. serving c declarations. iconic ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • id β€” a reference to a communication identifier to check for completions. like, the little ID card of the thing you're vibe-checking πŸ‘‘
  • wc β€” a reference to a work completion structure to fill in. she's empty when you hand her over, and she gets ✨filled✨ bestie 🫢

πŸ’œ DESCRIPTION πŸ’œ

Retrieves a completed work request for a receive operation. the way that it just… hands you the finished thing 😭

Info about the completed request comes back through the wc parameter, and the wr_id is set to the context of the request. so you always know which one it was, no mystery boxes fr fr

For the deets on the work completion structure itself, go peek at ibv_poll_cq. she has the lore πŸ“–


🌈 RETURN VALUE 🌈

Returns the number of returned completions β€” that's 0 or 1 β€” on success, or -1 on error. πŸ™ˆ

If an error happens, errno will be set to indicate the failure reason. so like, always check errno, she's not being dramatic, she's being honest πŸ’€


⭐ NOTES ⭐

This calls polls the receive completion queue associated with an rdma_cm_id. yes, the original says "calls polls" and we are respectfully preserving that typo, periodt πŸ‘‘

If a completion is not found, the call blocks until a request completes. like, fully sits there and waits. main character energy but make it patient 🧚

This call should only be used on rdma_cm_id's that do not share CQs with other rdma_cm_id's, and that maintain separate CQs for sends and receive completions. do not skip this one bestie, it's giving real consequences πŸ’…

πŸ“ SEE ALSO πŸ“

the whole friend group, go say hi 🫢


and that's the page!! librdmacm, dated 2010-07-19 β€” she's been slaying since 2010 and honestly? still ate. bye bestie, go poll that CQ πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from