Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Macros | Enumerations | Functions
Priority-Based Flow Control Configuration And Statistics APIs [OPENAPI_PFC]

Macros

#define OPEN_QOS_PFC_PRIORITY_ALL   8
 
#define OPEN_QOS_PFC_PRIORITY_MAX   (OPEN_QOS_PFC_PRIORITY_ALL-1)
 
#define OPEN_QOS_PFC_PRIORITY_MIN   0
 

Enumerations

enum  OPEN_PFC_ACTION_t { OPEN_PFC_ACTION_DROP = 0, OPEN_PFC_ACTION_NO_DROP = 1 }
 
enum  OPEN_PFC_FEATURE_IDS_t { OPEN_PFC_FEATURE_SUPPORTED = 0, OPEN_PFC_PORT_PRIORITY_FLOW_CONTROL_FEATURE_ID = 1, OPEN_PFC_TX_STATS_FEATURE_ID = 2 }
 
enum  OPEN_PFC_MODE_t { OPEN_PFC_MODE_DISABLE = 0, OPEN_PFC_MODE_ENABLE = 1 }
 
enum  OPEN_PFC_PRI_DROP_MODE_t { OPEN_PFC_PRI_DROP_MODE = 0, OPEN_PFC_PRI_NODROP_MODE = 1 }
 
enum  OPEN_PFC_STATUS_t { OPEN_PFC_STATUS_ACTIVE = 0, OPEN_PFC_STATUS_INACTIVE = 1 }
 

Functions

open_error_t openapiIfPfcModeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PFC_MODE_t *mode)
 Get the pfc mode for the interface. More...
 
open_error_t openapiIfPfcModeSet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PFC_MODE_t mode)
 Enable an interface for PFC. More...
 
open_error_t openapiIfPfcPriorityModeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t priority, OPEN_PFC_PRI_DROP_MODE_t *mode)
 Get the drop mode for the priority on an interface. More...
 
open_error_t openapiIfPfcPriorityModeSet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t priority, OPEN_PFC_PRI_DROP_MODE_t dropMode)
 Set the drop mode for the priority on an interface. More...
 
open_error_t openapiIfPfcRxPriorityStatGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t priority, uint32_t *stat)
 Get the PFC Rx Priority stat on an interface. More...
 
open_error_t openapiIfPfcRxStatGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *count)
 Get the PFC Rx stat on an interface. More...
 
open_error_t openapiIfPfcStatsClear (openapiClientHandle_t *client_handle, uint32_t ifNum)
 Clear the PFC stats on an interface. More...
 
open_error_t openapiIfPfcStatusGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PFC_STATUS_t *status)
 Get the active status on the interface. More...
 
open_error_t openapiIfPfcTxStatGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *count)
 Get the PFC Tx stat on an interface. More...
 
open_error_t openapiPfcAdvPriorityModeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t priority, OPEN_PFC_PRI_DROP_MODE_t *mode)
 Gets the advertised PFC Priority participation mode for the interface. More...
 
open_error_t openapiPfcMaxNoDropPriorityGet (openapiClientHandle_t *client_handle, uint32_t *maxPrio)
 Returns the maximum priority that can be configured in PFC. More...
 
open_error_t openapiPfcMinNoDropPriorityGet (openapiClientHandle_t *client_handle, uint32_t *minPrio)
 Returns the minimum priority that can be configured in PFC. More...
 
open_error_t openapiPfcOperLinkDelayAllowanceGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *allowance)
 Gets the link delay allowance in bits for the interface. More...
 
open_error_t openapiPfcOprPriorityModeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t priority, OPEN_PFC_PRI_DROP_MODE_t *mode)
 Gets the operational PFC Priority participation mode for the interface. More...
 
open_error_t openapiPfcPeerCapabilityGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *numPfcCap)
 Get the capability of the peer. More...
 
open_error_t openapiPfcPeerCfgCompatibleGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *compatible)
 Indicates if the peer configuration is compatible. More...
 
open_error_t openapiPfcPeerCompatibleCfgCountGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *count)
 Gets the count of compatible configurations received from peer. More...
 
open_error_t openapiPfcPeerIncompatibleCfgCountGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *incompatibleCfgCount)
 Gets the count of incompatible configurations received from peer. More...
 
open_error_t openapiPfcPeerMbcStatusGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *mbcStatus)
 Get the MACSEC bypass capability of the peer. More...
 
open_error_t openapiPfcPeerPriorityModeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t priority, OPEN_PFC_PRI_DROP_MODE_t *mode)
 Get the peer priority mode for a priority. More...
 
open_error_t openapiPfcPeerWillingGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *willing)
 Get the willingness of the peer. More...
 
open_error_t openapiPfcTxPriorityStatGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t priority, uint32_t *count)
 Gets the number of PFC packets transmitted per interface/priority. More...
 

Detailed Description

Function Documentation

open_error_t openapiIfPfcModeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_PFC_MODE_t *  mode 
)

Get the pfc mode for the interface.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]modeenabled for pfc or not.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILFeature not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiIfPfcModeSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_PFC_MODE_t  mode 
)

Enable an interface for PFC.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[in]modemode
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILFeature not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiIfPfcPriorityModeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  priority,
OPEN_PFC_PRI_DROP_MODE_t *  mode 
)

Get the drop mode for the priority on an interface.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[in]prioritypriority to get.
[out]modethe drop mode of the interface.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILFeature not supported.
OPEN_E_NOT_FOUNDPriority is greater than OPEN_DOT1P_MAX_PRIORITY
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiIfPfcPriorityModeSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  priority,
OPEN_PFC_PRI_DROP_MODE_t  dropMode 
)

Set the drop mode for the priority on an interface.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[in]prioritypriority
[in]dropModedrop mode
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_NOT_FOUNDPriority is less than PFC minimum priority or greater than PFC maximum priority.
OPEN_E_UNAVAILFeature not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiIfPfcRxPriorityStatGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  priority,
uint32_t *  stat 
)

Get the PFC Rx Priority stat on an interface.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[in]prioritypriority to get.
[out]statthe statistic.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILFeature not supported.
OPEN_E_NOT_FOUNDPriority is greater than OPEN_DOT1P_MAX_PRIORITY
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiIfPfcRxStatGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  count 
)

Get the PFC Rx stat on an interface.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]countPFC Rx statistic.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILFeature not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiIfPfcStatsClear ( openapiClientHandle_t client_handle,
uint32_t  ifNum 
)

Clear the PFC stats on an interface.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILFeature not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiIfPfcStatusGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_PFC_STATUS_t *  status 
)

Get the active status on the interface.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]statusThe active status of the interface.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiIfPfcTxStatGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  count 
)

Get the PFC Tx stat on an interface.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]countPFC Tx statistic.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILFeature not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiPfcAdvPriorityModeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  priority,
OPEN_PFC_PRI_DROP_MODE_t *  mode 
)

Gets the advertised PFC Priority participation mode for the interface.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[in]prioritypriority.
[out]modeparticipation mode.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_NOT_FOUNDInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiPfcMaxNoDropPriorityGet ( openapiClientHandle_t client_handle,
uint32_t *  maxPrio 
)

Returns the maximum priority that can be configured in PFC.

Parameters
[in]client_handleclient handle.
[out]maxPriomaximum priority.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.

OpEN API Version: 1.14

open_error_t openapiPfcMinNoDropPriorityGet ( openapiClientHandle_t client_handle,
uint32_t *  minPrio 
)

Returns the minimum priority that can be configured in PFC.

Parameters
[in]client_handleclient handle.
[out]minPriominimum priority.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.

OpEN API Version: 1.14

open_error_t openapiPfcOperLinkDelayAllowanceGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  allowance 
)

Gets the link delay allowance in bits for the interface.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]allowancelink delay allowance.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiPfcOprPriorityModeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  priority,
OPEN_PFC_PRI_DROP_MODE_t *  mode 
)

Gets the operational PFC Priority participation mode for the interface.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[in]prioritypriority to get.
[out]modethe drop mode of the interface.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_NOT_FOUNDPriority is greater than OPEN_DOT1P_MAX_PRIORITY
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiPfcPeerCapabilityGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  numPfcCap 
)

Get the capability of the peer.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]numPfcCapcapability of the peer.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_FAILSome failure occurred.
Note
if peer is not detected, numPfcCap is set to 0.

OpEN API Version: 1.14

open_error_t openapiPfcPeerCfgCompatibleGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_BOOL_t compatible 
)

Indicates if the peer configuration is compatible.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]compatiblepeer configuration compatible.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_NOT_FOUNDPeer not detected.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiPfcPeerCompatibleCfgCountGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  count 
)

Gets the count of compatible configurations received from peer.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]countcount of compatible configurations.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiPfcPeerIncompatibleCfgCountGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  incompatibleCfgCount 
)

Gets the count of incompatible configurations received from peer.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]incompatibleCfgCountincompatible count from peer.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiPfcPeerMbcStatusGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_BOOL_t mbcStatus 
)

Get the MACSEC bypass capability of the peer.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]mbcStatusMACSEC bypass capability of peer.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_NOT_FOUNDPeer not detected.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiPfcPeerPriorityModeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  priority,
OPEN_PFC_PRI_DROP_MODE_t *  mode 
)

Get the peer priority mode for a priority.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[in]prioritypriority.
[out]modepeer priority mode.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_NOT_FOUNDPriority is greater than OPEN_DOT1P_MAX_PRIORITY or peer is not detected.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiPfcPeerWillingGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_BOOL_t willing 
)

Get the willingness of the peer.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]willingwillingness of the peer.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_NOT_FOUNDPeer not detected.
OPEN_E_UNAVAILFeature not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiPfcTxPriorityStatGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  priority,
uint32_t *  count 
)

Gets the number of PFC packets transmitted per interface/priority.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[in]prioritypriority to get.
[out]countNumber of pfc packets tx on this priority
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILFeature not supported.
OPEN_E_NOT_FOUNDPriority is greater than OPEN_DOT1P_MAX_PRIORITY
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14