Adding new commiter to ODU-High repo
[o-du/l2.git] / src / mt / ss_rbuf.h
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17 *******************************************************************************/
18
19 /********************************************************************20**
20   
21      Name:    Ring Buffer 
22   
23      Type:     C include file
24   
25      Desc:     This file implements the funcitons required to isolate
26                freeing of packer buffers from Main stack processing. This will be 
27                usefull in a hyper threaded environment where the freeing can be
28                done from low priority thread
29   
30      File:    ss_rbuf.h 
31   
32 *********************************************************************21*/
33 #ifndef __SS_RBUF_H__
34 #define __SS_RBUF_H__
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40
41 #define SS_RNG_TX                    1
42 #define SS_RNG_RX                    0
43 #ifdef XEON_SPECIFIC_CHANGES
44 #define SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT 80 /* Max Buffer Read from Ring Buffer from PDCP to RLC in DL Direction */
45 #define SS_RNG_MAX_ULMAC_TO_ULRLC_DQ_CNT  200
46 #define SS_RNG_ULRLC_TO_ULPDCP_SIZE      256
47 #define SS_RNG_ULPDCP_TO_ULDAM_SIZE      2048
48 #define SS_RNG_MAX_ULPDCP_TO_ULDAM_DAT_IND_DQ_CNT 512
49 #define SS_RNG_MAX_ULRLC_TO_ULPDCP_DAT_IND_DQ_CNT 10
50 #else   
51 #define SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT 40 /* Max Buffer Read from Ring Buffer from PDCP to RLC in DL Direction */
52 #define SS_RNG_MAX_ULMAC_TO_ULRLC_DQ_CNT  25
53 #endif   
54
55 /* ccpu00143253: Changing SS_RNG_DLPDCP_TO_DLRLC_SIZE from 128 to 512, 
56   * as the forwarded data packet drop observed during Handover */
57 #ifdef L2_L3_SPLIT
58 #define SS_RNG_DLPDCP_TO_DLRLC_SIZE     5120
59 #else
60 #define SS_RNG_DLPDCP_TO_DLRLC_SIZE     5120
61 #endif
62
63 /* Ring Size Defines, powers of 2 only  */
64 //#define SS_RNG_ICPU_TO_DLPDCP_SIZE      128
65 #define SS_RNG_ICPU_TO_DLPDCP_SIZE      512
66 #define SS_RNG_ICPU_TO_DLPDCP_NONPRIO_SIZE      20480
67 //#define SS_RNG_DLPDCP_TO_DLRLC_SIZE     1024
68 //#define SS_RNG_L2_RT_TO_FREE_MGR_SIZE   512 
69 //#define SS_RNG_L2_NRT_TO_FREE_MGR_SIZE  640
70 /* Increasing from 512 to 1024
71    Increasing from 1024 to 2048 to handle free after re-est */ 
72 #define SS_RNG_L2_RT_TO_FREE_MGR_SIZE   2048
73 #define SS_RNG_L2_NRT_TO_FREE_MGR_SIZE  2048 
74 #define SS_RNG_L2_DLRLC_TO_FREE_MGR_SIZE  2048 
75 #define SS_RNG_PRC_L1D_TO_CL_SIZE       32
76 #define SS_RNG_PRC_FREE_TO_CL_SIZE      256
77 #define SS_RNG_ICPU_TO_DAM_SIZE         1024
78 #define SS_RNG_PDCP_TO_CIPH_SIZE        2048
79 #define SS_RNG_CIPH_TO_PDCP_SIZE        1024
80 #ifdef XEON_SPECIFIC_CHANGES
81 #define SS_RNG_ULMAC_TO_ULRLC_SIZE      1024
82 #else   
83 #define SS_RNG_ULMAC_TO_ULRLC_SIZE      128
84 #endif   
85 #define SS_RNG_ICCRX_TO_DLRLC_SIZE      640
86 #define SS_RNG_DL_SMSG_REUSE_SIZE       384
87 #define SS_RNG_DLRLC_TO_DLMAC_SIZE      512
88 #define SS_RNG_BUF_MAC_HARQ_SIZE        256
89 #ifndef L2_L3_SPLIT
90 #ifdef XEON_SPECIFIC_CHANGES
91 #define SS_FREE_MGR_MAX_FREE            1024
92 #else   
93 #define SS_FREE_MGR_MAX_FREE            32
94 #endif   
95 #else
96 #define SS_FREE_MGR_MAX_FREE            96
97 #endif
98
99 #ifdef MAC_FREE_RING_BUF
100 #define SS_RNG_MAC_FREE_RING_SIZE      8096
101 #endif
102 #ifdef RLC_FREE_RING_BUF
103 #define SS_RNG_RLC_FREE_RING_SIZE      8096
104 #endif
105 #ifdef LC_EGTP_THREAD
106 #define SS_RNG_EGTP_FREE_RING_SIZE      1024
107 #endif
108 /* Ring Element Size Defines */
109 #define SS_RNG_BUF_ELEM           sizeof(SsRngBufElem)
110
111 /*Defines for Packet Prio */
112 #define SS_QCI_BASED_PRIO_UNUSED      0
113 #define SS_QCI_BASED_PRIO_HIGH        1
114 #define SS_QCI_BASED_PRIO_LOW         2
115 #define SS_QCI_BASED_PRIO_OTHER       3
116
117 #ifdef XEON_SPECIFIC_CHANGES
118 #define SS_RNG_MAC_TO_RLC_HARQ_IND_SIZE 512
119 #define SS_RNG_DLRLC_TO_DLMAC_STA_RSP_SIZE 2048
120 #define SS_RNG_DLRLC_TO_DLMAC_DAT_REQ_SIZE 256
121 #define SS_RNG_MAX_DLRLC_TO_DLMAC_STA_RSP_DQ_CNT 320
122 #define SS_RNG_MAX_DLRLC_TO_DLMAC_DAT_REQ_DQ_CNT 40
123 #define SS_RNG_MAX_DLMAC_TO_DLRLC_HARQ_STA_DQ_CNT 80  
124 #else   
125 #define SS_RNG_MAC_TO_RLC_HARQ_IND_SIZE 64
126 #define SS_RNG_DLRLC_TO_DLMAC_STA_RSP_SIZE 512
127 #define SS_RNG_DLRLC_TO_DLMAC_DAT_REQ_SIZE 64
128 #define SS_RNG_MAX_DLRLC_TO_DLMAC_STA_RSP_DQ_CNT 80
129 #define SS_RNG_MAX_DLRLC_TO_DLMAC_DAT_REQ_DQ_CNT 10
130 #define SS_RNG_MAX_DLMAC_TO_DLRLC_HARQ_STA_DQ_CNT 20 
131 #endif   
132 #ifdef __cplusplus
133 }
134 #endif
135
136 #endif
137 /**************************************************************************
138           End of file
139 **************************************************************************/
140