Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_cos.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 **********************************************************************
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 
45 /*****************************************************************/
64 
65 /*****************************************************************/
87 
88 /*****************************************************************/
106 open_error_t openapiCosQueueIntfShapingRateGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *rate);
107 
108 /*****************************************************************/
126 open_error_t openapiCosQueueIntfShapingRateSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t rate);
127 
128 /*****************************************************************/
152 open_error_t openapiCosQueueWredDropParamsSet(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum,
153  uint8_t dropPrecedence, uint8_t ecnEnabled, int16_t wredMinThreshold,
154  int16_t wredMaxThreshold, int16_t wredDropProbability);
155 
156 /*****************************************************************/
174 open_error_t openapiCosQueueWredDropParamsReset(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum);
175 
176 /*****************************************************************/
195 open_error_t openapiCosQueueWredStatsGet(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum,
196  uint64_t *dropCount, uint64_t *ecnMarked);
197 
198 /*****************************************************************/
215 open_error_t openapiCosQueueWredStatsClear(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum);
216 
217 /*****************************************************************/
235  uint32_t intfNum, uint8_t queueNum,
236  uint8_t enableWred);
237 
238 #endif /* OPENAPI_COS_H_INCLUDED */
239 
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 openapiCosQueueWredSet(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum, uint8_t enableWred)
Enable or disable WRED for a given queue and for a given or all interfaces.
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 openapiCosQueueWredStatsClear(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum)
Clear WRED and ECN counters for a given queue and for a given or all interfaces.
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 openapiCosQueueWredStatsGet(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum, uint64_t *dropCount, uint64_t *ecnMarked)
Get WRED drop and ECN marked counters for a given queue and for a given or all interfaces.
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 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 openapiCosQueueWredDropParamsSet(openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum, uint8_t dropPrecedence, uint8_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.