Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
openapi_cos.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2017-2023 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 /*****************************************************************/
67 
68 /*****************************************************************/
90 
91 /*****************************************************************/
109 open_error_t openapiCosQueueIntfShapingRateGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *rate);
110 
111 /*****************************************************************/
129 open_error_t openapiCosQueueIntfShapingRateSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t rate);
130 
131 /*****************************************************************/
159 open_error_t openapiCosQueueWredDropParamsSet(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum,
160  uint8_t dropPrecedence, OPEN_BOOL_t ecnEnabled, int16_t wredMinThreshold,
161  int16_t wredMaxThreshold, int16_t wredDropProbability);
162 
163 /*****************************************************************/
183 open_error_t openapiCosQueueWredDropParamsReset(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum);
184 
185 /*****************************************************************/
202 open_error_t openapiCosQueueWredStatsGet(openapiClientHandle_t *client_handle, uint32_t intfNum,
203  uint64_t *dropCount, uint64_t *ecnMarked);
204 
205 /*****************************************************************/
220 open_error_t openapiCosQueueWredStatsClear(openapiClientHandle_t *client_handle, uint32_t intfNum);
221 
222 /*****************************************************************/
244  uint32_t intfNum, uint8_t queueNum,
245  OPEN_BOOL_t enableWred);
246 
247 /*****************************************************************/
260  uint32_t *maxQueueId);
261 
262 #endif /* OPENAPI_COS_H_INCLUDED */
263 
open_error_t openapiCosQueueMaxIdGet(openapiClientHandle_t *client_handle, uint32_t *maxQueueId)
Get the max cos queue ID value.
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 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_RATE_UNIT_t
OpEN uses this enumeration to define rate units.
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 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.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
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 openapiCosQueueWredStatsClear(openapiClientHandle_t *client_handle, uint32_t intfNum)
Clear WRED and ECN counters for a given or all interfaces.