kernel: add missing config symbols for 5.15
[openwrt/openwrt.git] / target / linux / mediatek / files-5.10 / drivers / net / phy / rtk / rtl8367c / include / rtl8367c_asicdrv_scheduling.h
1 /*
2 * Copyright (C) 2013 Realtek Semiconductor Corp.
3 * All Rights Reserved.
4 *
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
9 *
10 * $Revision: 76306 $
11 * $Date: 2017-03-08 15:13:58 +0800 (¶g¤T, 08 ¤T¤ë 2017) $
12 *
13 * Purpose : RTL8367C switch high-level API for RTL8367C
14 * Feature : Packet Scheduling related functions
15 *
16 */
17
18 #ifndef _RTL8367C_ASICDRV_SCHEDULING_H_
19 #define _RTL8367C_ASICDRV_SCHEDULING_H_
20
21 #include <rtl8367c_asicdrv.h>
22
23 #define RTL8367C_QWEIGHTMAX 0x7F
24 #define RTL8367C_PORT_QUEUE_METER_INDEX_MAX 7
25
26 /* enum for queue type */
27 enum QUEUETYPE
28 {
29 QTYPE_STRICT = 0,
30 QTYPE_WFQ,
31 };
32 extern ret_t rtl8367c_setAsicLeakyBucketParameter(rtk_uint32 tick, rtk_uint32 token);
33 extern ret_t rtl8367c_getAsicLeakyBucketParameter(rtk_uint32 *tick, rtk_uint32 *token);
34 extern ret_t rtl8367c_setAsicAprMeter(rtk_uint32 port, rtk_uint32 qid, rtk_uint32 apridx);
35 extern ret_t rtl8367c_getAsicAprMeter(rtk_uint32 port, rtk_uint32 qid, rtk_uint32 *apridx);
36 extern ret_t rtl8367c_setAsicPprMeter(rtk_uint32 port, rtk_uint32 qid, rtk_uint32 ppridx);
37 extern ret_t rtl8367c_getAsicPprMeter(rtk_uint32 port, rtk_uint32 qid, rtk_uint32 *ppridx);
38 extern ret_t rtl8367c_setAsicAprEnable(rtk_uint32 port, rtk_uint32 aprEnable);
39 extern ret_t rtl8367c_getAsicAprEnable(rtk_uint32 port, rtk_uint32 *aprEnable);
40 extern ret_t rtl8367c_setAsicPprEnable(rtk_uint32 port, rtk_uint32 pprEnable);
41 extern ret_t rtl8367c_getAsicPprEnable(rtk_uint32 port, rtk_uint32 *pprEnable);
42
43 extern ret_t rtl8367c_setAsicWFQWeight(rtk_uint32, rtk_uint32 queueid, rtk_uint32 weight );
44 extern ret_t rtl8367c_getAsicWFQWeight(rtk_uint32, rtk_uint32 queueid, rtk_uint32 *weight );
45 extern ret_t rtl8367c_setAsicWFQBurstSize(rtk_uint32 burstsize);
46 extern ret_t rtl8367c_getAsicWFQBurstSize(rtk_uint32 *burstsize);
47
48 extern ret_t rtl8367c_setAsicQueueType(rtk_uint32 port, rtk_uint32 qid, rtk_uint32 queueType);
49 extern ret_t rtl8367c_getAsicQueueType(rtk_uint32 port, rtk_uint32 qid, rtk_uint32 *queueType);
50 extern ret_t rtl8367c_setAsicQueueRate(rtk_uint32 port, rtk_uint32 qid, rtk_uint32 ppridx, rtk_uint32 apridx );
51 extern ret_t rtl8367c_getAsicQueueRate(rtk_uint32 port, rtk_uint32 qid, rtk_uint32* ppridx, rtk_uint32* apridx );
52 extern ret_t rtl8367c_setAsicPortEgressRate(rtk_uint32 port, rtk_uint32 rate);
53 extern ret_t rtl8367c_getAsicPortEgressRate(rtk_uint32 port, rtk_uint32 *rate);
54 extern ret_t rtl8367c_setAsicPortEgressRateIfg(rtk_uint32 ifg);
55 extern ret_t rtl8367c_getAsicPortEgressRateIfg(rtk_uint32 *ifg);
56
57 #endif /*_RTL8367C_ASICDRV_SCHEDULING_H_*/
58