6. Error Handling#
6.1. Return Value Conventions#
Constructors do not return a value. Call
isConnected()to check session readiness.Memory registration APIs return an opaque pointer on success and
nullptron failure.I/O APIs return
ssize_t. Synchronous success returns a byte count, asynchronous submission success returns0, and failure returns a negative errno-style value.poll()returns a completion count or a negative errno-style value.Channel allocation returns a channel ID or
INVALID_CHANNEL_ID.
6.2. I/O API Failure Values#
Return value |
Meaning |
|---|---|
|
Server RDMA device is not available. |
|
Invalid argument, invalid descriptor, invalid channel, request range failure, submission failure, or completion failure. |
|
Allocation failure. |
|
Address family is not supported by the active path. |
6.3. poll() Failure Values#
Return value |
Meaning |
|---|---|
|
Server RDMA device is not available. |
|
|
|
One or more completions reported failure. |
6.4. Completion Status#
For synchronous handleGetObject() and handlePutObject(), the optional
status parameter is populated after polling when a completion status is
available. IBV_WC_SUCCESS (0) means success.
For asynchronous operations, poll() reports completion status in
cuObjAsyncEvent_t.status. A non-negative poll() return value gives the
number of valid events in the output array.
Common completion status values include:
Value |
Status |
Meaning |
|---|---|---|
|
|
Operation completed successfully. |
|
|
Outstanding work request was flushed after queue-pair error/reset. |
|
|
Local memory registration, key, or access error. |
|
|
Remote key, address, or access error. |
|
|
Remote operation error. |
|
|
Retry count exceeded; usually a path or reachability issue. |
|
|
Receiver-not-ready retry count exceeded. |
|
|
Fatal completion error. |
|
|
Response timeout. |
|
|
General completion error. |