RDMA_NOTIFY(3)

πŸ’– RDMA_NOTIFY πŸ’–

ok so bestie, welcome to rdma_notify(3) from the Librdmacm Programmer's Manual β€” yes she's a section 3 library call, yes she's iconic, and yes she's about to tell librdmacm that Something Happened. πŸ¦‹


✨ NAME ✨

rdma_notify β€” Notifies the librdmacm of an asynchronous event.

like. it's the girl who runs to the group chat and goes "GUYS. something happened on the QP." πŸ’…


🌸 SYNOPSIS 🌸

#include <rdma/rdma_cma.h>

int rdma_notify (struct rdma_cm_id *id, enum ibv_event_type event);

two arguments, one int back, no drama. well. mostly no drama. keep reading. πŸ™ˆ


πŸŽ€ ARGUMENTS πŸŽ€

  • id β€” the RDMA identifier. that's your struct rdma_cm_id *, the main character of literally this whole API. πŸ‘‘
  • event β€” the asynchronous event. an enum ibv_event_type, aka the actual news you're delivering.

πŸ’œ DESCRIPTION πŸ’œ

so what does she do? she's used to notify the librdmacm of asynchronous events that have occurred on a QP associated with the rdma_cm_id. that's it, that's the job, no cap. πŸ’–


⭐ RETURN VALUE ⭐

  • returns 0 on success πŸŽ‰
  • returns -1 on error 😭 β€” and if an error occurs, errno will be set to indicate the failure reason.
now listen, because this part matters: if errno is set to EISCONN (transport endpoint is already connected), that means the underlying communication manager established the connection before the call to rdma_notify could be processed. and in that case?? the error may safely be ignored. bestie really said "not a problem, ignore it, we move." πŸ’…βœ¨

πŸ”₯ NOTES πŸ”₯

okay here's the lore.

Asynchronous events that occur on a QP are reported through the user's device event handler. this routine is what you use to notify the librdmacm of communication events. πŸ“£

In most cases, use of this routine is not necessary. (yes, most. she said what she said.) however, if connection establishment is done out of band (such as done through Infiniband), it's possible to receive data on a QP that is not yet considered connected. 😳

and that's the whole reason she exists: this routine forces the connection into an established state in this case, in order to handle the rare situation where the connection never forms on its own. because sometimes the connection is just. not forming. on its own. and we have to intervene. 🫢

Calling this routine ensures the delivery of the RDMA_CM_EVENT_ESTABLISHED event to the application. πŸ’Œ

and the events that should be reported to the CM are:

  • IB_EVENT_COMM_EST

that's the list. one event. she's specific. 🎯


πŸ¦‹ SEE ALSO πŸ¦‹

go read those next, they're the rest of the friend group. 🌈


and that's the whole page, bestie!! sourced from librdmacm, dated 2007-05-15, filed under RDMA_NOTIFY(3) β€” she's been slaying since 2007 and she's still here. mwah. πŸ’‹πŸ’–βœ¨

πŸ“¦ where this page comes from