RDMA_CREATE_ID(3)

✨ RDMA_CREATE_ID ✨

okay bestie, welcome to the rdma_create_id page from the Librdmacm Programmer's Manual πŸ’– this one is literally the birth of an RDMA conversation, so let's get into it.


🌸 NAME 🌸

rdma_create_id β€” Allocate a communication identifier.


πŸŽ€ SYNOPSIS πŸŽ€

#include <rdma/rdma_cma.h>

int rdma_create_id (struct rdma_event_channel *channel, struct
rdma_cm_id **id, void *context, enum rdma_port_space ps);

πŸ’… ARGUMENTS πŸ’…

  • channel β€” the communication channel that events associated with the allocated rdma_cm_id will be reported on. plot twist: this one may be NULL πŸ™ˆ
  • id β€” a reference where the allocated communication identifier gets returned. this is where your shiny new id shows up, bestie ✨
  • context β€” user specified context associated with the rdma_cm_id. it's yours, you bring it, you keep it 🫢
  • ps β€” RDMA port space. the whole vibe of the connection lives here, more on that below πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

Creates an identifier that is used to track communication information. that's it, that's the whole job. it's giving "tiny but crucial" πŸ’«


⭐ RETURN VALUE ⭐

Returns 0 on success, or -1 on error. If an error occurs, errno will be set to indicate the failure reason. so like, if you get -1, go check errno β€” she's always got the tea 🍡


πŸ’œ NOTES πŸ’œ

rdma_cm_id's are conceptually equivalent to a socket for RDMA communication. iconic behavior, honestly. but here's the difference, and it matters:

  • RDMA communication requires explicitly binding to a specified RDMA device before communication can occur.
  • Most operations are asynchronous in nature. no cap.

Asynchronous communication events on an rdma_cm_id are reported through the associated event channel. πŸ“£

And now the plot twist πŸ‘€ β€” if the channel parameter is NULL, the rdma_cm_id will be placed into synchronous operation. While operating synchronously, calls that result in an event will block until the operation completes. The event will be returned to the user through the rdma_cm_id structure, and be available for access until another rdma_cm call is made. so like, hold onto it while you can, it won't wait around for you 😭

⚠️ Users must release the rdma_cm_id by calling rdma_destroy_id. don't leave her hanging, that's a leak bestie πŸ’€

🌈 PORT SPACE 🌈

Details of the services provided by the different port spaces are outlined below. pick your fighter πŸ’–

RDMA_PS_TCP

Provides reliable, connection-oriented QP communication. Unlike TCP, the RDMA port space provides message, not stream, based communication. so if you were expecting a lil stream situation… not here, queen πŸ‘‘

RDMA_PS_UDP

Provides unreliable, connectionless QP communication. Supports both datagram and multicast communication. chaotic but in a fun way πŸŽ€

RDMA_PS_IB

Provides for any IB services (UD, UC, RC, XRC, etc.). the "everything bagel" of port spaces, fr fr πŸ₯―


πŸ‘‘ SEE ALSO πŸ‘‘

rdma_cm(7), rdma_create_event_channel(3), rdma_destroy_id(3), rdma_get_devices(3), rdma_bind_addr(3), rdma_resolve_addr(3), rdma_connect(3), rdma_listen(3), rdma_set_option(3)


okay that's the whole page, you ate that πŸ’… this was brought to you by librdmacm, dated 2010-07-19, and the page itself is RDMA_CREATE_ID(3) β€” go forth and create some ids, bestie πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from