Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.13.1.2
openapi_cos.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2017-2024 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 **********************************************************************
26 *
27 * @filename openapi_cos.h
28 *
29 * @purpose Class of Service Configuration
30 *
31 * @component OpEN
32 *
33 * @create 01/11/2017
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_COS_H_INCLUDED
39 #define OPENAPI_COS_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
43 #define OPEN_COS_ALL_INTERFACES 0
44 #define OPEN_COS_QUEUE_ID_MIN 0
45 
46 #define OPEN_MIN_CFG_DROP_PREC_LEVELS 1
47 #define OPEN_MAX_CFG_DROP_PREC_LEVELS 4
48 
50 typedef enum
51 {
58 
60 typedef enum
61 {
65 
67 typedef enum
68 {
71 
72 /*****************************************************************/
91 
92 /*****************************************************************/
114 
115 /*****************************************************************/
133 open_error_t openapiCosQueueIntfShapingRateGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *rate);
134 
135 /*****************************************************************/
153 open_error_t openapiCosQueueIntfShapingRateSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t rate);
154 
155 /*****************************************************************/
183 open_error_t openapiCosQueueWredDropParamsSet(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum,
184  uint8_t dropPrecedence, OPEN_BOOL_t ecnEnabled, int16_t wredMinThreshold,
185  int16_t wredMaxThreshold, int16_t wredDropProbability);
186 
187 /*****************************************************************/
207 open_error_t openapiCosQueueWredDropParamsReset(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum);
208 
209 /*****************************************************************/
228 open_error_t openapiCosQueueWredStatsGet(openapiClientHandle_t *client_handle, uint32_t intfNum,
229  uint64_t *dropCount, uint64_t *ecnMarked);
230 
231 /*****************************************************************/
246 open_error_t openapiCosQueueWredStatsClear(openapiClientHandle_t *client_handle, uint32_t intfNum);
247 
248 /*****************************************************************/
270  uint32_t intfNum, uint8_t queueNum,
271  OPEN_BOOL_t enableWred);
272 
273 /*****************************************************************/
286  uint32_t *maxQueueId);
287 
288 /*************************************************************************/
308 
309 /*************************************************************************/
327  OPEN_QOS_COS_MAP_TRUST_MODE_t *pTrustMode);
328 
329 /*************************************************************************/
349  uint32_t intIfNum,
351 
352 /*************************************************************************/
371  uint32_t intIfNum,
372  OPEN_QOS_COS_MAP_TRUST_MODE_t *pTrustMode);
373 
374 /*************************************************************************/
391  uint32_t intIfNum);
392 
393 /*************************************************************************/
412  uint32_t intIfNum,
413  uint32_t *pNxtIntIfNum);
414 
415 /*************************************************************************/
436  uint32_t intIfNum, uint32_t *pTcVal);
437 
438 /*************************************************************************/
456  uint32_t intIfNum);
457 
458 /*************************************************************************/
477  uint32_t intIfNum, uint32_t *pNxtIntIfNum);
478 
479 /*************************************************************************/
498  uint32_t intIfNum, OPEN_BOOL_t *pIsQueueIntfValid);
499 
500 /*************************************************************************/
518  uint32_t queueId);
519 
520 /*************************************************************************/
539  uint32_t queueId, uint32_t *pNxtqueueId);
540 
541 /*************************************************************************/
564  uint32_t intIfNum, uint32_t queueId,
565  uint32_t minBwVal);
566 
567 /*************************************************************************/
591  uint32_t intIfNum, open_buffdesc *pMinBwList);
592 
593 /*************************************************************************/
616  uint32_t intIfNum, uint32_t queueId,
618 
619 /*************************************************************************/
643  uint32_t intIfNum, open_buffdesc *pSchTypeList);
644 
645 /*************************************************************************/
668  uint32_t intIfNum, uint32_t queueId,
670 
671 /*************************************************************************/
695  uint32_t intIfNum, open_buffdesc *pMgmtTypeList);
696 
697 /*************************************************************************/
720  uint32_t intIfNum, uint32_t priority,
721  uint32_t tc);
722 
723 /*************************************************************************/
745  uint32_t intIfNum, uint32_t priority,
746  uint32_t *pTc);
747 
748 /*************************************************************************/
767  uint32_t intIfNum, uint32_t priority);
768 
769 /*************************************************************************/
788  uint32_t *pIntIfNum, uint32_t *pPriority);
789 
790 /*************************************************************************/
812  uint32_t intIfNum, uint32_t priority,
813  uint32_t *pTc);
814 /*************************************************************************/
832  uint32_t dscp);
833 
834 /*************************************************************************/
853  uint32_t dscp, uint32_t *pNxtDscp);
854 
855 /*************************************************************************/
878  uint32_t intIfNum, uint32_t dscp,
879  uint32_t tc);
880 
881 /*************************************************************************/
903  uint32_t intIfNum, uint32_t dscp,
904  uint32_t *pTc);
905 
906 /*************************************************************************/
929  uint32_t intIfNum, uint32_t dscp,
930  uint32_t *pTc);
931 
932 /*************************************************************************/
953  uint32_t intIfNum);
954 
955 /*************************************************************************/
973  uint32_t intIfNum);
974 
975 /*************************************************************************/
994  uint32_t intIfNum, uint32_t *pNxtIntIfNum);
995 
996 /*************************************************************************/
1014  uint32_t *pIntIfNum);
1015 
1016 #endif /* OPENAPI_COS_H_INCLUDED */
1017 
open_error_t openapiQosCosQueueSchedulerTypeListGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, open_buffdesc *pSchTypeList)
Gets scheduler type list for all queues on a given interface.
open_error_t openapiCosQueueMaxIdGet(openapiClientHandle_t *client_handle, uint32_t *maxQueueId)
Get the max cos queue ID value.
open_error_t openapiQosCosQueueMinBandwidthListGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, open_buffdesc *pMinBwList)
Gets minimum bandwidth list for all queues on a given interface.
trust pkt Dot1p (802.1p) value
Definition: openapi_cos.h:54
open_error_t openapiQosCosQueueMgmtTypeListGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, open_buffdesc *pMgmtTypeList)
Gets queue management type list for all queues on a given interface.
open_error_t openapiQosCosMapIpDscpIndexGet(openapiClientHandle_t *client_handle, uint32_t dscp)
Gets status of specified IP DSCP mapping table index.
open_error_t openapiQosCosDot1dTrafficClassEntryGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t priority)
Gets status of user priority to traffic class mapping for a given interface.
OPEN_QOS_COS_MAP_TRUST_MODE_t
QOS COS mapping trust modes.
Definition: openapi_cos.h:50
open_error_t openapiCosQueueWredDropParamsSet(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum, uint8_t dropPrecedence, OPEN_BOOL_t ecnEnabled, int16_t wredMinThreshold, int16_t wredMaxThreshold, int16_t wredDropProbability)
Set WRED and ECN drop configuration on a given queue for a given or all interfaces.
open_error_t openapiQosCosQueueMgmtTypeSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t queueId, OPEN_QOS_COS_QUEUE_MGMT_TYPE_t qMgmtType)
Sets queue management type for a specific queue on a given interface.
open_error_t openapiCosQueueIntfShapingRateGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *rate)
Get the COS egress shaping rate for an interface.
open_error_t openapiCosQueueIntfShapingRateUnitsGet(openapiClientHandle_t *client_handle, OPEN_RATE_UNIT_t *rateUnit)
Get the units used to express rates.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiQosCosQueueIntfIndexGetNext(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pNxtIntIfNum)
Gets next sequential specified queue config interface index.
do not trust any pkt markings
Definition: openapi_cos.h:53
open_error_t openapiQosCosMapIpDscpIntfIndexGet(openapiClientHandle_t *client_handle, uint32_t intIfNum)
Gets status of specified ip DSCP mapping table interface index.
open_error_t openapiQosCosDot1dDefaultTrafficClassGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t priority, uint32_t *pTc)
Gets factory default dot1d traffic class information.
open_error_t openapiQosCosQueueMinBandwidthSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t queueId, uint32_t minBwVal)
Sets minimum bandwidth for a specific queue on a given interface.
OPEN_RATE_UNIT_t
OpEN uses this enumeration to define rate units.
open_error_t openapiQosCosMapUntrustedPortDefaultTrafficClassGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pTcVal)
Gets CoS untrusted port default traffic class for given internal interface.
open_error_t openapiQosCosMapTrustModeIntfIndexGet(openapiClientHandle_t *client_handle, uint32_t intIfNum)
Gets specified trust mode interface index status.
open_error_t openapiQosCosMapIpDscpIntfIndexGetNext(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pNxtIntIfNum)
Gets next sequential ip DSCP mapping table interface index.
open_error_t openapiQosCosMapIpDscpIndexGetNext(openapiClientHandle_t *client_handle, uint32_t dscp, uint32_t *pNxtDscp)
Gets next sequential ip DSCP mapping table index.
open_error_t openapiCosQueueWredDropParamsReset(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum)
Reset WRED and ECN drop configuration on a given queue for a given or all interfaces.
open_error_t openapiQosCosMapIpDscpTrafficClassGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t dscp, uint32_t *pTc)
Gets the assigned traffic class (queue) for given ip DSCP.
open_error_t openapiCosQueueWredSet(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum, OPEN_BOOL_t enableWred)
Enable or disable WRED for a given queue and for a given or all interfaces.
trust pkt IP DSCP value
Definition: openapi_cos.h:56
open_error_t openapiQosCosMapIpDscpTrafficClassSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t dscp, uint32_t tc)
Sets the assigned traffic class (queue) for given Ip DSCP.
open_error_t openapiQosCosDot1dTrafficClassEntryNextGet(openapiClientHandle_t *client_handle, uint32_t *pIntIfNum, uint32_t *pPriority)
Gets next sequential user priority to traffic class mapping.
OPEN_QOS_COS_QUEUE_MGMT_TYPE_t
QOS COS queue management types.
Definition: openapi_cos.h:67
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiQosCosQueueIdIndexGetNext(openapiClientHandle_t *client_handle, uint32_t queueId, uint32_t *pNxtqueueId)
Gets next sequential specified queueId index.
open_error_t openapiQosCosMapGetIntfIndexForGlobalConfig(openapiClientHandle_t *client_handle, uint32_t *pIntIfNum)
Gets intIfNum to denotes global config operation.
open_error_t openapiQosCosMapIpDscpDefaultsRestore(openapiClientHandle_t *client_handle, uint32_t intIfNum)
Restore default ip DSCP mappings for given interface.
open_error_t openapiQosCosMapGlobalTrustModeSet(openapiClientHandle_t *client_handle, OPEN_QOS_COS_MAP_TRUST_MODE_t trustMode)
Sets the CoS global trust mode.
open_error_t openapiCosQueueIntfShapingRateSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t rate)
Set the COS egress shaping rate for an interface.
open_error_t openapiCosQueueWredStatsGet(openapiClientHandle_t *client_handle, uint32_t intfNum, uint64_t *dropCount, uint64_t *ecnMarked)
Get WRED drop and ECN marked counters for a given or all interfaces.
open_error_t openapiCosQueueIntfShapingPercentageIncrementGet(openapiClientHandle_t *client_handle, uint32_t *increment)
Get the minimum increment allowed when percentage of link speed is used to express rates...
open_error_t openapiQosCosMapGlobalTrustModeGet(openapiClientHandle_t *client_handle, OPEN_QOS_COS_MAP_TRUST_MODE_t *pTrustMode)
Gets CoS global trust mode.
open_error_t openapiQosCosQueueIdIndexGet(openapiClientHandle_t *client_handle, uint32_t queueId)
Gets specified queueId index status.
open_error_t openapiQosCosMapInterfaceTrustModeSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_QOS_COS_MAP_TRUST_MODE_t trustMode)
Sets the CoS interface trust mode.
open_error_t openapiQosCosDot1dTrafficClassSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t priority, uint32_t tc)
Sets dot1d traffic class.
open_error_t openapiQosCosQueueSchedulerTypeSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t queueId, OPEN_QOS_COS_QUEUE_SCHED_TYPE_t schTypeVal)
Sets scheduler type for a specific queue on a given interface.
open_error_t openapiQosCosMapTrustModeIntfIndexGetNext(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pNxtIntIfNum)
Gets next sequential specified trust mode interface.
trust pkt IP Precedence value
Definition: openapi_cos.h:55
open_error_t openapiCosQueueWredStatsClear(openapiClientHandle_t *client_handle, uint32_t intfNum)
Clear WRED and ECN counters for a given or all interfaces.
open_error_t openapiQosCosMapIpDscpDefaultTrafficClassGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t dscp, uint32_t *pTc)
Gets the default traffic class mapping for specified ip DSCP value.
open_error_t openapiQosCosQueueIntfIndexGet(openapiClientHandle_t *client_handle, uint32_t intIfNum)
Gets specified queue config interface index status.
open_error_t openapiQosCosDot1dTrafficClassGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t priority, uint32_t *pTc)
Gets dot1d traffic class information.
open_error_t openapiQosCosQueueIntfIsValid(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_BOOL_t *pIsQueueIntfValid)
Gets if the specified interface is valid for COS queue config.
open_error_t openapiQosCosMapInterfaceTrustModeGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_QOS_COS_MAP_TRUST_MODE_t *pTrustMode)
Gets CoS internal trust mode.
OPEN_QOS_COS_QUEUE_SCHED_TYPE_t
QOS COS queue scheduler types.
Definition: openapi_cos.h:60