RDMA_WRITE_CM_EVENT(3)

πŸ’– RDMA_WRITE_CM_EVENT πŸ’–

okay bestie, so this is rdma_write_cm_event(3) from the Librdmacm Programmer's Manual and honestly? it's giving "tiny function, big vibes" ✨


🌸 NAME 🌸

RDMA_WRITE_CM_EVENT</ppurple> β€” Write an event into a CM. that's it, that's the whole job, and she does it flawlessly πŸ’…


✨ SYNOPSIS ✨

#include <rdma/rdma_cma.h>

int rdma_write_cm_event(struct rdma_cm_id *id, enum rdma_cm_event_type
event, int status, uint64_t arg);

look at her. four args. no drama. no cap 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • id β€” the RDMA identifier that's linked to the rdma_cm_event we're reporting. like, which CM are we talking to? this one. her. πŸ‘‘
  • event β€” the communication event value you wanna report. bestie, set this to RDMA_CM_EVENT_USER. that's the one. don't freestyle it 😭
  • status β€” the status value that gets reported in the rdma_cm_event. spill the status, girl.
  • arg β€” a user-specified value that gets reported in the rdma_cm_event. it's yours, it's custom, it's your little signature on the event 🌈

πŸ¦‹ DESCRIPTION πŸ¦‹

Write an event into a CM, with a status and an argument.

yep. that's the whole description. short queen behavior, we respect it πŸ’œ


πŸ”₯ RETURN VALUE πŸ”₯

  • On success, 0 is returned. slay ✨
  • On error, -1 is returned, and errno will be set to indicate the failure reason. so if something goes wrong, check errno, she'll tell you what happened πŸ™ˆ

πŸ‘‘ NOTES πŸ‘‘

okay so here's the tea β˜• β€” this call lets an application write a user-defined event to the event channel associated with the specified rdma_cm_id.

Valid user events are, and I cannot stress this enough: RDMA_CM_EVENT_USER. that's the list. that's the whole list πŸ’€

Applications may use this for internal signaling purposes β€” like, imagine waking a thread that's just chilling, blocked on the event channel. yeah. that's the move. poke your thread, make it do stuff, main character energy fr fr 🫢


πŸ’œ SEE ALSO πŸ’œ


🌟 AUTHOR 🌟

Mark Zhang <<markzhang@nvidia.com>> β€” legend behavior, we thank her for her service πŸ«‘πŸ’–


and that's the page!! written on 2025-02-06, brought to you by the good people of the Librdmacm Programmer's Manual β€” thanks for reading, bestie, now go write some events πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from