Rtnl2CreatePhysicalRxQueueEvent
Rtnl2CreatePhysicalRxQueueEvent enables the hardware interrupt for a given Physical Receive Queue and creates an event for the specified Physical Receive Queue. This event is signaled by the NL2 each time the NIC triggers the hardware interrupt associated with that Physical Receive Queue.
Syntax
BOOL Rtnl2CreatePhysicalRxQueueEvent(
[in] RTNL2_HPHYSICAL_RX_QUEUE PhysicalRxQueue,
[out] HANDLE *pEvent
);
Parameters
[in] PhysicalRxQueue
A handle to the Physical Receive Queue obtained from Rtnl2AcquirePhysicalRxQueue.
[out] pEvent
A handle to the created event.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.
Possible error codes:
Error code | Meaning |
---|---|
ERROR_NOT_READY |
The calling process has not called Rtnl2Init. |
ERROR_INVALID_PARAMETER |
The supplied Physical Receive Queue handle is invalid. |
ERROR_ALREADY_EXISTS |
The calling process has already created a Receive event for this Physical Receive Queue. |
RTNL2_ERROR_PHYSICAL_RX_QUEUE_IS_RELEASING |
Another thread of the calling process is executing Rtnl2ReleasePhysicalRxQueue at the same time. |
RTNL2_ERROR_SERIALIZED_COMMAND_TIMEOUT |
The NL2 process didn’t reply within an acceptable delay. |
RTNL2_ERROR_NO_MORE_COMMUNICATION |
Unable to communicate with the NL2 process. This might be because the NL2 process is not running anymore, or because an application process thread was terminated during a previous call to an NL2 API function. |
Remarks
A NIC triggers the hardware interrupt whenever it fills a buffer. However, if interrupt moderation is enabled, the NIC waits a minimum interval before sending another interrupt.
Only one Receive event can be created per Physical Receive Queue.
Characteristics
Real-time | ||
Deterministic |
No |
|
Local memory usage | ||
Process |
External MSpace usage |
Internal MSpace usage |
System |
No |
Yes. This function will allocate memory for the Event kernel object. |
NL2 process |
No |
Yes. This function will allocate memory for the object handle. |
Calling process |
No |
Yes. This function will allocate memory for the object handle. |
Contiguous memory usage | ||
Usage |
No |
Requirements
Minimum supported version | Header | Library |
---|---|---|
eRTOS 1.0 SDK |
Rtnl2Api.h |
Rtnl2Api.lib |
See Also: