/* * Copyright (C) 2012 Realtek Semiconductor Corp. * All Rights Reserved. * * This program is the proprietary software of Realtek Semiconductor * Corporation and/or its licensors, and only be used, duplicated, * modified or distributed under the authorized license from Realtek. * * ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER * THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. * * $Revision: 42383 $ * $Date: 2013-08-28 14:10:44 +0800 (Wed, 28 Aug 2013) $ * * Purpose : Definition of QoS API * * Feature : The file includes the following modules and sub-modules * (1) Ingress Priority Decision * (2) Egress Remarking * (3) Queue Scheduling * (4) Congestion avoidance */ #ifndef __RTK_QOS_H__ #define __RTK_QOS_H__ /* * Include Files */ #include #include /* * Symbol Definition */ /* * Data Declaration */ /* Types of queue scheduling algorithm */ typedef enum rtk_qos_scheduling_type_e { RTK_QOS_WFQ = 0, /* Weighted-Fair-Queue */ RTK_QOS_WRR, /* Weighted-Round-Robin */ SCHEDULING_TYPE_END } rtk_qos_scheduling_type_t; /* Types of priority queue */ typedef enum rtk_qos_queue_type_e { WFQ_WRR_PRIORITY = 0, /* WFQ/WRR */ STRICT_PRIORITY, /* Strict Priority */ QUEUE_TYPE_END } rtk_qos_queue_type_t; /* Priority to queue mapping structure */ typedef struct rtk_qos_pri2queue_s { uint32 pri2queue[RTK_MAX_NUM_OF_PRIORITY]; } rtk_qos_pri2queue_t; /* Queue weights structure */ typedef struct rtk_qos_queue_weights_s { uint32 weights[RTK_MAX_NUM_OF_QUEUE]; } rtk_qos_queue_weights_t; /* Weight of each priority source */ typedef struct rtk_qos_priSelWeight_s { uint32 weight_of_portBased; uint32 weight_of_dot1q; uint32 weight_of_dscp; uint32 weight_of_acl; uint32 weight_of_lutFwd; uint32 weight_of_saBaed; uint32 weight_of_vlanBased; uint32 weight_of_svlanBased; uint32 weight_of_l4Based; } rtk_qos_priSelWeight_t; /* Types of DSCP remarking source */ typedef enum rtk_qos_dscpRmkSrc_e { DSCP_RMK_SRC_INT_PRI, DSCP_RMK_SRC_DSCP, DSCP_RMK_SRC_USER_PRI, DSCP_RMK_SRC_END } rtk_qos_dscpRmkSrc_t; /* Types of dot1p remarking source */ typedef enum rtk_qos_do1pRmkSrc_e { DOT1P_RMK_SRC_USER_PRI, DOT1P_RMK_ORI_CTAG_PRI, DOT1P_RMK_SRC_END } rtk_qos_do1pRmkSrc_t; /* * Function Declaration */ /* Function Name: * rtk_qos_init * Description: * Configure QoS initial settings * Input: * None. * Output: * None. * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_QUEUE_NUM - Invalid queue number * Note: * * The initialization does the following actions: * - set input bandwidth control parameters to default values * - set priority decision parameters * - set scheduling parameters * - disable port remark ability * - CPU port init 8 using prioroty to queue mapping index 0 * - Other port init 1 queue using prioroty to queue mapping index 1 */ extern int32 rtk_qos_init(void); /* Function Name: * rtk_qos_priSelGroup_get * Description: * Get weight of each priority assignment on specified priority selection group. * Input: * grpIdx - index of priority selection group * Output: * pWeightOfPriSel - pointer to weight of each priority assignment * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_INPUT - invalid input parameter * RT_ERR_NULL_POINTER - input parameter may be null pointer * Note: * Apollo only support group 0 */ extern int32 rtk_qos_priSelGroup_get(uint32 grpIdx, rtk_qos_priSelWeight_t *pWeightOfPriSel); /* Function Name: * rtk_qos_priSelGroup_set * Description: * Set weight of each priority assignment on specified priority selection group. * Input: * grpIdx - index of priority selection group * pWeightOfPriSel - weight of each priority assignment * Output: * None * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_INPUT - invalid input parameter * RT_ERR_NULL_POINTER - input parameter may be null pointer * Note: * Apollo only support group 0 */ extern int32 rtk_qos_priSelGroup_set(uint32 grpIdx, rtk_qos_priSelWeight_t *pWeightOfPriSel); /* Function Name: * rtk_qos_portPri_get * Description: * Get internal priority of one port. * Input: * port - port id * Output: * pIntPri - Priorities assigment for specific port. (range from 0 ~ 7, 7 is * the highest prioirty) * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_PORT_ID - Invalid port id * RT_ERR_NULL_POINTER - NULL pointer * Note: * None */ extern int32 rtk_qos_portPri_get(rtk_port_t port, rtk_pri_t *pIntPri); /* Function Name: * rtk_qos_portPri_set * Description: * Get internal priority of one port. * Input: * port - port id * intPri - Priorities assigment for specific port. (range from 0 ~ 7, 7 is * the highest prioirty) * Output: * None * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_PORT_ID - Invalid port id * RT_ERR_NULL_POINTER - NULL pointer * Note: * None */ extern int32 rtk_qos_portPri_set(rtk_port_t port, rtk_pri_t intPri); /* Function Name: * rtk_qos_dscpPriRemapGroup_get * Description: * Get remapped internal priority of DSCP on specified DSCP remapping group. * Input: * grpIdx - index of dscp remapping group * dscp - DSCP * Output: * pIntPri - pointer to internal priority * pDp - pointer to drop precedence * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_QOS_DSCP_VALUE - invalid DSCP value * RT_ERR_NULL_POINTER - input parameter may be null pointer * RT_ERR_INPUT - invalid input parameter * Note: * Apollo only support group 0 */ extern int32 rtk_qos_dscpPriRemapGroup_get( uint32 grpIdx, uint32 dscp, rtk_pri_t *pIntPri, uint32 *pDp); /* Function Name: * rtk_qos_dscpPriRemapGroup_set * Description: * Set remapped internal priority of DSCP on specified DSCP remapping group. * Input: * grpIdx - index of dscp remapping group * dscp - DSCP * intPri - internal priority * dp - drop precedence * Output: * None * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_QOS_DSCP_VALUE - invalid DSCP value * RT_ERR_QOS_INT_PRIORITY - invalid internal priority * RT_ERR_DROP_PRECEDENCE - invalid drop precedence * RT_ERR_INPUT - invalid input parameter * Note: * Apollo only support group 0 */ extern int32 rtk_qos_dscpPriRemapGroup_set( uint32 grpIdx, uint32 dscp, rtk_pri_t intPri, uint32 dp); /* Function Name: * rtk_qos_1pPriRemapGroup_get * Description: * Get remapped internal priority of dot1p priority on specified dot1p priority remapping group. * Input: * grpIdx - index of outer dot1p remapping group * dot1pPri - dot1p priority * Output: * pIntPri - pointer to internal priority * pDp - pointer to drop precedence * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_QOS_1P_PRIORITY - invalid dot1p priority * RT_ERR_NULL_POINTER - input parameter may be null pointer * RT_ERR_INPUT - invalid input parameter * Note: * Apollo only support group 0 */ extern int32 rtk_qos_1pPriRemapGroup_get( uint32 grpIdx, rtk_pri_t dot1pPri, rtk_pri_t *pIntPri, uint32 *pDp); /* Function Name: * rtk_qos_1pPriRemapGroup_set * Description: * Set remapped internal priority of dot1p priority on specified dot1p priority remapping group. * Input: * grpIdx - index of dot1p remapping group * dot1pPri - dot1p priority * intPri - internal priority * dp - drop precedence * Output: * None * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_QOS_1P_PRIORITY - invalid dot1p priority * RT_ERR_QOS_INT_PRIORITY - invalid internal priority * RT_ERR_DROP_PRECEDENCE - invalid drop precedence * RT_ERR_INPUT - invalid input parameter * Note: * None */ extern int32 rtk_qos_1pPriRemapGroup_set( uint32 grpIdx, rtk_pri_t dot1pPri, rtk_pri_t intPri, uint32 dp); /* Function Name: * rtk_qos_priMap_set * Description: * Set the entry of internal priority to QID mapping table. * Input: * group - the group of priority to Queue id map(0~3). * pPri2qid - array of internal priority on a queue * Output: * None. * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_ENTRY_INDEX - Invalid group index * RT_ERR_NULL_POINTER - input parameter may be null pointer * Note: * Below is an example of internal priority to QID mapping table. * - * - Priority * - group 0 1 2 3 4 5 6 7 * - ================================ * - 0 0 1 2 3 4 5 6 7 * - 1 0 0 0 0 0 0 0 0 * - 2 0 0 0 0 6 6 6 6 * - 3 0 0 0 1 1 2 2 3 * -for table index 0 * - pPri2qid[0] = 0 internal priority 0 map to queue 0 * - pPri2qid[1] = 1 internal priority 1 map to queue 1 * - pPri2qid[2] = 2 internal priority 2 map to queue 2 * - pPri2qid[3] = 3 internal priority 3 map to queue 3 * - pPri2qid[4] = 4 internal priority 4 map to queue 4 * - pPri2qid[5] = 5 internal priority 5 map to queue 5 * - pPri2qid[6] = 6 internal priority 6 map to queue 6 * - pPri2qid[7] = 7 internal priority 7 map to queue 7 */ extern int32 rtk_qos_priMap_set(uint32 group, rtk_qos_pri2queue_t *pPri2qid); /* * Function Declaration */ /* Function Name: * rtk_qos_priMap_get * Description: * Get the entry of internal priority to QID mapping table. * Input: * group - the group of priority to Queue id map(0~3). * pPri2qid - array of internal priority on a queue * Output: * None. * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_ENTRY_INDEX - Invalid group index * RT_ERR_NULL_POINTER - input parameter may be null pointer * Note: * None */ extern int32 rtk_qos_priMap_get(uint32 group, rtk_qos_pri2queue_t *pPri2qid); /* Function Name: * rtk_qos_portPriMap_get * Description: * Get the value of internal priority to QID mapping table on specified port. * Input: * port - port id * Output: * pGroup - Priority to queue mapping group * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_PORT_ID - invalid port id * RT_ERR_NULL_POINTER - input parameter may be null pointer * Note: * None */ extern int32 rtk_qos_portPriMap_get(rtk_port_t port, uint32 *pGroup); /* Function Name: * rtk_qos_portPriMap_set * Description: * Set the value of internal priority to QID mapping table on specified port. * Input: * port - port id * index - index to priority to queue table * Output: * None. * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_PORT_ID - invalid port id * Note: * None */ extern int32 rtk_qos_portPriMap_set(rtk_port_t port, uint32 group); /* Module Name : QoS */ /* Sub-module Name: Egress remark */ /* Function Name: * rtk_qos_1pRemarkEnable_get * Description: * Get 802.1p remark status for a port * Input: * port - port id * Output: * pEnable - status of 802.1p remark * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_PORT_ID - Invalid port id * RT_ERR_NULL_POINTER - NULL pointer * Note: * The status of 802.1p remark: * - DISABLED * - ENABLED */ extern int32 rtk_qos_1pRemarkEnable_get(rtk_port_t port, rtk_enable_t *pEnable); /* Function Name: * rtk_qos_1pRemarkEnable_set * Description: * Set 802.1p remark status for a port * Input: * port - port id. * enable - status of 802.1p remark * Output: * None. * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_PORT_ID - Invalid port id * Note: * The status of 802.1p remark: * - DISABLED * - ENABLED */ extern int32 rtk_qos_1pRemarkEnable_set(rtk_port_t port, rtk_enable_t enable); /* Function Name: * rtk_qos_1pRemarkGroup_get * Description: * Get remarked dot1p priority of internal priority on specified dot1p remark group. * Input: * grpIdx - index of dot1p remark group * intPri - internal priority * dp - drop precedence * Output: * pDot1pPri - pointer to dot1p priority * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_QOS_INT_PRIORITY - invalid internal priority * RT_ERR_DROP_PRECEDENCE - invalid drop precedence * RT_ERR_INPUT - invalid input parameter * RT_ERR_NULL_POINTER - input parameter may be null pointer * Note: * None */ extern int32 rtk_qos_1pRemarkGroup_get( uint32 grpIdx, rtk_pri_t intPri, uint32 dp, rtk_pri_t *pDot1pPri); /* Function Name: * rtk_qos_1pRemarkGroup_set * Description: * Set remarked dot1p priority of internal priority on specified dot1p remark group. * Input: * grpIdx - index of dot1p remark group * intPri - internal priority * dp - drop precedence * dot1pPri - dot1p priority * Output: * None * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_QOS_1P_PRIORITY - invalid dot1p priority * RT_ERR_QOS_INT_PRIORITY - invalid internal priority * RT_ERR_DROP_PRECEDENCE - invalid drop precedence * RT_ERR_INPUT - invalid input parameter * Note: * None */ extern int32 rtk_qos_1pRemarkGroup_set( uint32 grpIdx, rtk_pri_t intPri, uint32 dp, rtk_pri_t dot1pPri); /* Function Name: * rtk_qos_dscpRemarkEnable_get * Description: * Get DSCP remark status for a port * Input: * port - port id * Output: * pEnable - status of DSCP remark * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_PORT_ID - Invalid port id * RT_ERR_NULL_POINTER - NULL pointer * Note: * The status of DSCP remark: * - DISABLED * - ENABLED */ extern int32 rtk_qos_dscpRemarkEnable_get(rtk_port_t port, rtk_enable_t *pEnable); /* Function Name: * rtk_qos_dscpRemarkEnable_set * Description: * Set DSCP remark status for a port * Input: * port - port id * enable - status of DSCP remark * Output: * None. * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_PORT_ID - Invalid port id * Note: * The status of DSCP remark: * - DISABLED * - ENABLED */ extern int32 rtk_qos_dscpRemarkEnable_set(rtk_port_t port, rtk_enable_t enable); /* Function Name: * rtk_qos_dscpRemarkGroup_get * Description: * Get remarked DSCP of internal priority on specified dscp remark group. * Input: * grpIdx - index of dot1p remapping group * intPri - internal priority * dp - drop precedence * Output: * pDscp - pointer to DSCP * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_QOS_INT_PRIORITY - invalid internal priority * RT_ERR_DROP_PRECEDENCE - invalid drop precedence * RT_ERR_INPUT - invalid input parameter * RT_ERR_NULL_POINTER - input parameter may be null pointer * Note: * (1) The valid range of grp_idx is 0 for apollo */ extern int32 rtk_qos_dscpRemarkGroup_get( uint32 grpIdx, rtk_pri_t intPri, uint32 dp, uint32 *pDscp); /* Function Name: * rtk_qos_dscpRemarkGroup_set * Description: * Set remarked DSCP of internal priority on specified dscp remark group. * Input: * grpIdx - index of dot1p remarking group * intPri - internal priority value (range from 0 ~ 7) * dp - drop precedence * dscp - DSCP * Output: * None * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_QOS_DSCP_VALUE - invalid DSCP value * RT_ERR_QOS_INT_PRIORITY - invalid internal priority * RT_ERR_DROP_PRECEDENCE - invalid drop precedence * RT_ERR_INPUT - invalid input parameter * Note: * (1) The valid range of grp_idx is 0 for apollo * (2) dp(drop precedence) is not implement in Apollo */ extern int32 rtk_qos_dscpRemarkGroup_set( uint32 grpIdx, rtk_pri_t intPri, uint32 dp, uint32 dscp); /* Function Name: * rtk_qos_portDscpRemarkSrcSel_get * Description: * Get remarking source of DSCP remarking. * Input: * port - port id * Output: * pType - remarking source * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_PORT_ID - invalid port id * RT_ERR_INPUT - invalid input parameter * RT_ERR_NULL_POINTER - input parameter may be null pointer * Note: * None */ extern int32 rtk_qos_portDscpRemarkSrcSel_get(rtk_port_t port, rtk_qos_dscpRmkSrc_t *pType); /* Function Name: * rtk_qos_portDscpRemarkSrcSel_set * Description: * Set remarking source of DSCP remarking. * Input: * port - port id * type - remarking source * Output: * None * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_PORT_ID - invalid port id * RT_ERR_INPUT - invalid input parameter * Note: * The API can configure DSCP remark functionality to map original DSCP value or internal * priority to TX DSCP value. */ extern int32 rtk_qos_portDscpRemarkSrcSel_set(rtk_port_t port, rtk_qos_dscpRmkSrc_t type); /* Function Name: * rtk_qos_dscp2DscpRemarkGroup_get * Description: * Get DSCP to remarked DSCP mapping. * Input: * dscp - DSCP value * grpIdx - group index * Output: * pDscp - remarked DSCP value * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_QOS_DSCP_VALUE - Invalid dscp value * RT_ERR_NULL_POINTER - NULL pointer * Note: * None. */ extern int32 rtk_qos_dscp2DscpRemarkGroup_get(uint32 grpIdx, uint32 dscp, uint32 *pDscp); /* Function Name: * rtk_qos_dscp2DscpRemarkGroup_set * Description: * Set DSCP to remarked DSCP mapping. * Input: * grpIdx - group index * dscp - DSCP value * rmkDscp - remarked DSCP value * Output: * None. * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_QOS_DSCP_VALUE - Invalid dscp value * Note: * dscp parameter can be DSCP value or internal priority according to configuration of API * dal_apollo_qos_dscpRemarkSrcSel_set(), because DSCP remark functionality can map original DSCP * value or internal priority to TX DSCP value. */ extern int32 rtk_qos_dscp2DscpRemarkGroup_set(uint32 grpIdx,uint32 dscp, uint32 rmkDscp); /* Function Name: * rtk_qos_fwd2CpuPriRemap_get * Description: * Get forward to CPU port remapped priority for internal priority. * Input: * intPri - internal priority * Output: * pRempPri - pointer to remapping priority * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_NULL_POINTER - input parameter may be null pointer * RT_ERR_QOS_INT_PRIORITY - invalid internal priority * RT_ERR_INPUT - invalid input parameter * Note: */ extern int32 rtk_qos_fwd2CpuPriRemap_get( rtk_pri_t intPri, rtk_pri_t *pRempPri); /* Function Name: * rtk_qos_fwd2CpuPriRemap_set * Description: * Set remapped internal priority of DSCP on specified DSCP remapping group. * Input: * intPri - internal priority * rempPri - remapping priority * Output: * None * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_QOS_INT_PRIORITY - invalid internal priority * RT_ERR_INPUT - invalid input parameter * Note: */ extern int32 rtk_qos_fwd2CpuPriRemap_set( rtk_pri_t intPri, rtk_pri_t rempPri); /* Module Name : QoS */ /* Sub-module Name: Queue scheduling */ /* Function Name: * rtk_qos_schedulingQueue_get * Description: * Get the scheduling types and weights of queues on specific port in egress scheduling. * Input: * port - port id * Output: * pQweights - the array of weights for WRR/WFQ queue (valid:1~128, 0 for STRICT_PRIORITY queue) * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_PORT_ID - Invalid port id * RT_ERR_NULL_POINTER - NULL pointer * Note: * The types of queue are: WFQ_WRR_PRIORITY or STRICT_PRIORITY. * If the weight is 0 then the type is STRICT_PRIORITY, else the type is WFQ_WRR_PRIORITY. */ extern int32 rtk_qos_schedulingQueue_get(rtk_port_t port, rtk_qos_queue_weights_t *pQweights); /* Function Name: * rtk_qos_schedulingQueue_set * Description: * Set the scheduling types and weights of queues on specific port in egress scheduling. * Input: * port - port id * pQweights - the array of weights for WRR/WFQ queue (valid:1~128, 0 for STRICT_PRIORITY queue) * Output: * None. * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_PORT_ID - Invalid port id * RT_ERR_QOS_QUEUE_WEIGHT - Invalid queue weight * Note: * The types of queue are: WFQ_WRR_PRIORITY or STRICT_PRIORITY. * If the weight is 0 then the type is STRICT_PRIORITY, else the type is WFQ_WRR_PRIORITY. */ extern int32 rtk_qos_schedulingQueue_set(rtk_port_t port, rtk_qos_queue_weights_t *pQweights); /* Function Name: * rtk_qos_portPriSelGroup_get * Description: * Get priority selection group for specified port. * Input: * port - port id * Output: * pPriSelGrpIdx - pointer to index of priority selection group * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_PORT_ID - invalid port id * RT_ERR_NULL_POINTER - input parameter may be null pointer * Note: */ extern int32 rtk_qos_portPriSelGroup_get(rtk_port_t port, uint32 *pPriSelGrpIdx); /* Function Name: * rtk_qos_portPriSelGroup_set * Description: * Set priority selection group for specified port. * Input: * port - port id * priSelGrpIdx - index of priority selection group * Output: * None * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_PORT_ID - invalid port id * RT_ERR_INPUT - invalid input parameter * Note: */ extern int32 rtk_qos_portPriSelGroup_set(rtk_port_t port, uint32 priSelGrpIdx); /* Function Name: * rtk_qos_schedulingType_get * Description: * Get the scheduling types and weights of queues on specific port in egress scheduling. * Input: * None * Output: * pQueueType - the WFQ schedule type (RTK_QOS_WFQ or RTK_QOS_WRR) * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NULL_POINTER - NULL pointer * Note: */ extern int32 rtk_qos_schedulingType_get(rtk_qos_scheduling_type_t *pQueueType); /* Function Name: * rtk_qos_schedulingType_set * Description: * Set the scheduling type. * Input: * queueType - the WFQ schedule type (RTK_QOS_WFQ or RTK_QOS_WRR) * Output: * None. * Return: * RT_ERR_OK * RT_ERR_FAILED * Note: */ extern int32 rtk_qos_schedulingType_set(rtk_qos_scheduling_type_t queueType); /* Function Name: * rtk_qos_portDot1pRemarkSrcSel_get * Description: * Get remarking source of dot1p remarking. * Input: * port - port id * Output: * pType - remarking source * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_PORT_ID - invalid port id * RT_ERR_INPUT - invalid input parameter * RT_ERR_NULL_POINTER - input parameter may be null pointer * Note: * None */ extern int32 rtk_qos_portDot1pRemarkSrcSel_get(rtk_port_t port, rtk_qos_do1pRmkSrc_t *pType); /* Function Name: * rtk_qos_portDot1pRemarkSrcSel_set * Description: * Set remarking source of dot1p remarking. * Input: * port - port id * type - remarking source * Output: * None * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NOT_INIT - The module is not initial * RT_ERR_PORT_ID - invalid port id * RT_ERR_INPUT - invalid input parameter * Note: * The API can configure dot1p remark source. */ extern int32 rtk_qos_portDot1pRemarkSrcSel_set(rtk_port_t port, rtk_qos_do1pRmkSrc_t type); #endif /* __RTK_QOS_H__ */