RDMA_MIGRATE_ID(3)

πŸ’– RDMA_MIGRATE_ID πŸ’–

okay so bestie, welcome to the rdma_migrate_id page from the Librdmacm Programmer's Manual, section 3. yes it's a real man page, yes it's about moving a communication identifier to a whole different event channel, and yes it's lowkey iconic. sit down, grab a strawberry, we're doing this πŸ“


✨ NAME ✨

rdma_migrate_id β€” move a communication identifier to a different event channel. that's it, that's the whole vibe. relocation era πŸ¦‹


🌸 SYNOPSIS 🌸

#include <rdma/rdma_cma.h>

int rdma_migrate_id (struct rdma_cm_id *id, struct rdma_event_channel
*channel);

look at her. two args. no drama. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • id β€” an existing communication identifier that you wanna migrate. she's already got a home, we're just helping her move 🫢
  • channel β€” the communication channel that events associated with the allocated rdma_cm_id will be reported on. may be NULL. yes fr fr, NULL is allowed, keep reading πŸ‘€

πŸ’œ DESCRIPTION πŸ’œ

migrates a communication identifier to a different event channel. that's the whole thing. short queen, no notes ✨


πŸ”₯ RETURN VALUE πŸ”₯

returns 0 on success, or -1 on error. and if an error happens? errno gets set to indicate the failure reason. so like, always check your errno, bestie, she's telling you something 😭


πŸ’€ NOTES πŸ’€

okay this is the part you actually need, so listen up πŸ‘‘

this routine migrates a communication identifier to the specified event channel and moves any pending events associated with the rdma_cm_id to the new channel. so the baggage comes with her, no cap 🧳

🚨 real talk warning: users should not poll for events on the rdma_cm_id's current event channel, and should not invoke other routines on the rdma_cm_id while migrating between channels. like, do not touch her while she's mid-transformation, that's the rule πŸ™ˆ

also, this call will block while there are any unacknowledged events on the current event channel. so it might sit there for a sec. that's not a bug, that's just her being thorough πŸ’…

and the plot twist: if the channel parameter is NULL, the specified rdma_cm_id will be placed into synchronous operation mode. all calls on the id will block until the operation completes. so yeah, NULL = everything goes synchronous = everything waits its turn. main character energy but make it blocking πŸ‘‘


🌈 SEE ALSO 🌈

go read those too, iykyk πŸ“š


librdmacm Β· 2007-11-13

and that's the page bestie!! brought to you by librdmacm, dated 2007-11-13, which means this queen has been slaying since 2007 and is still relevant. periodt πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from