📄 txc_envoy_fifo_api.c
字号:
INPUTS: handle: Instance of the Envoy device to configure.
port: The ethernet MAC port to configure. For Envoy-CE2, the range is from
0 to 15, corresponding to ethernet physical port 1 to 8. For Envoy-CE4,
the range is 0 to 31, corresponding to ethernet physical ports 1 to 32.
The value 0xFFFF is used to configure all ethernet ports of specified
terminal the same way.
egressFifoTransferModeDataPtr: a pointer to type ENVOY_EFIFO_TRANSFER_MODE_STRUCT.
RETURNS: TXC_NO_ERR or an appropriate specific error code.
REVISION HISTORY:
Rev Date Author Description
----- ------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_U16BIT TXC_ENVOY_EfifoTransferModeGet (TXC_U16BIT handle,
ENVOY_EFIFO_TRANSFER_MODE_STRUCT *eFifoTransferModeDataPtr)
{
TXC_U16BIT error = TXC_NO_ERR;
/* check for input parameter */
error = ENVOY_GetEgressFifoTransferModeValid (handle);
/* process the data if no error */
if (error == TXC_NO_ERR)
{
#ifdef TXC_ENVOY_VIRTUAL_DEVICE_MODE
/*error = ENVOY_GetEgressFifoTransferModeVirtual (handle, eFifoTransferModeDataPtr); */
#else
error = ENVOY_GetEgressFifoTransferModeReal (handle, eFifoTransferModeDataPtr);
#endif
}
/* return the error code */
return error;
}
/************************************************************************************/
/*||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*/
/************************************************************************************
FUNCTION: TXC_ENVOY_EfifoStreamingCfgSet
DESCRIPTION: This function configures the per-port Egress FIFO streaming thresholds,
applicable when the Egress FIFOs are in streaming transfer mode only.
INPUTS: handle: Instance of the Envoy device to configure.
port: The ethernet MAC port to configure. For Envoy-CE2, the range is from
0 to 15, corresponding to ethernet physical port 1 to 8. For Envoy-CE4,
the range is 0 to 31, corresponding to ethernet physical ports 1 to 32.
The value 0xFFFF is used to configure all ethernet ports of specified
terminal the same way.
egressFifoStreamDataPtr: a pointer to type ENVOY_EFIFO_STREAMING_CFG_STRUCT.
RETURNS: TXC_NO_ERR or an appropriate specific error code.
REVISION HISTORY:
Rev Date Author Description
----- ------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_U16BIT TXC_ENVOY_EfifoStreamingCfgSet (TXC_U16BIT handle, TXC_U16BIT port,
ENVOY_EFIFO_STREAMING_CFG_STRUCT *eFifoStreamDataPtr)
{
TXC_U16BIT error = TXC_NO_ERR;
/* check for input parameters */
error = ENVOY_SetEfifoStreamingCfgValid (handle, port, eFifoStreamDataPtr);
/* process the data if no error */
if (error == TXC_NO_ERR)
{
#ifdef TXC_ENVOY_VIRTUAL_DEVICE_MODE
/*error = ENVOY_SetEfifoStreamingCfgVirtual (handle, port, eFifoStreamDataPtr); */
#else
error = ENVOY_SetEfifoStreamingCfgReal (handle, port, eFifoStreamDataPtr);
#endif
}
/* return the error code */
return error;
}
/************************************************************************************/
/*||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*/
/************************************************************************************
FUNCTION: TXC_ENVOY_EfifoStreamingCfgGet
DESCRIPTION: This function gets the per-port Egress FIFO streaming thresholds,
applicable when the Egress FIFOs are in streaming transfer mode only.
INPUTS: handle: Instance of the Envoy device to configure.
port: The ethernet MAC port to configure. For Envoy-CE2, the range is from
0 to 15, corresponding to ethernet physical port 1 to 8. For Envoy-CE4,
the range is 0 to 31, corresponding to ethernet physical ports 1 to 32.
The value 0xFFFF is used to configure all ethernet ports of specified
terminal the same way.
egressFifoStreamDataPtr: a pointer to type ENVOY_EFIFO_STREAMING_CFG_STRUCT.
RETURNS: TXC_NO_ERR or an appropriate specific error code.
REVISION HISTORY:
Rev Date Author Description
----- ------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_U16BIT TXC_ENVOY_EfifoStreamingCfgGet (TXC_U16BIT handle, TXC_U16BIT port,
ENVOY_EFIFO_STREAMING_CFG_STRUCT *eFifoStreamDataPtr)
{
TXC_U16BIT error = TXC_NO_ERR;
/* check for input parameters */
error = ENVOY_GetEfifoStreamingCfgValid (handle, port);
/* process the data if no error */
if (error == TXC_NO_ERR)
{
#ifdef TXC_ENVOY_VIRTUAL_DEVICE_MODE
/*error = ENVOY_GetEfifoStreamingCfgVirtual (handle, port, eFifoStreamDataPtr); */
#else
error = ENVOY_GetEfifoStreamingCfgReal (handle, port, eFifoStreamDataPtr);
#endif
}
/* return the error code */
return error;
}
/************************************************************************************/
/*||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*/
/************************************************************************************
FUNCTION: TXC_ENVOY_FifoPortCtrlSet
DESCRIPTION: This function configures the Ingress and Egress FIFO port enable status.
INPUTS: handle: Instance of the Envoy device to configure.
port: The ethernet MAC port to configure. For Envoy-CE2, the range is from
0 to 15, corresponding to ethernet physical port 1 to 8. For Envoy-CE4,
the range is 0 to 31, corresponding to ethernet physical ports 1 to 32.
The value 0xFFFF is used to configure all ethernet ports of specified
terminal the same way.
egressFifoStreamDataPtr: a pointer to type ENVOY_EFIFO_STREAMING_CFG_STRUCT.
RETURNS: TXC_NO_ERR or an appropriate specific error code.
REVISION HISTORY:
Rev Date Author Description
----- ------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_U16BIT TXC_ENVOY_FifoPortCtrlSet (TXC_U16BIT handle, TXC_U16BIT port,
ENVOY_FIFO_PORT_CTRL_STRUCT *fifoPortCtrlPtr)
{
TXC_U16BIT error = TXC_NO_ERR;
/* check for input parameters */
error = ENVOY_SetFifoPortCtrlValid (handle, port, fifoPortCtrlPtr);
/* process the data if no error */
if (error == TXC_NO_ERR)
{
#ifdef TXC_ENVOY_VIRTUAL_DEVICE_MODE
/*error = ENVOY_SetFifoPortCtrlVirtual (handle, port, fifoPortCtrlPtr); */
#else
error = ENVOY_SetFifoPortCtrlReal (handle, port, fifoPortCtrlPtr);
#endif
}
/* return the error code */
return error;
}
/************************************************************************************/
/*||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*/
/************************************************************************************
FUNCTION: TXC_ENVOY_FifoPortCtrlGet
DESCRIPTION: This function gets the Ingress and Egress FIFO port enable status.
INPUTS: handle: Instance of the Envoy device to configure.
port: The ethernet MAC port to configure. For Envoy-CE2, the range is from
0 to 15, corresponding to ethernet physical port 1 to 8. For Envoy-CE4,
the range is 0 to 31, corresponding to ethernet physical ports 1 to 32.
The value 0xFFFF is used to configure all ethernet ports of specified
terminal the same way.
egressFifoStreamDataPtr: a pointer to type ENVOY_EFIFO_STREAMING_CFG_STRUCT.
RETURNS: TXC_NO_ERR or an appropriate specific error code.
REVISION HISTORY:
Rev Date Author Description
----- ------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_U16BIT TXC_ENVOY_FifoPortCtrlGet (TXC_U16BIT handle, TXC_U16BIT port,
ENVOY_FIFO_PORT_CTRL_STRUCT *fifoPortCtrlPtr)
{
TXC_U16BIT error = TXC_NO_ERR;
/* check for input parameters */
error = ENVOY_GetFifoPortCtrlValid (handle, port);
/* process the data if no error */
if (error == TXC_NO_ERR)
{
#ifdef TXC_ENVOY_VIRTUAL_DEVICE_MODE
/*error = ENVOY_GetFifoPortCtrlVirtual (handle, port, fifoPortCtrlPtr); */
#else
error = ENVOY_GetFifoPortCtrlReal (handle, port, fifoPortCtrlPtr);
#endif
}
/* return the error code */
return error;
}
/************************************************************************************/
/*||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*/
/************************************************************************************
FUNCTION: TXC_ENVOY_FifoPortStatisticsRtrv
DESCRIPTION: This function retrieves the Ingress and Egress FIFO Packet Statistics.
INPUTS: handle: Instance of the Envoy device to configure.
port: The ethernet MAC port to configure. For Envoy-CE2, the range is from
0 to 15, corresponding to ethernet physical port 1 to 8. For Envoy-CE4,
the range is 0 to 31, corresponding to ethernet physical ports 1 to 32.
The value 0xFFFF is used to configure all ethernet ports of specified
terminal the same way.
fifoPortStatisticsDataPtr: a pointer to type ENVOY_FIFO_PORT_STATISTICS_STRUCT.
RETURNS: TXC_NO_ERR or an appropriate specific error code.
REVISION HISTORY:
Rev Date Author Description
----- ------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_U16BIT TXC_ENVOY_FifoPortStatisticsRtrv (TXC_U16BIT handle, TXC_U16BIT port,
ENVOY_FIFO_PORT_STATISTICS_STRUCT *fifoPortStatisticsDataPtr)
{
TXC_U16BIT error = TXC_NO_ERR;
/* check for input parameters */
error = ENVOY_RtrvFifoPortStatisticsValid (handle, port);
/* process the data if no error */
if (error == TXC_NO_ERR)
{
#ifdef TXC_ENVOY_VIRTUAL_DEVICE_MODE
/*error = ENVOY_RtrvFifoPortStatisticsVirtual (handle, port, fifoPortStatisticsDataPtr); */
#else
error = ENVOY_RtrvFifoPortStatisticsReal (handle, port, fifoPortStatisticsDataPtr);
#endif
}
/* return the error code */
return error;
}
/************************************************************************************/
/*||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*/
/************************************************************************************
FUNCTION: TXC_ENVOY_FifoStatusRtrv
DESCRIPTION: This function retrieves the global (across all ports) Ingress and
Egress FIFO Status.
INPUTS: handle: Instance of the Envoy device to configure.
port: The ethernet MAC port to configure. For Envoy-CE2, the range is from
0 to 15, corresponding to ethernet physical port 1 to 8. For Envoy-CE4,
the range is 0 to 31, corresponding to ethernet physical ports 1 to 32.
The value 0xFFFF is used to configure all ethernet ports of specified
terminal the same way.
fifoPortStatisticsDataPtr: a pointer to type ENVOY_FIFO_PORT_STATISTICS_STRUCT.
RETURNS: TXC_NO_ERR or an appropriate specific error code.
REVISION HISTORY:
Rev Date Author Description
----- ------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_U16BIT TXC_ENVOY_FifoStatusRtrv (TXC_U16BIT handle, TXC_U16BIT port,
ENVOY_FIFO_STATUS_STRUCT *fifoStatusDataPtr)
{
TXC_U16BIT error = TXC_NO_ERR;
/* check for input parameters */
error = ENVOY_RtrvFifoStatusValid (handle, port);
/* process the data if no error */
if (error == TXC_NO_ERR)
{
#ifdef TXC_ENVOY_VIRTUAL_DEVICE_MODE
/*error = ENVOY_RtrvFifoStatusVirtual (handle, port, fifoStatusDataPtr); */
#else
error = ENVOY_RtrvFifoStatusReal (handle, port, fifoStatusDataPtr);
#endif
}
/* return the error code */
return error;
}
/****************************************************************************
** End of Module **
****************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -