RDMA_POST_UD_SEND(3)

✨ RDMA_POST_UD_SEND ✨

okay bestie, sit down, hydrate, and let me tell you about rdma_post_ud_send πŸ’– this one lives in the Librdmacm Programmer's Manual, and it's giving "I send datagrams and I do it flawlessly" energy, no cap πŸ¦‹


🌸 NAME 🌸

rdma_post_ud_send β€” post a work request to send a datagram πŸ’Œ


πŸŽ€ SYNOPSIS πŸŽ€

#include <rdma/rdma_verbs.h>

int rdma_post_ud_send (struct rdma_cm_id *id, void *context, void *addr,
size_t length, struct ibv_mr *mr, int flags, struct ibv_ah *ah, uint32_t
remote_qpn);

like, that's the whole vibe right there ⭐


🫢 ARGUMENTS 🫢

  • id β€” a reference to a communication identifier where the message buffer will be posted. it's the main character of the operation, fr πŸ’…
  • context β€” user-defined context associated with the request. it's your little note-to-self, and it comes back to you later (spoiler πŸ‘€)
  • addr β€” the address of the memory buffer to post. yes, the actual buffer, the real one 🌸
  • length β€” the length of the memory buffer. how much of it, exactly
  • mr β€” optional registered memory region associated with the posted buffer. optional!! but read the NOTES, bestie, because optional β‰  always safe 😭
  • flags β€” optional flags used to control the send operation. for the full menu of what you can put here, see ibv_post_send ✨
  • ah β€” an address handle describing the address of the remote node. it's the little map to the other side πŸ—ΊοΈ
  • remote_qpn β€” the number of the destination queue pair. the destination's queue pair number, periodt

πŸ’« DESCRIPTION πŸ’«

so what it does is: it posts a work request to the send queue of the queue pair associated with the rdma_cm_id. then the contents of the posted buffer will be sent to the specified destination queue pair. that's it, that's the whole job, and it ate πŸ’…πŸ”₯


🌈 RETURN VALUE 🌈

Returns 0 on success, or -1 on error. and if an error happens, errno will be set to indicate the failure reason β€” so like, always check it, don't be out here guessing πŸ™ˆ


πŸ‘‘ NOTES πŸ‘‘

  • the user is responsible for ensuring that the destination queue pair has queued a receive request before issuing the send operations. this is a you job, not an it job, bestie 🫢
  • for a list of supported flags, see ibv_post_send πŸ“œ
  • unless the send request is using inline data, the message buffer must have been registered before being posted, with the mr parameter referencing the registration. the buffer must remain registered until the send completes β€” do not unregister early, that's the villain arc πŸ’€
  • the user-defined context associated with the send request will be returned to the user through the work completion wr_id, work request identifier, field. see?? I told you it comes back πŸŽ€

πŸ”₯ SEE ALSO πŸ”₯

rdma_cm(7), rdma_connect(3), rdma_accept(3), rdma_reg_msgs(3), ibv_post_send(3), rdma_post_recv(3)

go read those next, they're all in the same friend group πŸ’œ


that's the page, and honestly? iconic. this one comes from librdmacm, dated 2010-07-19 β€” so yeah she's been serving datagrams since 2010 and still looks this good πŸ’– stay registered, stay hydrated, and check your return values βœ¨πŸ¦‹πŸ’…

πŸ“¦ where this page comes from