RDMA_POST_WRITE(3)

πŸ’– RDMA_POST_WRITE(3) πŸ’–

okay bestie, welcome to the librdmacm Programmer's Manual ✨ this one's called rdma_post_write, and it's literally the girlboss of "post an RDMA write work request" β€” no cap, that's the whole NAME section, I'm not even joking 🫢


🌸 SYNOPSIS 🌸

#include <rdma/rdma_verbs.h>

int rdma_post_write (struct rdma_cm_id *id, void *context, void *addr,
size_t length, struct ibv_mr *mr, int flags, uint64_t remote_addr,
uint32_t rkey);

like, that's the whole signature, copy it exactly pls, don't get creative πŸ’…


✨ ARGUMENTS ✨

  • id β€” a reference to a communication identifier where the request will be posted. it's giving "where do I drop this off" energy πŸŽ€
  • context β€” user-defined context associated with the request. it's yours, do whatever, it comes back to you later (spoiler: see NOTES πŸ‘€)
  • addr β€” the local address of the source of the write request. this is the local tea being spilled β˜•
  • length β€” the length of the write operation. how much of the tea, exactly.
  • mr β€” optional memory region associated with the local buffer. optional!! but read the NOTES before you get bold πŸ™ˆ
  • flags β€” optional flags used to control the write operation. for the full menu of flags, check ibv_post_send (NOTES has the receipt 🧾)
  • remote_addr β€” the address of the remote registered memory to write into. the destination, the final boss, the main character location πŸ‘‘
  • rkey β€” the registered memory key associated with the remote address. yes you need the key, no you can't skip it πŸ”‘

πŸ¦‹ DESCRIPTION πŸ¦‹

Posts a work request to the send queue of the queue pair associated with the rdma_cm_id. 🫑

The contents of the local data buffer will be written into the remote memory region. that's it, that's the vibe, local bytes go β†’ remote memory, iconic behavior honestly ✨


πŸ’€ RETURN VALUE πŸ’€

Returns 0 on success, or -1 on error. and if it errors out? errno will be set to indicate the failure reason, so pls actually check it and don't just ignore the girl crying in the corner 😭


πŸ”₯ NOTES πŸ”₯

bestie these are the real ones, read them, I'm begging πŸ™
  • For a list of supported flags, see ibv_post_send.
  • Unless inline data is specified, the local data buffer must have been registered before the write is issued, and the buffer must remain registered until the write completes. no early unregister, that's not slay, that's a crash 🚨
  • The remote buffer must always be registered. always always. no exceptions, periodt πŸ’…
  • Write operations may not be posted to an rdma_cm_id or the corresponding queue pair until it has been connected. not connected? not today. πŸ™…β€β™€οΈ
  • The user-defined context associated with the write request will be returned to the user through the work completion wr_id, work request identifier, field. so that context you passed in? it comes back to you like a boomerang, iykyk πŸͺƒπŸ’–

🌈 SEE ALSO 🌈

rdma_cm(7), rdma_connect(3), rdma_accept(3), ibv_post_send(3), rdma_post_writev(3), rdma_reg_write(3), rdma_reg_msgs(3)


okay that's the whole page, go register your buffers and stay hydrated πŸ“πŸ’œ

mwah πŸ’‹ β€” this was librdmacm, dated 2010-07-19, brought to you by the RDMA_POST_WRITE(3) girlies. she ate and left no crumbs πŸ‘‘βœ¨

πŸ“¦ where this page comes from