|
|
VipErrorCallback() is used by the VI Consumer to register an error handling function with the VI Provider. If the VI Consumer does not register an error handling function via this call, a default error handler will log the error. If an error handling function has been specified via the VipErrorCallback() function, the default error handling function can be restored by calling VipErrorCallback() with a NULL Handler parameter.
Asynchronous errors are those errors that cannot be reported back directly into a Descriptor. The following is a list of possible asynchronous errors:
- Post Descriptor Error: This error occurs under the following conditions:
- The virtual address and memory handle of the Descriptor was not valid when the Descriptor was posted.
- The Next Address and/or Next Handle field was inadvertently modified after the Descriptor was posted.
- The Descriptor address was not aligned on a 64-byte boundary.
- Connection Lost: The connection on a VI was lost and the associated VI is in the error state.
- Receive Queue: Empty An incoming packet was dropped because the receive queue was empty.
- VI Overrun: The VI Consumer attempted to post too many Descriptors to a Work Queue of a VI.
- RDMA Write Protection Error: A protection error was detected on an incoming RDMA Write operation. If the RDMA write operation contained immediate data, this status would be reported in the associated Descriptor, and not via the asynchronous error mechanism.
- RDMA Write Data Error: A data corruption error was detected on an incoming RDMA Write operation. If the RDMA write operation contained immediate data, this status would be reported in the associated Descriptor, and not via the asynchronous error mechanism.
- RDMA Write Packet Abort: Indicates a partial packet was detected on an incoming RDMA Write operation. If the RDMA write operation contained immediate data, this status would be reported in the associated Descriptor, and not via the asynchronous error mechanism.
- RDMA Transport Error: A transport error was detected on an incoming RDMA operation that does not consume a Descriptor.
- RDMA Read Protection Error: A protection error was detected on an incoming RDMA Read operation.
- Completion Protection Error: When reporting completion, this could result from a user de-registering a memory region containing a Descriptor after the Descriptor was read by the hardware but before completion status was written. This error can also result if a Completion Queue becomes inaccessible to the hardware. In this case, an error will be generated for each VI that was associated with the Completion Queue. Note that the status (Done or Done with Errors) of the Descriptors on work queues associated with the Completion Queue may have already been written.
- Catastrophic Error: The hardware has failed or has detected a fatal configuration problem. Post Descriptor Error, VI Overrun, Completion Protection Error and Catastrophic Error are catastrophic hardware errors.
- Return values:
-
| VIP_SUCCESS | Operation completed successfully. |
| VIP_INVALID_PARAMETER | One or more of the input parameters were invalid. |
| VIP_ERROR_RESOURCE | The operation failed due to insufficient resources. |
- Parameters:
-
| NicHandle | (IN) Handle of the NIC. |
| Context | (IN) Data to be passed through to the Handler as a parameter. Not used by the VI Provider. |
| Handler | (IN) Address of the user-defined function to be called when an asynchronous error occurs. This function is not guaranteed to run in the context of the calling thread. The error handler function is called with the following input parameters:
- Context: Data passed through from the function call. Not used by the VI Provider.
- ErrorDesc: The error Descriptor.
|
- Author:
- Patrick Geoffray
- Version:
- 1.0
Definition at line 93 of file viperrorcallback.c.
References VIP_DEBUG, VIP_DEBUG_LABEL, vip_default_error_callback(), VIP_INVALID_NIC_HANDLE, VIP_INVALID_PARAMETER, VIP_MUTEX_LOCK, VIP_MUTEX_UNLOCK, and VIP_SUCCESS. |