Home

rdmaaccept

rdma_accept is a function in the RDMA Connection Manager (RDMA CM) API used to accept a pending inbound connection request on a server-side RDMA communication identifier (struct rdma_cm_id). It is part of the user-space RDMA API provided by libraries such as libibverbs/rdma-core and is used with InfiniBand, RoCE, and iWARP devices. The function fits into the typical server-side handshake: the server listens for connection attempts, receives a connect request event, and then calls rdma_accept to negotiate parameters and complete the connection.

Usage and flow: In a typical workflow, an application creates an RDMA CM ID, binds and listens,

Parameters: rdma_accept takes two arguments: the RDMA CM ID corresponding to the pending connection, and an

Return value and error handling: the call returns 0 on success or a negative errno on failure,

and
processes
events
on
an
event
channel.
When
an
RDMA_CM_EVENT_CONNECT_REQUEST
is
received,
the
application
calls
rdma_accept
to
establish
the
connection.
If
successful,
the
kernel
reports
RDMA_CM_EVENT_ESTABLISHED
to
indicate
that
the
connection
is
up.
If
the
accept
fails,
the
application
may
reject
the
request
or
tear
down
the
attempt
using
appropriate
RDMA
CM
functions
such
as
rdma_reject
or
rdma_disconnect.
optional
pointer
to
a
struct
rdma_conn_param.
The
conn_param
structure
lets
the
application
specify
parameters
such
as
responder_resources,
initiator_depth,
flow_control,
retry_count,
and
rnr_retry_count,
as
well
as
private_data_len
and
private_data
for
exchanging
application-specific
information
during
the
connect
handshake.
If
conn_param
is
NULL,
default
negotiation
values
may
be
used
by
the
underlying
transport.
indicating
conditions
such
as
invalid
state,
insufficient
resources,
or
other
transport-layer
errors.
After
a
successful
accept,
the
application
proceeds
with
the
remaining
connection
setup
and
data-path
operations.
See
also:
rdma_connect,
rdma_listen,
rdma_cm_id,
and
the
RDMA
CM
event
mechanisms.