Main Page Modules Alphabetical List Data Structures File List Data Fields Globals
IXP425 ATM Driver Access (IxAtmdAcc) Control APIThe public API for the IXP425 Atm Driver Control component.
More...
|
Modules |
IXP425 ATM Driver Access (IxAtmdAcc) Utopia Control API |
| The public API for the IXP425 Atm Driver Control component.
|
Defines |
#define | IX_ATMDACC_PORT_DISABLE_IN_PROGRESS |
| Port enable return code.
|
#define | IX_ATMDACC_ALLPDUS |
| All PDUs.
|
Typedefs |
typedef IX_STATUS(* | IxAtmdAccRxDispatcher )(IxAtmRxQueueId rxQueueId, unsigned int numberOfPdusToProcess, unsigned int *reservedPtr) |
| Callback prototype for notification of available PDUs for an Rx Q.
|
typedef IX_STATUS(* | IxAtmdAccTxDoneDispatcher )(unsigned int numberOfPdusToProcess, unsigned int *reservedPtr) |
| Callback prototype for transmitted mbuf when threshold level is crossed.
|
typedef void(* | IxAtmdAccPortTxLowCallback )(IxAtmLogicalPort port, unsigned int numberOfAvailableCells) |
| Notification that the threshold number of scheduled cells remains in a port's transmit Q.
|
typedef IX_STATUS(* | IxAtmdAccTxVcDemandUpdateCallback )(IxAtmLogicalPort port, int vcId, unsigned int numberOfCells) |
| Prototype to submit cells for transmission.
|
typedef void(* | IxAtmdAccTxVcDemandClearCallback )(IxAtmLogicalPort port, int vcId) |
| prototype to remove all currently queued cells from a registered VC
|
typedef IX_STATUS(* | IxAtmdAccTxSchVcIdGetCallback )(IxAtmLogicalPort port, unsigned int vpi, unsigned int vci, IxAtmConnId connId, int *vcId) |
| prototype to get a scheduler vc id
|
Functions |
PUBLIC IX_STATUS | ixAtmdAccRxDispatcherRegister (IxAtmRxQueueId queueId, IxAtmdAccRxDispatcher callback) |
| Register a notification callback to be invoked when there is at least one entry on a particular Rx queue.
|
PUBLIC IX_STATUS | ixAtmdAccRxDispatch (IxAtmRxQueueId rxQueueId, unsigned int numberOfPdusToProcess, unsigned int *numberOfPdusProcessedPtr) |
| Control function which executes Rx processing for a particular Rx stream.
|
PUBLIC IX_STATUS | ixAtmdAccRxLevelQuery (IxAtmRxQueueId rxQueueId, unsigned int *numberOfPdusPtr) |
| Query the number of entries in a particular RX queue.
|
PUBLIC IX_STATUS | ixAtmdAccRxQueueSizeQuery (IxAtmRxQueueId rxQueueId, unsigned int *numberOfPdusPtr) |
| Query the size of a particular RX queue.
|
PUBLIC IX_STATUS | ixAtmdAccPortTxFreeEntriesQuery (IxAtmLogicalPort port, unsigned int *numberOfCellsPtr) |
| Get the number of available cells the system can accept for transmission.
|
PUBLIC IX_STATUS | ixAtmdAccPortTxCallbackRegister (IxAtmLogicalPort port, unsigned int numberOfCells, IxAtmdAccPortTxLowCallback callback) |
| Configure the Tx port threshold value and register a callback to handle threshold notifications.
|
PUBLIC IX_STATUS | ixAtmdAccPortTxScheduledModeEnable (IxAtmLogicalPort port, IxAtmdAccTxVcDemandUpdateCallback vcDemandUpdateCallback, IxAtmdAccTxVcDemandClearCallback vcDemandClearCallback, IxAtmdAccTxSchVcIdGetCallback vcIdGetCallback) |
| Put the port into Scheduled Mode.
|
PUBLIC IX_STATUS | ixAtmdAccPortTxProcess (IxAtmLogicalPort port, IxAtmScheduleTable *scheduleTablePtr) |
| Transmit queue cells to the H/W based on the supplied schedule table.
|
PUBLIC IX_STATUS | ixAtmdAccTxDoneDispatch (unsigned int numberOfPdusToProcess, unsigned int *numberOfPdusProcessedPtr) |
| Process a number of pending transmit done pdus from the hardware.
|
PUBLIC IX_STATUS | ixAtmdAccTxDoneLevelQuery (unsigned int *numberOfPdusPtr) |
| Query the current number of transmit pdus ready for recycling.
|
PUBLIC IX_STATUS | ixAtmdAccTxDoneQueueSizeQuery (unsigned int *numberOfPdusPtr) |
| Query the TxDone queue size.
|
PUBLIC IX_STATUS | ixAtmdAccTxDoneDispatcherRegister (unsigned int numberOfPdus, IxAtmdAccTxDoneDispatcher notificationCallback) |
| Configure the Tx Done stream threshold value and register a callback to handle threshold notifications.
|
PUBLIC IX_STATUS | ixAtmdAccUtopiaConfigSet (const IxAtmdAccUtopiaConfig *ixAtmdAccUtopiaConfigPtr) |
| Send the configuration structure to the Utopia interface.
|
PUBLIC IX_STATUS | ixAtmdAccUtopiaStatusGet (IxAtmdAccUtopiaStatus *ixAtmdAccUtopiaStatus) |
| Get the Utopia interface configuration.
|
PUBLIC IX_STATUS | ixAtmdAccPortEnable (IxAtmLogicalPort port) |
| enable a PHY logical port
|
PUBLIC IX_STATUS | ixAtmdAccPortDisable (IxAtmLogicalPort port) |
| disable a PHY logical port
|
PUBLIC BOOL | ixAtmdAccPortDisableComplete (IxAtmLogicalPort port) |
| disable a PHY logical port
|
Detailed Description
The public API for the IXP425 Atm Driver Control component.
IxAtmdAcc is the low level interface by which AAL PDU get transmitted to,and received from the Utopia bus
This part is related to the Control configuration
Define Documentation
#define IX_ATMDACC_ALLPDUS
|
|
#define IX_ATMDACC_PORT_DISABLE_IN_PROGRESS
|
|
|
Port enable return code.
This constant is used to tell IxAtmDAcc user that the port disable functions are not complete. The user can call ixAtmdAccPortDisableComplete() to find out when the disable has finished. The port enable can then proceed.
Definition at line 93 of file IxAtmdAccCtrl.h. |
Typedef Documentation
typedef void(* IxAtmdAccPortTxLowCallback)(IxAtmLogicalPort port, unsigned int numberOfAvailableCells)
|
|
|
Notification that the threshold number of scheduled cells remains in a port's transmit Q.
The is the prototype for of the user notification function which gets called on a per-port basis, when the number of remaining scheduled cells to be transmitted decreases to the threshold level. The number of cells passed as a parameter can be used for scheduling purposes as the maximum number of cells that can be passed in a schedule table to the ixAtmdAccPortTxProcess() function.
- See also:
- ixAtmdAccPortTxCallbackRegister
ixAtmdAccPortTxProcess
ixAtmdAccPortTxFreeEntriesQuery
- Parameters:
-
port | (in) logical PHY port [IX_UTOPIA_PORT_0 .. IX_UTOPIA_MAX_PORTS - 1] |
numberOfAvailableCells | (in) number of available cell entries.for the port |
- Note:
- - This functions shall not use system resources when used inside an interrupt context.
Definition at line 224 of file IxAtmdAccCtrl.h. |
typedef IX_STATUS(* IxAtmdAccRxDispatcher)(IxAtmRxQueueId rxQueueId, unsigned int numberOfPdusToProcess, unsigned int *reservedPtr)
|
|
|
Callback prototype for notification of available PDUs for an Rx Q.
This a protoype for a function which is called when there is at least one Pdu available for processing on a particular Rx Q.
This function should call ixAtmdAccRxDispatch() with the aprropriate number of parameters to read and process the Rx Q.
- See also:
- ixAtmdAccRxDispatch
ixAtmdAccRxVcConnect
ixAtmdAccRxDispatcherRegister
- Parameters:
-
rxQueueId | (in) indicates which RX queue to has Pdus to process. |
numberOfPdusToProcess | (in) indicates the minimum number of PDUs available to process all PDUs from the queue. |
reservedPtr | (out) pointer to a int location which can be written to, but does not retain written values. This is provided to make this prototype compatible with ixAtmdAccRxDispatch() |
- Returns:
-
Definition at line 144 of file IxAtmdAccCtrl.h. |
typedef IX_STATUS(* IxAtmdAccTxDoneDispatcher)(unsigned int numberOfPdusToProcess, unsigned int *reservedPtr)
|
|
|
Callback prototype for transmitted mbuf when threshold level is crossed.
IxAtmdAccTxDoneDispatcher is the prototype of the user function which get called when pdus are completely transmitted. This function is likely to call the ixAtmdAccTxDoneDispatch() function.
This function is called when the number of available pdus for reception is crossing the threshold level as defined in ixAtmdAccTxDoneDispatcherRegister()
This function is called inside an Qmgr dispatch context. No system resource or interrupt-unsafe feature should be used inside this callback.
Transmitted buffers recycling implementation is a sytem-wide mechanism and needs to be set before any traffic is started. If this threshold mechanism is not used, the user is responsible for polling the transmitted buffers with ixAtmdAccTxDoneDispatch() and ixAtmdAccTxDoneLevelQuery() functions.
- See also:
- ixAtmdAccTxDoneDispatcherRegister
ixAtmdAccTxDoneDispatch
ixAtmdAccTxDoneLevelQuery
- Parameters:
-
numberOfPdusToProcess | (in) The current number of pdus currently available for recycling |
reservedPtr | (out) pointer to a int location which can be written to but does not retain written values. This is provided to make this prototype compatible with ixAtmdAccTxDoneDispatch() |
- Returns:
-
- IX_FAIL invalid parameters or some unspecified internal error occured. This is provided to make this prototype compatible with ixAtmdAccTxDoneDispatch()
Definition at line 195 of file IxAtmdAccCtrl.h. |
typedef IX_STATUS(* IxAtmdAccTxSchVcIdGetCallback)(IxAtmLogicalPort port, unsigned int vpi, unsigned int vci, IxAtmConnId connId, int *vcId)
|
|
|
prototype to get a scheduler vc id
IxAtmdAccTxSchVcIdGetCallback is the prototype of the function to get a scheduler vcId
- See also:
- IxAtmdAccTxVcDemandUpdateCallback
IxAtmdAccTxVcDemandClearCallback
IxAtmdAccTxSchVcIdGetCallback
ixAtmdAccPortTxScheduledModeEnable
- Parameters:
-
port | (in) Specifies the ATM logical port on which the VC is established |
vpi | (in) For AAL0/AAL5 specifies the ATM vpi on which the VC is established. For OAM specifies the dedicated "OAM Tx channel" VPI. |
vci | (in) For AAL0/AAL5 specifies the ATM vci on which the VC is established. For OAM specifies the dedicated "OAM Tx channel" VCI. |
connId | (in) specifies the IxAtmdAcc connection Id already associated with this VC |
vcId | (out) pointer to a vcId |
- Returns:
- IX_SUCCESS the function is returning a Scheduler vcId for this VC
- IX_FAIL the function cannot process scheduling for this VC. the contents of vcId is unspecified
Definition at line 324 of file IxAtmdAccCtrl.h. |
typedef void(* IxAtmdAccTxVcDemandClearCallback)(IxAtmLogicalPort port, int vcId)
|
|
typedef IX_STATUS(* IxAtmdAccTxVcDemandUpdateCallback)(IxAtmLogicalPort port, int vcId, unsigned int numberOfCells)
|
|
|
Prototype to submit cells for transmission.
IxAtmdAccTxVcDemandUpdateCallback is the prototype of the callback function used by AtmD to notify an ATM Scheduler that the user of a VC has submitted cells for transmission.
- See also:
- IxAtmdAccTxVcDemandUpdateCallback
IxAtmdAccTxVcDemandClearCallback
IxAtmdAccTxSchVcIdGetCallback
ixAtmdAccPortTxScheduledModeEnable
- Parameters:
-
port | (in) Specifies the ATM port on which the VC to be updated is established |
vcId | (in) Identifies the VC to be updated. This is the value returned by the IxAtmdAccTxSchVcIdGetCallback() call . |
numberOfCells | (in) Indicates how many ATM cells should be added to the queue for this VC. |
- Returns:
- IX_SUCCESS the function is registering the cell demand for this VC.
- IX_FAIL the function cannot register cell for this VC : the scheduler maybe overloaded or misconfigured
Definition at line 255 of file IxAtmdAccCtrl.h. |
Function Documentation
|
disable a PHY logical port
This function disable the transmission over one port.
When a port is disabled, the cell transmission to the Utopia interface is stopped.
- Parameters:
-
port | (in) logical PHY port [IX_UTOPIA_PORT_0 .. IX_UTOPIA_MAX_PORTS - 1] |
- Returns:
- IX_SUCCESS disable is complete
- IX_ATMDACC_WARNING port already disabled
- IX_FAIL disable failed, wrong parameter .
- Note:
- - This function needs internal locks and should not be called from an interrupt context
- The response from hardware is done through the txDone mechanism to ensure the synchrnisation with tx resources. Therefore, the txDone mechanism needs to be serviced to make a PortDisable complete.
- See also:
- ixAtmdAccPortEnable
ixAtmdAccPortDisableComplete
ixAtmdAccTxDoneDispatch
|
|
disable a PHY logical port
This function indicates if the port disable for a port has completed. This function will return TRUE if the port has never been enabled.
- Parameters:
-
port | (in) logical PHY port [IX_UTOPIA_PORT_0 .. IX_UTOPIA_MAX_PORTS - 1] |
- Returns:
-
- FALSE disable failed, wrong parameter .
- Note:
- - This function needs internal locks and should not be called from an interrupt context
- See also:
- ixAtmdAccPortEnable
ixAtmdAccPortDisable
|
|
enable a PHY logical port
This function enables the transmission over one port. It should be called before accessing any resource from this port and before the establishment of a VC.
When a port is enabled, the cell transmission to the Utopia interface is started. If there is no traffic already running, idle cells are sent over the interface.
This function can be called multiple times.
- Parameters:
-
port | (in) logical PHY port [IX_UTOPIA_PORT_0 .. IX_UTOPIA_MAX_PORTS - 1] |
- Returns:
- IX_SUCCESS enable is complete
- IX_ATMDACC_WARNING port already enabled
- IX_FAIL enable failed, wrong parameter, or cannot initialise this port (the port is maybe already in use, or there is a hardware issue)
- Note:
- - This function needs internal locks and should not be called from an interrupt context
- See also:
- ixAtmdAccPortDisable
|
|
Configure the Tx port threshold value and register a callback to handle threshold notifications.
This function sets the threshold in cells
- See also:
- ixAtmdAccPortTxCallbackRegister
ixAtmdAccPortTxProcess
ixAtmdAccPortTxFreeEntriesQuery
- Parameters:
-
port | (in) logical PHY port [IX_UTOPIA_PORT_0 .. IX_UTOPIA_MAX_PORTS - 1] |
numberOfCells | (in) threshold value which triggers the callback invocation, This number has to be one of the values 0,1,2,4,8,16,32 .... The maximum value cannot be more than half of the txVc queue size (which can be retrieved using ixAtmdAccPortTxFreeEntriesQuery() before any Tx traffic is sent for this port) |
callback | (in) callback function to invoke when the threshold level is reached. This parameter cannot be a null pointer. |
- Returns:
-
- IX_FAIL error in the parameters, Tx channel already set for this port threshold level is not correct or within the range regarding the queue size:or unspecified error during processing:
- Note:
- - This callback function get called when the threshold level drops from (numberOfCells+1) cells to (numberOfCells) cells
- This function should be called during system initialisation, outside an interrupt context
|
ixAtmdAccPortTxFreeEntriesQuery |
( |
IxAtmLogicalPort |
port, |
|
|
unsigned int * |
numberOfCellsPtr |
|
) |
|
|
|
Get the number of available cells the system can accept for transmission.
The function is used to retrieve the number of cells that can be queued for transmission to the hardware.
This number is based on the worst schedule table where one cell is stored in one schedule table entry, depending on the pdus size and mbuf size and fragmentation.
This function doesn't use system resources and can be used from a timer context, or can be associated with a threshold event, or can be used inside an active polling mechanism
- Parameters:
-
port | (in) logical PHY port [IX_UTOPIA_PORT_0 .. IX_UTOPIA_MAX_PORTS - 1] |
numberOfCellsPtr | (out) number of available cells. This parameter cannot be a null pointer. |
- See also:
- ixAtmdAccPortTxProcess
- Returns:
- IX_SUCCESS numberOfCellsPtr contains the number of cells that can be scheduled for this port.
- IX_FAIL error in the parameters, or some processing error occured.
|
|
Transmit queue cells to the H/W based on the supplied schedule table.
This function ixAtmdAccPortTxProcess() process the schedule table provided as a parameter to the function. As a result cells are sent to the underlaying hardware for transmission.
The schedule table is executed in its entirety or not at all. So the onus is on the caller not to submit a table containing more cells than can be transmitted at that point. The maximum numbers that can be transmitted is guaranteed to be the number of cells as returned by the function ixAtmdAccPortTxFreeEntriesQuery().
When the scheduler is invoked on a threshold level, IxAtmdAcc gives the minimum number of cells (to ensure the callback will fire again later) and the maximum number of cells that ixAtmdAccPortTxProcess() will be able to process (assuming the ATM scheduler is able to produce the worst-case schedule table, i.e. one entry per cell).
When invoked ouside a threshold level, the overall number of cells of the schedule table should be less than the number of cells returned by the ixAtmdAccPortTxFreeEntriesQuery() function.
After invoking the ixAtmdAccPortTxProcess() function, it is the user choice to query again the queue level with the function ixAtmdAccPortTxFreeEntriesQuery() and, depending on a new cell number, submit an other schedule table.
IxAtmdAcc will check that the number of cells in the schedule table is compatible with the current transmit level. If the
Obsolete or invalid connection Id will be silently discarded.
This function is not reentrant for the same port.
This functions doesn't use system resources and can be used inside an interrupt context.
This function is used as a response to the hardware requesting more cells to transmit.
- See also:
- ixAtmdAccPortTxScheduledModeEnable
ixAtmdAccPortTxFreeEntriesQuery
ixAtmdAccPortTxCallbackRegister
ixAtmdAccPortEnable
- Parameters:
-
port | (in) logical PHY port [IX_UTOPIA_PORT_0 .. IX_UTOPIA_MAX_PORTS - 1] |
scheduleTablePtr | (in) pointer to a scheduler update table. The content of this table is not modified by this function. This parameter cannot be a null pointer. |
- Returns:
- IX_SUCCESS the schedule table process is complete and cells are transmitted to the hardware
- IX_ATMDACC_WARNING : Traffic will be dropped: the schedule table exceed the hardware capacity If this error is ignored, further traffic and schedule will work correctly. Overscheduling does not occur when the schedule table does not contain more entries that the number of free entries returned by ixAtmdAccPortTxFreeEntriesQuery(). However, Disconnect attempts just after this error will fail permanently with the error code IX_ATMDACC_RESOURCES_STILL_ALLOCATED, and it is necessary to disable the port to make ixAtmdAccTxVcTryDisconnect() successful.
- IX_FAIL a wrong parameter is supplied, or the format of the schedule table is invalid, or the port is not Enabled, or an internal severe error occured. No cells is transmitted to the hardware
- Note:
- - If the failure is linked to an overschedule of data cells the result is an inconsistency in the output traffic (one or many cells may be missing and the traffic contract is not respected).
|
|
Put the port into Scheduled Mode.
This function puts the specified port into scheduled mode of transmission which means an external s/w entity controls the transmission of cells on this port. This faciltates traffic shaping on the port.
Any buffers submitted on a VC for this port will be queued in IxAtmdAcc. The transmission of these buffers to and by the hardware will be driven by a transmit schedule submitted regulary in calls to ixAtmdAccPortTxProcess() by traffic shaping entity.
The transmit schedule is expected to be dynamic in nature based on the demand in cells for each VC on the port. Hence the callback parameters provided to this function allow IxAtmdAcc to inform the shaping entity of demand changes for each VC on the port.
By default a port is in Unscheduled Mode so if this function is not called, transmission of data is done without sheduling rules, on a first-come, first-out basis.
Once a port is put in scheduled mode it cannot be reverted to un-scheduled mode. Note that unscheduled mode is not supported in ixp425 1.0
- Note:
- - This function should be called before any VCs have be connected on a port. Otherwise this function call will return failure.
- This function uses internal locks and should not be called from an interrupt context
- See also:
- IxAtmdAccTxVcDemandUpdateCallback
IxAtmdAccTxVcDemandClearCallback
IxAtmdAccTxSchVcIdGetCallback
ixAtmdAccPortTxProcess
- Parameters:
-
port | (in) logical PHY port [IX_UTOPIA_PORT_0 .. IX_UTOPIA_MAX_PORTS - 1] |
vcDemandUpdateCallback | (in) callback function used to update the number of outstanding cells for transmission. This parameter cannot be a null pointer. |
vcDemandClearCallback | (in) callback function used to remove all clear the number of outstanding cells for a VC. This parameter cannot be a null pointer. |
vcIdGetCallback | (in) callback function used to exchange vc Identifiers between IxAtmdAcc and the entity supplying the transmit schedule. This parameter cannot be a null pointer. |
- Returns:
- IX_SUCCESS scheduler registration is complete and the port is now in scheduled mode.
- IX_FAIL failed (wrong parameters, or traffic is already enabled on this port, possibly without ATM shaping)
|
ixAtmdAccRxDispatch |
( |
IxAtmRxQueueId |
rxQueueId, |
|
|
unsigned int |
numberOfPdusToProcess, |
|
|
unsigned int * |
numberOfPdusProcessedPtr |
|
) |
|
|
|
Control function which executes Rx processing for a particular Rx stream.
The IxAtmdAccRxDispatch() function is used to process received Pdus available from one of the two incoming RX streams. When this function is invoked, the incoming traffic (up to the number of PDUs passed as a parameter) will be transferred to the IxAtmdAcc users through the callback IxAtmdAccRxVcRxCallback(), as registered during the ixAtmdAccRxVcConnect() call.
The user receive callbacks will be executed in the context of this function.
Failing to use this function on a regular basis when there is traffic will block incoming traffic and can result in Pdus being dropped by the hardware.
This should be used to control when received pdus are handed off from the hardware to Aal users from a particluar stream. The function can be used from a timer context, or can be registered as a callback in response to an rx stream threshold event, or can be used inside an active polling mechanism which is under user control.
- Note:
- - The signature of this function is directly compatible with the callback prototype which can be register with ixAtmdAccRxDispatcherRegister().
- See also:
- ixAtmdAccRxDispatcherRegister
IxAtmdAccRxVcRxCallback
ixAtmdAccRxVcFreeEntriesQuery
- Parameters:
-
rxQueueId | (in) indicates which RX queue to process. |
numberOfPdusToProcess | (in) indicates the maxiumum number of PDU to remove from the RX queue. A value of IX_ATMDACC_ALLPDUS indicates to process all PDUs from the queue. This includes at least the PDUs in the queue when the fuction is invoked. Because of real-time constraints, there is no guarantee thatthe queue will be empty when the function exits. If this parameter is greater than the number of entries of the queues, the function will succeed and the parameter numberOfPdusProcessedPtr will reflect the exact number of PDUs processed. |
numberOfPdusProcessedPtr | (out) indicates the actual number of PDU processed during this call. This parameter cannot be a null pointer. |
- Returns:
- IX_SUCCESS the number of PDUs as indicated in numberOfPdusProcessedPtr are removed from the RX queue and the VC callback are called.
- IX_FAIL invalid parameters or some unspecified internal error occured.
|
|
Register a notification callback to be invoked when there is at least one entry on a particular Rx queue.
This function registers a callback to be invoked when there is at least one entry in a particular queue. The registered callback is called every time when the hardware adds one or more pdus to the specified Rx queue.
This function cannot be used when a Rx Vc using this queue is already existing.
- Note:
- -The callback function can be the API function ixAtmdAccRxDispatch() : every time the threhold level of the queue is reached, the ixAtmdAccRxDispatch() is invoked to remove all entries from the queue.
- See also:
- ixAtmdAccRxDispatch
IxAtmdAccRxDispatcher
- Parameters:
-
queueId | (in) RX queue identification |
callback | (in) function triggering the delivery of incoming traffic. This parameter cannot be a null pointer. |
- Returns:
-
- IX_FAIL error in the parameters, or there is an already active RX VC for this queue or some unspecified internal error occurred.
|
ixAtmdAccRxLevelQuery |
( |
IxAtmRxQueueId |
rxQueueId, |
|
|
unsigned int * |
numberOfPdusPtr |
|
) |
|
|
|
Query the number of entries in a particular RX queue.
This function is used to retrieve the number of pdus received by the hardware and ready for distribution to users.
- Parameters:
-
rxQueueId | (in) indicates which of two RX queues to query. |
numberOfPdusPtr | (out) Pointer to store the number of available PDUs in the RX queue. This parameter cannot be a null pointer. |
- Returns:
- IX_SUCCESS the value in numberOfPdusPtr specifies the number of incoming pdus waiting in this queue
- IX_FAIL an error occurs during processing. The value in numberOfPdusPtr is unspecified.
- Note:
- - This function is reentrant, doesn't use system resources and can be used from an interrupt context.
|
ixAtmdAccRxQueueSizeQuery |
( |
IxAtmRxQueueId |
rxQueueId, |
|
|
unsigned int * |
numberOfPdusPtr |
|
) |
|
|
|
Query the size of a particular RX queue.
This function is used to retrieve the number of pdus the system is able to queue when reception is complete.
- Parameters:
-
rxQueueId | (in) indicates which of two RX queues to query. |
numberOfPdusPtr | (out) Pointer to store the number of pdus the system is able to queue in the RX queue. This parameter cannot be a null pointer. |
- Returns:
- IX_SUCCESS the value in numberOfPdusPtr specifies the number of pdus the system is able to queue.
- IX_FAIL an error occurs during processing. The value in numberOfPdusPtr is unspecified.
- Note:
- - This function is reentrant, doesn't use system resources and can be used from an interrupt context.
|
ixAtmdAccTxDoneDispatch |
( |
unsigned int |
numberOfPdusToProcess, |
|
|
unsigned int * |
numberOfPdusProcessedPtr |
|
) |
|
|
|
Process a number of pending transmit done pdus from the hardware.
As a by-product of Atm transmit operation buffers which transmission is complete need to be recycled to users. This function is invoked to service the oustanding list of transmitted buffers and pass them to VC users.
Users are handed back pdus by invoking the free callback registered during the ixAtmdAccTxVcConnect() call.
There is a single Tx done stream servicing all active Atm Tx ports which can contain a maximum of 64 entries. If this stream fills port transmission will stop so this function must be call sufficently frequently to ensure no disruption to the transmit operation.
This function can be used from a timer context, or can be associated with a TxDone level threshold event (see ixAtmdAccTxDoneDispatcherRegister() ), or can be used inside an active polling mechanism under user control.
For ease of use the signature of this function is compatible with the TxDone threshold event callback prototype.
This functions can be used inside an interrupt context.
- See also:
- ixAtmdAccTxDoneDispatcherRegister
IxAtmdAccTxVcBufferReturnCallback
ixAtmdAccTxDoneLevelQuery
- Parameters:
-
numberOfPdusToProcess | (in) maxiumum number of pdus to remove from the TX Done queue |
numberOfPdusProcessedPtr | (out) number of pdus removed from the TX Done queue. This parameter cannot be a null pointer. |
- Returns:
- IX_SUCCESS the number of pdus as indicated in numberOfPdusToProcess are removed from the TX Done hardware and passed to the user through the Tx Done callback registered during a call to ixAtmdAccTxVcConnect()
- IX_FAIL invalid parameters or numberOfPdusProcessedPtr is a null pointer or some unspecified internal error occured.
|
|
Configure the Tx Done stream threshold value and register a callback to handle threshold notifications.
This function sets the threshold level in term of number of pdus at which the supplied notification function should be called.
The higher the threshold value is, the less events will be necessary to process transmitted buffers.
Transmitted buffers recycling implementation is a sytem-wide mechanism and needs to be set prior any traffic is started. If this threshold mechanism is not used, the user is responsible for polling the transmitted buffers thanks to ixAtmdAccTxDoneDispatch() and ixAtmdAccTxDoneLevelQuery() functions.
This function should be called during system initialisation outside an interrupt context
- See also:
- ixAtmdAccTxDoneDispatcherRegister
ixAtmdAccTxDoneDispatch
ixAtmdAccTxDoneLevelQuery
- Parameters:
-
numberOfPdus | (in) The number of TxDone pdus which triggers the callback invocation This number has to be a power of 2, one of the values 0,1,2,4,8,16,32 ... The maximum value cannot be more than half of the txDone queue size (which can be retrieved using ixAtmdAccTxDoneQueueSizeQuery()) |
notificationCallback | (in) The function to invoke. (This parameter can be ixAtmdAccTxDoneDispatch()).This parameter ust not be a null pointer. |
- Returns:
- IX_SUCCESS Successful call to ixAtmdAccTxDoneDispatcherRegister
- IX_FAIL error in the parameters:
- Note:
- - The notificationCallback will be called exactly when the threshold level will increase from (numberOfPdus) to (numberOfPdus+1)
- If there is no Tx traffic, there is no guarantee that TxDone Pdus will be released to the user (when txDone level is permanently under the threshold level. One of the preffered way to return resources to the user is to use a mix of txDone notifications, used together with a slow rate timer and an exclusion mechanism protecting from re-entrancy
- The TxDone threshold will only hand back buffers when the threshold level is crossed. Setting this threshold to a great number reduce the interrupt rate and the cpu load, but also increase the number of outstanding mbufs and has a system wide impact when these mbufs are needed by other components.
|
ixAtmdAccTxDoneLevelQuery |
( |
unsigned int * |
numberOfPdusPtr |
) |
|
|
|
Query the current number of transmit pdus ready for recycling.
This function is used to get the number of transmitted pdus which the hardware is ready to hand back to user.
This function can be used from a timer context, or can be associated with a threshold event, on can be used inside an active polling mechanism
- See also:
- ixAtmdAccTxDoneDispatch
- Parameters:
-
numberOfPdusPtr | (out) Pointer to the number of pdus transmitted at the time of this function call, and ready for recycling This parameter cannot be a null pointer. |
- Returns:
- IX_SUCCESS numberOfPdusPtr contains the number of pdus ready for recycling at the time of this function call
- IX_FAIL wrong parameter (null pointer as parameter).or unspecified rocessing error occurs..The value in numberOfPdusPtr is unspecified.
|
ixAtmdAccTxDoneQueueSizeQuery |
( |
unsigned int * |
numberOfPdusPtr |
) |
|
|
|
Query the TxDone queue size.
This function is used to get the number of pdus which the hardware is able to store after transmission is complete
The returned value can be used to set a threshold and enable a callback to be notified when the number of pdus is going over the threshold.
- See also:
- ixAtmdAccTxDoneDispatcherRegister
- Parameters:
-
numberOfPdusPtr | (out) Pointer to the number of pdus the system is able to queue after transmission |
- Returns:
- IX_SUCCESS numberOfPdusPtr contains the the number of pdus the system is able to queue after transmission
- IX_FAIL wrong parameter (null pointer as parameter).or unspecified rocessing error occurs..The value in numberOfPdusPtr is unspecified.
- Note:
- - This function is reentrant, doesn't use system resources and can be used from an interrupt context.
|
|
Send the configuration structure to the Utopia interface.
This function downloads the IxAtmdAccUtopiaConfig structure to the Utopia and has the following effects
- setup the Utopia interface
- initialise the NPE
- reset the Utopia cell counters and status registers to known values
This action has to be done once at initialisation. A lock is preventing the concurrent use of ixAtmdAccUtopiaStatusGet() and ixAtmdAccUtopiaConfigSet()
- Parameters:
-
ixAtmdAccNPEConfigPtr | (in) pointer to a structure to download to Utopia. This parameter cannot be a null pointer. |
- Returns:
- IX_SUCCESS successful download
- IX_FAIL error in the parameters, or configuration is not complete or failed
- See also:
- ixAtmdAccUtopiaStatusGet
|
|
Get the Utopia interface configuration.
This function reads the Utopia registers and the Cell counts and fills the IxAtmdAccUtopiaStatus structure
A lock is preventing the concurrent use of ixAtmdAccUtopiaStatusGet() and ixAtmdAccUtopiaConfigSet()
- Parameters:
-
ixAttmdAccUtopiaStatus | (out) pointer to structure to be updated from internal hardware counters. This parameter cannot be a NULL pointer. |
- Returns:
- IX_SUCCESS successful read
- IX_FAIL error in the parameters null pointer, or configuration read is not complete or failed
- See also:
- ixAtmdAccUtopiaConfigSet
|
|