2 * Copyright (C) 2013 Realtek Semiconductor Corp.
5 * Unless you and Realtek execute a separate written software license
6 * agreement governing use of this software, this software is licensed
7 * to you under the terms of the GNU General Public License version 2,
8 * available at https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
11 * $Date: 2017-03-08 15:13:58 +0800 (¶g¤T, 08 ¤T¤ë 2017) $
13 * Purpose : RTL8367C switch high-level API for RTL8367C
14 * Feature : Qos related functions
18 #ifndef _RTL8367C_ASICDRV_QOS_H_
19 #define _RTL8367C_ASICDRV_QOS_H_
21 #include <rtl8367c_asicdrv.h>
23 #define RTL8367C_DECISIONPRIMAX 0xFF
25 /* enum Priority Selection Types */
39 /* enum Priority Selection Index */
40 enum RTL8367C_PRIDEC_TABLE
47 enum RTL8367C_DOT1P_PRISEL
49 DOT1P_PRISEL_USER
= 0,
54 enum RTL8367C_DSCP_PRISEL
56 DSCP_PRISEL_INTERNAL
= 0,
63 extern ret_t
rtl8367c_setAsicRemarkingDot1pAbility(rtk_uint32 port
, rtk_uint32 enabled
);
64 extern ret_t
rtl8367c_getAsicRemarkingDot1pAbility(rtk_uint32 port
, rtk_uint32
* pEnabled
);
65 extern ret_t
rtl8367c_setAsicRemarkingDot1pParameter(rtk_uint32 priority
, rtk_uint32 newPriority
);
66 extern ret_t
rtl8367c_getAsicRemarkingDot1pParameter(rtk_uint32 priority
, rtk_uint32
*pNewPriority
);
67 extern ret_t
rtl8367c_setAsicRemarkingDot1pSrc(rtk_uint32 type
);
68 extern ret_t
rtl8367c_getAsicRemarkingDot1pSrc(rtk_uint32
*pType
);
69 extern ret_t
rtl8367c_setAsicRemarkingDscpAbility(rtk_uint32 enabled
);
70 extern ret_t
rtl8367c_getAsicRemarkingDscpAbility(rtk_uint32
* pEnabled
);
71 extern ret_t
rtl8367c_setAsicRemarkingDscpParameter(rtk_uint32 priority
, rtk_uint32 newDscp
);
72 extern ret_t
rtl8367c_getAsicRemarkingDscpParameter(rtk_uint32 priority
, rtk_uint32
* pNewDscp
);
74 extern ret_t
rtl8367c_setAsicPriorityDot1qRemapping(rtk_uint32 srcpriority
, rtk_uint32 priority
);
75 extern ret_t
rtl8367c_getAsicPriorityDot1qRemapping(rtk_uint32 srcpriority
, rtk_uint32
*pPriority
);
76 extern ret_t
rtl8367c_setAsicPriorityDscpBased(rtk_uint32 dscp
, rtk_uint32 priority
);
77 extern ret_t
rtl8367c_getAsicPriorityDscpBased(rtk_uint32 dscp
, rtk_uint32
*pPriority
);
78 extern ret_t
rtl8367c_setAsicPriorityPortBased(rtk_uint32 port
, rtk_uint32 priority
);
79 extern ret_t
rtl8367c_getAsicPriorityPortBased(rtk_uint32 port
, rtk_uint32
*pPriority
);
80 extern ret_t
rtl8367c_setAsicPriorityDecision(rtk_uint32 index
, rtk_uint32 prisrc
, rtk_uint32 decisionPri
);
81 extern ret_t
rtl8367c_getAsicPriorityDecision(rtk_uint32 index
, rtk_uint32 prisrc
, rtk_uint32
* pDecisionPri
);
82 extern ret_t
rtl8367c_setAsicPriorityToQIDMappingTable(rtk_uint32 qnum
, rtk_uint32 priority
, rtk_uint32 qid
);
83 extern ret_t
rtl8367c_getAsicPriorityToQIDMappingTable(rtk_uint32 qnum
, rtk_uint32 priority
, rtk_uint32
* pQid
);
84 extern ret_t
rtl8367c_setAsicOutputQueueMappingIndex(rtk_uint32 port
, rtk_uint32 qnum
);
85 extern ret_t
rtl8367c_getAsicOutputQueueMappingIndex(rtk_uint32 port
, rtk_uint32
*pQnum
);
87 extern ret_t
rtl8367c_setAsicRemarkingDscpSrc(rtk_uint32 type
);
88 extern ret_t
rtl8367c_getAsicRemarkingDscpSrc(rtk_uint32
*pType
);
89 extern ret_t
rtl8367c_setAsicRemarkingDscp2Dscp(rtk_uint32 dscp
, rtk_uint32 rmkDscp
);
90 extern ret_t
rtl8367c_getAsicRemarkingDscp2Dscp(rtk_uint32 dscp
, rtk_uint32
*pRmkDscp
);
92 extern ret_t
rtl8367c_setAsicPortPriorityDecisionIndex(rtk_uint32 port
, rtk_uint32 index
);
93 extern ret_t
rtl8367c_getAsicPortPriorityDecisionIndex(rtk_uint32 port
, rtk_uint32
*pIndex
);
95 #endif /*#ifndef _RTL8367C_ASICDRV_QOS_H_*/