Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.12.0.1
openapi_pfc.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2017-2018 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 * Licensed under the Apache License, Version 2.0 (the "License");
26 * you may not use this file except in compliance with the License.
27 * You may obtain a copy of the License at
28 *
29 * http://www.apache.org/licenses/LICENSE-2.0
30 *
31 * Unless required by applicable law or agreed to in writing, software
32 * distributed under the License is distributed on an "AS IS" BASIS,
33 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34 * See the License for the specific language governing permissions and
35 * limitations under the License.
36 *
37 **********************************************************************
38 *
39 * @filename openapi_pfc.h
40 *
41 * @purpose Priority-based Flow Control Configuration and Statistics APIs.
42 *
43 * @component OPEN
44 *
45 * @create 01/23/2017
46 *
47 * @end
48 *
49 **********************************************************************/
50 #ifndef OPENAPI_PFC_H_INCLUDED
51 #define OPENAPI_PFC_H_INCLUDED
52 
53 #include <stdio.h>
54 #include <stddef.h>
55 #include <sys/un.h>
56 
57 #include "openapi_common.h"
58 
59 typedef enum
60 {
64 
65 typedef enum
66 {
70 
71 typedef enum
72 {
77 
78 typedef enum
79 {
83 
84 typedef enum
85 {
89 
90 typedef enum
91 {
95 
96 typedef enum
97 {
101 
102 typedef enum
103 {
107 
108 
109 #define OPEN_QOS_PFC_PRIORITY_ALL 8
110 #define OPEN_QOS_PFC_PRIORITY_MIN 0
111 #define OPEN_QOS_PFC_PRIORITY_MAX (OPEN_QOS_PFC_PRIORITY_ALL-1)
112 
113 #define OPEN_PFC_DEADLOCK_DETECT_TIME_MIN 0
114 #define OPEN_PFC_DEADLOCK_DETECT_TIME_MAX 1500
115 
116 /*****************************************************************/
131  uint32_t ifNum,
132  uint32_t *incompatibleCfgCount);
133 
134 /*****************************************************************/
151  uint32_t ifNum,
152  OPEN_BOOL_t *willing);
153 
154 /*****************************************************************/
170  uint32_t ifNum,
171  OPEN_BOOL_t *mbcStatus);
172 
173 /*****************************************************************/
190  uint32_t ifNum,
191  uint32_t *numPfcCap);
192 
193 /*****************************************************************/
211  uint32_t ifNum,
212  uint32_t priority,
214 
215 /*****************************************************************/
232  uint32_t ifNum,
233  uint32_t priority,
235 
236 /*****************************************************************/
252  uint32_t ifNum,
253  OPEN_PFC_MODE_t mode);
254 
255 /*****************************************************************/
273  uint32_t ifNum,
274  uint32_t priority,
275  OPEN_PFC_PRI_DROP_MODE_t dropMode);
276 
277 /*****************************************************************/
290  uint32_t *minPrio);
291 
292 /*****************************************************************/
305  uint32_t *maxPrio);
306 
307 /*****************************************************************/
322  uint32_t ifNum);
323 
324 /*****************************************************************/
339  uint32_t ifNum,
340  OPEN_PFC_STATUS_t *status);
341 
342 /*****************************************************************/
358  uint32_t ifNum,
359  OPEN_PFC_MODE_t *mode);
360 
361 /*****************************************************************/
379  uint32_t ifNum,
380  uint32_t priority,
382 
383 /*****************************************************************/
401  uint32_t ifNum,
402  uint32_t priority,
404 
405 /*****************************************************************/
420  uint32_t ifNum,
421  uint32_t *allowance);
422 
423 /*****************************************************************/
439  uint32_t ifNum,
440  OPEN_BOOL_t *compatible);
441 
442 /*****************************************************************/
457  uint32_t ifNum,
458  uint32_t *count);
459 
460 /*****************************************************************/
478  uint32_t ifNum,
479  uint32_t priority,
480  uint32_t *stat);
481 
482 /*****************************************************************/
501  uint32_t ifNum,
502  uint32_t priority,
503  uint32_t *count);
504 
505 /*****************************************************************/
521  uint32_t ifNum,
522  uint32_t *count);
523 
524 /*****************************************************************/
540  uint32_t ifNum,
541  uint32_t *count);
542 
543 /*****************************************************************/
560  uint32_t intIfNum, uint32_t priority,
561  OPEN_PFC_DDR_MODE_t mode);
562 
563 /*****************************************************************/
580  uint32_t intIfNum, uint32_t priority,
581  OPEN_PFC_DDR_MODE_t *mode);
582 
583 /*****************************************************************/
599 
600 /*****************************************************************/
616 
617 /*****************************************************************/
633 
634 /*****************************************************************/
649  OPEN_PFC_DDR_ACTION_t *val);
650 
651 /*****************************************************************/
667  uint32_t priority, uint32_t val);
668 
669 /*****************************************************************/
685  uint32_t priority, uint32_t val);
686 
687 /*****************************************************************/
704  uint32_t priority, uint32_t *det_time,
705  uint32_t *rec_time);
706 
707 #endif /* OPENAPI_PFC_H_INCLUDED */
708 
open_error_t openapiPfcDeadlockDetectIntervalSet(openapiClientHandle_t *client_handle, OPEN_PFC_DDR_DETECT_TIME_t val)
Set the deadlock detect interval.
open_error_t openapiIfPfcDeadlockConfigSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t priority, OPEN_PFC_DDR_MODE_t mode)
Enable/Disable deadlock detect for the priority on an interface.
OPEN_PFC_PRI_DROP_MODE_t
Definition: openapi_pfc.h:59
open_error_t openapiPfcPeerIncompatibleCfgCountGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *incompatibleCfgCount)
Gets the count of incompatible configurations received from peer.
open_error_t openapiIfPfcRxStatGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *count)
Get the PFC Rx stat on an interface.
open_error_t openapiPfcPeerCompatibleCfgCountGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *count)
Gets the count of compatible configurations received from peer.
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.
priority no drop mode
Definition: openapi_pfc.h:62
PFC Deadlock Detect enable mode.
Definition: openapi_pfc.h:93
PFC deadlock detect time 10 ms.
Definition: openapi_pfc.h:104
open_error_t openapiPfcPeerMbcStatusGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *mbcStatus)
Get the MACSEC bypass capability of the peer.
open_error_t openapiPfcDeadlockRecoveryActionGet(openapiClientHandle_t *client_handle, OPEN_PFC_DDR_ACTION_t *val)
Get the deadlock recovery action.
open_error_t
OPEN uses these enumerators to indicate the error codes.
general support statement
Definition: openapi_pfc.h:73
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.
OPEN_PFC_FEATURE_IDS_t
Definition: openapi_pfc.h:71
PFC deadlock recovery action drop.
Definition: openapi_pfc.h:99
open_error_t openapiPfcDeadlockDetectTimeGet(openapiClientHandle_t *client_handle, uint32_t priority, uint32_t *det_time, uint32_t *rec_time)
Get the deadlock detect time and recovery time for a priority.
open_error_t openapiPfcPeerWillingGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *willing)
Get the willingness of the peer.
open_error_t openapiPfcDeadlockDetectIntervalGet(openapiClientHandle_t *client_handle, OPEN_PFC_DDR_DETECT_TIME_t *val)
Get the deadlock detect interval.
OPEN_PFC_STATUS_t
Definition: openapi_pfc.h:84
open_error_t openapiPfcMaxNoDropPriorityGet(openapiClientHandle_t *client_handle, uint32_t *maxPrio)
Returns the maximum priority that can be configured in PFC.
priority drop mode
Definition: openapi_pfc.h:61
open_error_t openapiIfPfcTxStatGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *count)
Get the PFC Tx stat on an interface.
PFC status inactive.
Definition: openapi_pfc.h:87
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.
open_error_t openapiPfcDeadlockRecoveryActionSet(openapiClientHandle_t *client_handle, OPEN_PFC_DDR_ACTION_t val)
Set the deadlock recovery action.
PFC status active.
Definition: openapi_pfc.h:86
PFC Deadlock Detect disable mode.
Definition: openapi_pfc.h:92
open_error_t openapiIfPfcStatusGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PFC_STATUS_t *status)
Get the active status on the interface.
action drop
Definition: openapi_pfc.h:67
OPEN_PFC_DDR_MODE_t
Definition: openapi_pfc.h:90
open_error_t openapiIfPfcModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PFC_MODE_t *mode)
Get the pfc mode for the interface.
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.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiIfPfcStatsClear(openapiClientHandle_t *client_handle, uint32_t ifNum)
Clear the PFC stats on an interface.
open_error_t openapiPfcDeadlockRecoveryTimeSet(openapiClientHandle_t *client_handle, uint32_t priority, uint32_t val)
Set the deadlock recovery time for a priority.
open_error_t openapiPfcDeadlockDetectTimeSet(openapiClientHandle_t *client_handle, uint32_t priority, uint32_t val)
Set the deadlock detect time for a priority.
PFC deadlock detect time 100 ms.
Definition: openapi_pfc.h:105
OPEN_PFC_DDR_ACTION_t
Definition: openapi_pfc.h:96
PFC enable mode.
Definition: openapi_pfc.h:81
open_error_t openapiPfcPeerCapabilityGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *numPfcCap)
Get the capability of the peer.
OPEN_PFC_MODE_t
Definition: openapi_pfc.h:78
PFC deadlock recovery action transmit.
Definition: openapi_pfc.h:98
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.
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.
OPEN_PFC_DDR_DETECT_TIME_t
Definition: openapi_pfc.h:102
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.
OPEN_PFC_ACTION_t
Definition: openapi_pfc.h:65
open_error_t openapiIfPfcModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PFC_MODE_t mode)
Enable an interface for PFC.
open_error_t openapiPfcOperLinkDelayAllowanceGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *allowance)
Gets the link delay allowance in bits for the interface.
PFC disable mode.
Definition: openapi_pfc.h:80
open_error_t openapiIfPfcDeadlockConfigGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t priority, OPEN_PFC_DDR_MODE_t *mode)
Get the deadlock detect mode for the priority on an interface.
open_error_t openapiPfcPeerCfgCompatibleGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *compatible)
Indicates if the peer configuration is compatible.
open_error_t openapiPfcMinNoDropPriorityGet(openapiClientHandle_t *client_handle, uint32_t *minPrio)
Returns the minimum priority that can be configured in PFC.
action no drop
Definition: openapi_pfc.h:68
port priority flow control feature
Definition: openapi_pfc.h:74