f1ba5e7ec350db496d04f5ed0cf23c6c27191b48
[o-du/phy.git] / fhi_lib / lib / api / xran_fh_o_du.h
1 /******************************************************************************\r
2 *\r
3 *   Copyright (c) 2019 Intel.\r
4 *\r
5 *   Licensed under the Apache License, Version 2.0 (the "License");\r
6 *   you may not use this file except in compliance with the License.\r
7 *   You may obtain a copy of the License at\r
8 *\r
9 *       http://www.apache.org/licenses/LICENSE-2.0\r
10 *\r
11 *   Unless required by applicable law or agreed to in writing, software\r
12 *   distributed under the License is distributed on an "AS IS" BASIS,\r
13 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14 *   See the License for the specific language governing permissions and\r
15 *   limitations under the License.\r
16 *\r
17 *******************************************************************************/\r
18 \r
19 /**\r
20  * @brief This file provides public interface to xRAN Front Haul layer implementation as defined in the\r
21  *      ORAN-WG4.CUS.0-v01.00 spec. Implementation specific to\r
22  *      Lower Layer Split Central Unit (O-DU): a logical node that includes the eNB/gNB functions as\r
23  *      listed in section 2.1 split option 7-2x, excepting those functions allocated exclusively to the O-RU.\r
24  *      The O-DU controls the operation of O-RUs for 5G NR Radio Access technology\r
25  *\r
26  * @file xran_fh_o_du.h\r
27  * @ingroup group_lte_source_xran\r
28  * @author Intel Corporation\r
29  *\r
30  **/\r
31 \r
32 #ifndef _XRAN_FH_O_DU_H_\r
33 #define _XRAN_FH_O_DU_H_\r
34 \r
35 #ifdef __cplusplus\r
36 extern "C" {\r
37 #endif\r
38 \r
39 #include <stdio.h>\r
40 #include <stdlib.h>\r
41 #include <string.h>\r
42 #include <stdint.h>\r
43 #include <inttypes.h>\r
44 #include <sys/types.h>\r
45 #include <sys/queue.h>\r
46 #include <netinet/in.h>\r
47 #include <setjmp.h>\r
48 #include <stdarg.h>\r
49 #include <ctype.h>\r
50 #include <errno.h>\r
51 #include <getopt.h>\r
52 #include <unistd.h>\r
53 \r
54 #define XRAN_STATUS_SUCCESS (0)\r
55 /**<\r
56  *  @ingroup xran\r
57  *   Success status value. */\r
58 #define XRAN_STATUS_FAIL (-1)\r
59 /**<\r
60  *  @ingroup xran\r
61  *   Fail status value. */\r
62 \r
63 #define XRAN_STATUS_RETRY (-2)\r
64 /**<\r
65  *  @ingroup xran\r
66  *  Retry status value. */\r
67 \r
68 #define XRAN_STATUS_RESOURCE (-3)\r
69 /**<\r
70  *  @ingroup xran\r
71  *  The resource that has been requested is unavailable. Refer\r
72  *  to relevant sections of the API for specifics on what the suggested\r
73  *  course of action is. */\r
74 \r
75 #define XRAN_STATUS_INVALID_PARAM (-4)\r
76 /**<\r
77  *  @ingroup xran\r
78  *  Invalid parameter has been passed in. */\r
79 #define XRAN_STATUS_FATAL (-5)\r
80 /**<\r
81  *  @ingroup xran\r
82  *  A serious error has occurred. Recommended course of action\r
83  *  is to shutdown and restart the component. */\r
84 \r
85 #define XRAN_STATUS_UNSUPPORTED (-6)\r
86 /**<\r
87  *  @ingroup xran\r
88  *  The function is not supported, at least not with the specific\r
89  *  parameters supplied.  This may be because a particular\r
90  *  capability is not supported by the current implementation. */\r
91 \r
92 #define XRAN_STATUS_INVALID_PACKET (-7)\r
93 /**<\r
94  *  @ingroup xran\r
95  *  Recevied packet does not have correct format. */\r
96 \r
97 /** Macro to calculate TTI number from symbol index used by timing thread */\r
98 #define XranGetTtiNum(symIdx, numSymPerTti) (((uint32_t)symIdx / (uint32_t)numSymPerTti))\r
99 /** Macro to calculate Symbol number for given slot from symbol index  */\r
100 #define XranGetSymNum(symIdx, numSymPerTti) (((uint32_t)symIdx % (uint32_t)numSymPerTti))\r
101 /** Macro to calculate Frame number for given tti */\r
102 #define XranGetFrameNum(tti,SFNatSecStart,numSubFramePerSystemFrame, numSlotPerSubFrame)  ((((uint32_t)tti / ((uint32_t)numSubFramePerSystemFrame * (uint32_t)numSlotPerSubFrame)) + SFNatSecStart) & 0x3FF)\r
103 /** Macro to calculate Subframe number for given tti */\r
104 #define XranGetSubFrameNum(tti, numSlotPerSubFrame, numSubFramePerSystemFrame) (((uint32_t)tti/(uint32_t)numSlotPerSubFrame) % (uint32_t)numSubFramePerSystemFrame)\r
105 /** Macro to calculate Slot number */\r
106 #define XranGetSlotNum(tti, numSlotPerSfn) ((uint32_t)tti % ((uint32_t)numSlotPerSfn))\r
107 \r
108 #define XRAN_PORTS_NUM               (1)    /**< number of XRAN ports (aka O-RU devices) supported */\r
109 #define XRAN_N_FE_BUF_LEN            (40)   /**< Number of TTIs (slots) */\r
110 #define XRAN_MAX_SECTOR_NR           (12)   /**< Max sectors per XRAN port */\r
111 #define XRAN_MAX_ANTENNA_NR          (16)    /**< Max number of extended Antenna-Carriers:\r
112                                                 a data flow for a single antenna (or spatial stream) for a single carrier in a single sector */\r
113 \r
114 /* see 10.2     Hierarchy of Radiation Structure in O-RU (assume TX and RX pannel are the same dimensions)*/\r
115 #define XRAN_MAX_PANEL_NR            (1)   /**< Max number of Panels supported per O-RU */\r
116 #define XRAN_MAX_TRX_ANTENNA_ARRAY   (1)   /**< Max number of TX and RX arrays per panel in O-RU */\r
117 #define XRAN_MAX_ANT_ARRAY_ELM_NR    (64)  /**< Maximum number of Antenna Array Elemets in Antenna Array in the O-RU */\r
118 \r
119 \r
120 \r
121 #define XRAN_NUM_OF_SYMBOL_PER_SLOT  (14) /**< Number of symbols per slot */\r
122 #define XRAN_MAX_NUM_OF_SRS_SYMBOL_PER_SLOT  XRAN_NUM_OF_SYMBOL_PER_SLOT /**< Max Number of SRS symbols per slot */\r
123 #define XRAN_MAX_TDD_PERIODICITY     (80) /**< Max TDD pattern period */\r
124 #define XRAN_MAX_CELLS_PER_PORT      (XRAN_MAX_SECTOR_NR) /**< Max cells mapped to XRAN port */\r
125 #define XRAN_COMPONENT_CARRIERS_MAX  (XRAN_MAX_SECTOR_NR) /**< number of CCs */\r
126 #define XRAN_NUM_OF_ANT_RADIO        (XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR) /**< Max Number of Antennas supported for all CC on single XRAN port */\r
127 #define XRAN_MAX_PRBS                (275) /**< Max of PRBs per CC per antanna for 5G NR */\r
128 \r
129 #define XRAN_MAX_SECTIONS_PER_SYM    (16)  /**< Max number of different sections in single symbol (section is equal to RB allocation for UE) */\r
130 \r
131 #define XRAN_MAX_PKT_BURST (448+4) /**< 4x14x8 symbols per ms */\r
132 #define XRAN_N_MAX_BUFFER_SEGMENT XRAN_MAX_PKT_BURST /**< Max number of segments per ms */\r
133 \r
134 #define XRAN_STRICT_PARM_CHECK               (1) /**< enable parameter check for C-plane */\r
135 \r
136 /* Slot type definition */\r
137 #define XRAN_SLOT_TYPE_INVALID               (0) /**< invalid slot type */\r
138 #define XRAN_SLOT_TYPE_DL                    (1) /**< DL slot */\r
139 #define XRAN_SLOT_TYPE_UL                    (2) /**< UL slot */\r
140 #define XRAN_SLOT_TYPE_SP                    (3) /**< Special slot */\r
141 #define XRAN_SLOT_TYPE_FDD                   (4) /**< FDD slot */\r
142 #define XRAN_SLOT_TYPE_LAST                  (5) /**< MAX slot */\r
143 \r
144 /* symbol type definition */\r
145 #define XRAN_SYMBOL_TYPE_DL                  (0) /**< DL symbol  */\r
146 #define XRAN_SYMBOL_TYPE_UL                  (1) /**< UL symbol  */\r
147 #define XRAN_SYMBOL_TYPE_GUARD               (2) /**< GUARD symbol */\r
148 #define XRAN_SYMBOL_TYPE_FDD                 (3) /**< FDD symbol */\r
149 \r
150 #define XRAN_NUM_OF_SLOT_IN_TDD_LOOP         (80)/**< MAX number of slot for TDD repetition */\r
151 \r
152 //#define _XRAN_DEBUG   /**< Enable debug log */\r
153 //#define _XRAN_VERBOSE /**< Enable verbose log */\r
154 \r
155 #ifdef _XRAN_DEBUG\r
156     #define xran_log_dbg(fmt, ...)          \\r
157         fprintf(stderr,                     \\r
158             "DEBUG: %s(%d): " fmt "\n",     \\r
159             __FILE__,                       \\r
160             __LINE__, ##__VA_ARGS__)\r
161 #else\r
162     #define xran_log_dbg(fmt, ...)\r
163 #endif\r
164 \r
165 #if defined(_XRAN_DEBUG) || defined(_XRAN_VERBOSE)\r
166     #define xran_log_wrn(fmt, ...)          \\r
167         fprintf(                            \\r
168             stderr,                         \\r
169             "WARNING: %s(%d): " fmt "\n",   \\r
170             __FILE__,                       \\r
171             __LINE__, ##__VA_ARGS__)\r
172 #else\r
173     #define xran_log_dbg(fmt, ...)\r
174     #define xran_log_wrn(fmt, ...)\r
175 #endif\r
176 \r
177 #define xran_log_err(fmt, ...)          \\r
178     fprintf(stderr,                     \\r
179         "ERROR: %s(%d): " fmt "\n",     \\r
180         __FILE__,                       \\r
181         __LINE__, ##__VA_ARGS__)\r
182 \r
183 enum XranFrameDuplexType\r
184 {\r
185     XRAN_FDD = 0, XRAN_TDD\r
186 };\r
187 \r
188 enum xran_if_state\r
189 {\r
190     XRAN_INIT = 0,\r
191     XRAN_RUNNING,\r
192     XRAN_STOPPED\r
193 };\r
194 \r
195 /**\r
196  ******************************************************************************\r
197  * @ingroup xran\r
198  *\r
199  * @description\r
200  *      Compression Method 6.3.3.13, Table 6-43\r
201  *****************************************************************************/\r
202 enum xran_compression_method {\r
203     XRAN_COMPMETHOD_NONE        = 0,\r
204     XRAN_COMPMETHOD_BLKFLOAT    = 1,\r
205     XRAN_COMPMETHOD_BLKSCALE    = 2,\r
206     XRAN_COMPMETHOD_ULAW        = 3,\r
207     XRAN_COMPMETHOD_MODULATION  = 4,\r
208     XRAN_COMPMETHOD_MAX\r
209 };\r
210 \r
211 /**\r
212  ******************************************************************************\r
213  * @ingroup xran\r
214  *\r
215  * @description\r
216  *      Callback function type for symbol packet enum\r
217  *****************************************************************************/\r
218 enum callback_to_phy_id\r
219 {\r
220     XRAN_CB_TTI = 0, /**< callback on TTI boundary */\r
221     XRAN_CB_HALF_SLOT_RX =1, /**< callback on half slot (sym 7) packet arrival*/\r
222     XRAN_CB_FULL_SLOT_RX =2, /**< callback on full slot (sym 14) packet arrival */\r
223     XRAN_CB_MAX /**< max number of callbacks */\r
224 };\r
225 \r
226 /**  Beamforming type, enumerated as "frequency", "time" or "hybrid"\r
227      section 10.4.2     Weight-based dynamic beamforming */\r
228 enum xran_weight_based_beamforming_type {\r
229     XRAN_BF_T_FREQUENCY = 0,\r
230     XRAN_BF_T_TIME      = 1,\r
231     XRAN_BF_T_HYBRID    = 2,\r
232     XRAN_BF_T_MAX\r
233 };\r
234 \r
235 typedef int32_t xran_status_t; /**< Xran status return value */\r
236 \r
237 /** callback function type for Symbol packet */\r
238 typedef void (*xran_callback_sym_fn)(void*);\r
239 \r
240 /** Callback function type for TTI event */\r
241 typedef int (*xran_fh_tti_callback_fn)(void*);\r
242 \r
243 /** Callback function type packet arrival from transport layer (ETH or IP) */\r
244 typedef void (*xran_transport_callback_fn)(void*, xran_status_t);\r
245 \r
246 /** Callback functions to poll BBdev encoder */\r
247 typedef int16_t (*phy_encoder_poll_fn)(void);\r
248 \r
249 /** Callback functions to poll BBdev secoder */\r
250 typedef int16_t (*phy_decoder_poll_fn)(void);\r
251 \r
252 /** XRAN port enum */\r
253 enum xran_vf_ports\r
254 {\r
255     XRAN_UP_VF = 0, /**< port type for U-plane */\r
256     XRAN_CP_VF,     /**< port type for C-plane */\r
257     XRAN_VF_MAX\r
258 };\r
259 \r
260 /** XRAN category enum */\r
261 enum xran_category\r
262 {\r
263     XRAN_CATEGORY_A = 0,\r
264     XRAN_CATEGORY_B = 1,\r
265     XRAN_CATEGORY_MAX\r
266 };\r
267 \r
268 /** type of beamforming */\r
269 enum xran_beamforming_type\r
270 {\r
271     XRAN_BEAM_ID_BASED = 0, /**< beam index based */\r
272     XRAN_BEAM_WEIGHT,       /**< beam forming weights */\r
273     XRAN_BEAM_ATTRIBUTE,    /**< beam index based */\r
274 };\r
275 \r
276 /** state of bbdev with xran */\r
277 enum xran_bbdev_init\r
278 {\r
279     XRAN_BBDEV_NOT_USED    = -1, /**< BBDEV is disabled */\r
280     XRAN_BBDEV_MODE_HW_OFF = 0,  /**< BBDEV is enabled for SW sim mode */\r
281     XRAN_BBDEV_MODE_HW_ON  = 1,  /**< BBDEV is enable for HW */\r
282     XRAN_BBDEV_MODE_MAX\r
283 };\r
284 \r
285 /** callback return information */\r
286 struct xran_cb_tag {\r
287     uint16_t cellId;\r
288     uint32_t symbol;\r
289     uint32_t slotiId;\r
290 };\r
291 \r
292 /** DPDK IO configuration for XRAN layer */\r
293 struct xran_io_cfg {\r
294     uint8_t id; /**< should be (0) for O-DU or (1) O-RU (debug) */\r
295     char *dpdk_dev[XRAN_VF_MAX]; /**< VFs devices  */\r
296     char *bbdev_dev[1];     /**< BBDev dev name */\r
297     int32_t bbdev_mode;     /**< DPDK for BBDev */\r
298     int32_t core;           /**< reservd */\r
299     int32_t system_core;    /**< reservd */\r
300     int32_t pkt_proc_core;  /**< reservd */\r
301     int32_t pkt_aux_core;   /**< reservd */\r
302     int32_t timing_core;    /**< core used by xRAN */\r
303     int32_t port[XRAN_VF_MAX];  /**< VFs ports */\r
304 };\r
305 \r
306 /** XRAN spec section 3.1.3.1.6 ecpriRtcid / ecpriPcid define */\r
307 struct xran_eaxcid_config {\r
308     uint16_t mask_cuPortId;     /**< Mask CU PortId */\r
309     uint16_t mask_bandSectorId; /**< Mask Band */\r
310     uint16_t mask_ccId;         /**< Mask CC */\r
311     uint16_t mask_ruPortId;     /**< Mask RU Port ID */\r
312 \r
313     uint8_t bit_cuPortId;       /**< bandsectorId + ccId + ruportId */\r
314     uint8_t bit_bandSectorId;   /**< ccId + ruPortId */\r
315     uint8_t bit_ccId;           /**< ruportId */\r
316     uint8_t bit_ruPortId;       /**< 0 */\r
317 };\r
318 \r
319 /**\r
320 * XRAN Front haul interface initialization settings\r
321 */\r
322 struct xran_fh_init {\r
323     struct xran_io_cfg io_cfg;/**< DPDK IO for XRAN */\r
324     struct xran_eaxcid_config eAxCId_conf; /**< config of ecpriRtcid/ecpriPcid */\r
325 \r
326     uint32_t dpdkBasebandFecMode; /**< DPDK Baseband FEC device mode (0-SW, 1-HW) */\r
327     char *dpdkBasebandDevice;     /**< DPDK Baseband device address */\r
328     char *filePrefix;             /**< DPDK prefix */\r
329 \r
330     uint32_t mtu; /**< maximum transmission unit (MTU) is the size of the largest protocol data unit (PDU) that can be communicated in a single\r
331                        xRAN network layer transaction. supported 1500 bytes and 9600 bytes (Jumbo Frame) */\r
332     int8_t *p_o_du_addr;  /**<  O-DU Ethernet Mac Address */\r
333     int8_t *p_o_ru_addr;  /**<  O-RU Ethernet Mac Address */\r
334 \r
335     uint16_t totalBfWeights;/**< The total number of beamforming weights on RU for extensions */\r
336 \r
337     uint16_t Tadv_cp_dl;    /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
338     uint16_t T2a_min_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
339     uint16_t T2a_max_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
340     uint16_t T2a_min_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
341     uint16_t T2a_max_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
342     uint16_t T2a_min_up;    /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
343     uint16_t T2a_max_up;    /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
344     uint16_t Ta3_min;       /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
345     uint16_t Ta3_max;       /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
346     uint16_t T1a_min_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
347     uint16_t T1a_max_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
348     uint16_t T1a_min_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
349     uint16_t T1a_max_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
350     uint16_t T1a_min_up;    /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
351     uint16_t T1a_max_up;    /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
352     uint16_t Ta4_min;       /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
353     uint16_t Ta4_max;       /**< Table 2 7 : xRAN Delay Management Model Parameters */\r
354 \r
355     uint8_t enableCP;       /**<  enable C-plane */\r
356     uint8_t prachEnable;    /**<  enable PRACH   */\r
357     uint8_t srsEnable;      /**<  enable SRS (Cat B specific) */\r
358     uint8_t cp_vlan_tag;    /**<  C-plane vlan tag */\r
359     uint8_t up_vlan_tag;    /**<  U-plane vlan tag */\r
360     int32_t debugStop;      /**<  enable auto stop */\r
361     int32_t debugStopCount;      /**<  enable auto stop after number of Tx packets */\r
362     int32_t DynamicSectionEna; /**<  enable dynamic C-Plane section allocation */\r
363     int32_t GPS_Alpha;  // refer to alpha as defined in section 9.7.2 of ORAN spec. this value should be alpha*(1/1.2288ns), range 0 - 1e7 (ns)\r
364     int32_t GPS_Beta;   //beta value as defined in section 9.7.2 of ORAN spec. range -32767 ~ +32767\r
365 };\r
366 \r
367 /** Beamforming waights for single stream for each PRBs  given number of Antenna elements */\r
368 struct xran_cp_bf_weight{\r
369     int16_t nAntElmTRx;        /**< num TRX for this allocation */\r
370     int8_t*  p_ext_section;    /**< pointer to form extType */\r
371     int16_t  ext_section_sz;   /**< extType section size */\r
372 };\r
373 struct xran_cp_bf_attribute{\r
374     int16_t weight[4];\r
375 };\r
376 struct xran_cp_bf_precoding{\r
377     int16_t weight[4];\r
378 };\r
379 \r
380 /** section descriptor for given number of PRBs used on U-plane packet creation */\r
381 struct xran_section_desc {\r
382     uint16_t section_id; /**< section id used for this element */\r
383 \r
384     int16_t iq_buffer_offset;    /**< Offset in bytes for the content of IQs with in main symb buffer */\r
385     int16_t iq_buffer_len;       /**< Length in bytes for the content of IQs with in main symb buffer */\r
386 \r
387     uint8_t *pData;      /**< optional pointer to data buffer */\r
388     void    *pCtrl;      /**< optional poitner to mbuf */\r
389 };\r
390 \r
391 /** PRB element structure */\r
392 struct xran_prb_elm {\r
393     int16_t nRBStart;    /**< start RB of RB allocation */\r
394     int16_t nRBSize;     /**< number of RBs used */\r
395     int16_t nStartSymb;  /**< start symbol ID */\r
396     int16_t numSymb;     /**< number of symbols */\r
397     int16_t nBeamIndex;  /**< beam index for given PRB */\r
398     int16_t bf_weight_update; /** need to update beam weights or not */\r
399     int16_t compMethod;  /**< compression index for given PRB */\r
400     int16_t iqWidth;     /**< compression bit width for given PRB */\r
401     int16_t BeamFormingType; /**< index based, weights based or attribute based beam forming*/\r
402 \r
403     struct xran_section_desc * p_sec_desc[XRAN_NUM_OF_SYMBOL_PER_SLOT]; /**< section desctiptors to U-plane data given RBs */\r
404     struct xran_cp_bf_weight   bf_weight; /**< beam forming information relevant for given RBs */\r
405 \r
406     union {\r
407         struct xran_cp_bf_attribute bf_attribute;\r
408         struct xran_cp_bf_precoding bf_precoding;\r
409     };\r
410 };\r
411 \r
412 /** PRB map structure */\r
413 struct xran_prb_map {\r
414     uint8_t   dir;        /**< DL or UL direction */\r
415     uint8_t   xran_port;  /**< xran id of given RU [0-(XRAN_PORTS_NUM-1)] */\r
416     uint16_t  band_id;    /**< xran band id */\r
417     uint16_t  cc_id;      /**< componnent carrier id [0 - (XRAN_MAX_SECTOR_NR-1)] */\r
418     uint16_t  ru_port_id; /**< RU device antenna port id [0 - (XRAN_MAX_ANTENNA_NR-1) */\r
419     uint16_t  tti_id;     /**< xRAN slot id [0 - (max tti-1)] */\r
420     uint8_t   start_sym_id;     /**< start symbol Id [0-13] */\r
421     uint32_t  nPrbElm;    /**< total number of PRB elements for given map [0- (XRAN_MAX_PRBS-1)] */\r
422     struct xran_prb_elm prbMap[XRAN_MAX_PRBS];\r
423 \r
424 \r
425 };\r
426 \r
427 /* PRACH config required for XRAN based FH */\r
428 struct xran_prach_config\r
429 {\r
430     /* PRACH config*/\r
431     uint8_t      nPrachConfIdx;  /**< PRACH Configuration Index*/\r
432     uint8_t      nPrachSubcSpacing;\r
433     /**< PRACH Sub-carrier spacing\r
434     Value:0->1\r
435     For below 6GHz the values indicate 15kHz or 30kHz\r
436     For above 6GHz the values indicate 60kHz or 120kHz*/\r
437     uint8_t      nPrachZeroCorrConf; /**< PRACH zeroCorrelationZoneConfig */\r
438     uint8_t      nPrachRestrictSet;  /**< PRACH restrictedSetConfig */\r
439     uint16_t     nPrachRootSeqIdx; /**< PRACH Root Sequence Index */\r
440     uint16_t     nPrachFreqStart;  /**< PRACH prach-frequency-start  */\r
441     int32_t      nPrachFreqOffset; /**< PRACH prach-frequency-offset */\r
442     uint8_t      nPrachFilterIdx;  /**< PRACH Filter index */\r
443 };\r
444 \r
445 /**< SRS configuration required for XRAN based FH */\r
446 struct xran_srs_config {\r
447     uint16_t   symbMask;    /**< symbols used for SRS with in U/S slot [bits 0-13] */\r
448     uint8_t    eAxC_offset; /**< starting value of eAxC for SRS packets */\r
449 };\r
450 \r
451 /** XRAN slot configuration */\r
452 struct xran_slot_config {\r
453     uint8_t nSymbolType[XRAN_NUM_OF_SYMBOL_PER_SLOT]; /**< Defines the Symbol type for all 14 symbols in a slot. 0: DL, 1: UL, 2: Guard */\r
454     uint8_t reserved[2];\r
455 };\r
456 \r
457 /** XRAN front haul frame config */\r
458 struct xran_frame_config {\r
459     uint8_t      nFrameDuplexType; /**< Frame Duplex type:  0 -> FDD, 1 -> TDD */\r
460     uint8_t      nNumerology; /**< Numerology, determine sub carrier spacing, Value: 0->4\r
461                                    0: 15khz,  1: 30khz,  2: 60khz\r
462                                    3: 120khz, 4: 240khz */\r
463     uint8_t      nTddPeriod;  /**< TDD period */\r
464     struct xran_slot_config sSlotConfig[XRAN_MAX_TDD_PERIODICITY];\r
465     /**< TDD Slot configuration - If nFrameDuplexType = TDD(1), then this config defines the slot config type for each slot.*/\r
466     /* The number of slots need to be equal to nTddPeriod */\r
467 };\r
468 \r
469 /** XRAN-PHY interface byte order */\r
470 enum xran_input_byte_order {\r
471     XRAN_NE_BE_BYTE_ORDER = 0, /**< Network byte order (Big endian), xRAN lib doesn't do swap */\r
472     XRAN_CPU_LE_BYTE_ORDER     /**< CPU byte order (Little endian), xRAN lib does do swap */\r
473 };\r
474 \r
475 /** XRAN-PHY interface I and Q order */\r
476 enum xran_input_i_q_order {\r
477     XRAN_I_Q_ORDER = 0,  /**< I , Q */\r
478     XRAN_Q_I_ORDER       /**< Q , I */\r
479 };\r
480 \r
481 /** XRAN front haul IQ compression settings */\r
482 struct xran_ru_config {\r
483     enum xran_category xranCat;   /**< mode: Catergory A or Category B */\r
484 \r
485     uint8_t iqWidth;        /**< IQ bit width */\r
486     uint8_t compMeth;       /**< Compression method */\r
487     uint8_t fftSize;        /**< FFT Size */\r
488     enum xran_input_byte_order byteOrder; /**< Order of bytes in int16_t in buffer. Big or little endian */\r
489     enum xran_input_i_q_order  iqOrder;   /**< order of IQs in the buffer */\r
490     uint16_t xran_max_frame; /**< max frame number supported */\r
491 };\r
492 \r
493 /**\r
494  * @ingroup xran\r
495  * XRAN front haul general configuration */\r
496 struct xran_fh_config {\r
497     uint32_t            dpdk_port; /**< DPDK port number used for FH */\r
498     uint32_t            sector_id; /**< Band sector ID for FH */\r
499     uint32_t            nCC;       /**< number of Component carriers supported on FH */\r
500     uint32_t            neAxc;     /**< number of eAxc supported on one CC*/\r
501     uint32_t            neAxcUl;     /**< number of eAxc supported on one CC for UL direction */\r
502     uint32_t            nAntElmTRx;  /**< Number of antenna elements for TX and RX */\r
503     uint16_t            nDLFftSize;  /**< DL FFT size */\r
504     uint16_t            nULFftSize;  /**< UL FFT size */\r
505     uint16_t            nDLRBs;      /**< DL PRB  */\r
506     uint16_t            nULRBs;      /**< UL PRB  */\r
507     uint32_t            nDLAbsFrePointA; /**< Abs Freq Point A of the Carrier Center Frequency for in KHz Value: 450000->52600000 */\r
508     uint32_t            nULAbsFrePointA; /**< Abs Freq Point A of the Carrier Center Frequency for in KHz Value: 450000->52600000 */\r
509     uint32_t            nDLCenterFreqARFCN;   /**< center frerquency for DL in MHz */\r
510     uint32_t            nULCenterFreqARFCN;   /**< center frerquency for UL in MHz */\r
511     xran_fh_tti_callback_fn     ttiCb;        /**< call back for TTI event */\r
512     void                *ttiCbParam;  /**< parameters of call back function */\r
513 \r
514     struct xran_prach_config     prach_conf;   /**< PRACH specific configurations for FH */\r
515     struct xran_srs_config       srs_conf;     /**< SRS specific configurations for FH */\r
516     struct xran_frame_config     frame_conf;   /**< frame config */\r
517     struct xran_ru_config        ru_conf;      /**< config of RU as per XRAN spec */\r
518 \r
519     phy_encoder_poll_fn bbdev_enc; /**< call back to poll BBDev encoder */\r
520     phy_decoder_poll_fn bbdev_dec; /**< call back to poll BBDev decoder */\r
521 \r
522     uint32_t log_level; /**< configuration of log level */\r
523 };\r
524 \r
525 /**\r
526  * @ingroup xran\r
527  * XRAN front haul statistic counters according to Table 7 1 : Common Counters for both DL and UL */\r
528 struct xran_common_counters{\r
529     uint64_t Rx_on_time;      /**< Data was received on time (applies to user data reception window) */\r
530     uint64_t Rx_early;        /**< Data was received too early (applies to user data reception window) */\r
531     uint64_t Rx_late;         /**< Data was received too late (applies to user data reception window) */\r
532     uint64_t Rx_corrupt;      /**< Corrupt/Incorrect header packet */\r
533     uint64_t Rx_pkt_dupl;     /**< Duplicated packet */\r
534     uint64_t Total_msgs_rcvd; /**< Total messages received (on all links) */\r
535 };\r
536 \r
537 /**\r
538  * @ingroup xran\r
539  * CC instance handle pointer type */\r
540 typedef void * xran_cc_handle_t;\r
541 \r
542 /**\r
543  *****************************************************************************\r
544  * @ingroup xran\r
545  *\r
546  * @description\r
547  *      A flat buffer structure. The data pointer, pData, is a virtual address.\r
548  *      The API requires the memory to by physically contiguous. Each flat\r
549  *      buffer segment may contain several equally sized elements.\r
550  *\r
551  *****************************************************************************/\r
552 struct xran_flat_buffer\r
553 {\r
554     uint32_t nElementLenInBytes;\r
555     /**< The Element length specified in bytes.\r
556      * This parameter specifies the size of a single element in the buffer.\r
557      * The total size of the buffer is described as\r
558      * bufferSize = nElementLenInBytes * nNumberOfElements */\r
559     uint32_t nNumberOfElements;\r
560     /**< The number of elements in the physical contiguous memory segment */\r
561     uint32_t nOffsetInBytes;\r
562     /**< Offset in bytes to the start of the data in the physical contiguous\r
563      * memory segment */\r
564     uint32_t nIsPhyAddr;\r
565     uint8_t *pData;\r
566     /**< The data pointer is a virtual address, however the actual data pointed\r
567      * to is required to be in contiguous physical memory unless the field\r
568      requiresPhysicallyContiguousMemory in CpaInstanceInfo is false. */\r
569     void *pCtrl;\r
570     /**< pointer to control section coresponding to data buffer */\r
571 };\r
572 \r
573 /**\r
574  *****************************************************************************\r
575  * @ingroup xran\r
576  *      Scatter/Gather buffer list containing an array of Simple buffers.\r
577  *\r
578  * @description\r
579  *      A Scatter/Gather buffer list structure. It is expected that this buffer\r
580  *      structure will be used where more than one flat buffer can be provided\r
581  *      on a particular API.\r
582  *\r
583  *      IMPORTANT - The memory for the pPrivateMetaData member must be allocated\r
584  *      by the client as contiguous memory.  When allocating memory for\r
585  *      pPrivateMetaData a call to cpaCyBufferListGetMetaSize MUST be made to\r
586  *      determine the size of the Meta Data Buffer.  The returned size\r
587  *      (in bytes) may then be passed in a memory allocation routine to allocate\r
588  *      the pPrivateMetaData memory.\r
589  *\r
590  *****************************************************************************/\r
591 struct xran_buffer_list\r
592 {\r
593     uint32_t nNumBuffers;\r
594     /**< Number of pointers */\r
595     struct xran_flat_buffer *pBuffers;\r
596     /**< Pointer to an unbounded array containing the number of CpaFlatBuffers\r
597      * defined by nNumBuffers */\r
598     void *pUserData;\r
599     /**< This is an opaque field that is not read or modified internally. */\r
600     void *pPrivateMetaData;\r
601     /**< Private Meta representation of this buffer List - the memory for this\r
602      * buffer needs to be allocated by the client as contiguous data.\r
603      * The amount of memory required is returned with a call to\r
604      * cpaCyBufferListGetMetaSize. If cpaCyBufferListGetMetaSize returns a size\r
605      * of zero no memory needs to be allocated, and this parameter can be NULL.\r
606      */\r
607 };\r
608 \r
609 /**\r
610  * @ingroup xran\r
611  * Initialize the XRAN Layer via DPDK.\r
612  *\r
613  * @param argc\r
614  *   A non-negative value.  If it is greater than 0, the array members\r
615  *   for argv[0] through argv[argc] (non-inclusive) shall contain pointers\r
616  *   to strings.\r
617  * @param argv\r
618  *   An array of strings.  The contents of the array, as well as the strings\r
619  *   which are pointed to by the array, may be modified by this function.\r
620  *\r
621  * @return\r
622  *   0 - on success\r
623  *   Error codes returned via rte_errno\r
624  */\r
625 int32_t xran_init(int argc, char *argv[], struct xran_fh_init *p_xran_fh_init, char *appName, void ** pHandle);\r
626 \r
627 /**\r
628  * @ingroup xran\r
629  *\r
630  *   Function returns handles for number of sectors supported by XRAN layer. Currently function\r
631  *   supports one handle XRAN layer where it supports only one CC\r
632  *\r
633  * @param pHandle\r
634  *   Pointer to XRAN layer handle\r
635  * @param nNumInstances\r
636  *   total number of instances of CC\r
637  * @param pSectorInstanceHandles\r
638  *   Pointer to xran_cc_handle_t where to store Handle pointer\r
639  *\r
640  * @return\r
641  *   0 - on success\r
642  */\r
643 int32_t xran_sector_get_instances (void * pHandle, uint16_t nNumInstances,\r
644                xran_cc_handle_t * pSectorInstanceHandles);\r
645 \r
646 /**\r
647  * @ingroup xran\r
648  *\r
649  *   Function initialize Memory Management subsystem (mm) in order to handle memory buffers between XRAN layer\r
650  *   and PHY.\r
651  *\r
652  * @param pHandle\r
653  *   Pointer to XRAN layer handle for given CC\r
654  * @param nMemorySize\r
655  *   memory size of all segments\r
656  * @param nMemorySegmentSize\r
657  *   size of memory per segment\r
658  *\r
659  * @return\r
660  *   0 - on success\r
661  */\r
662 int32_t xran_mm_init (void * pHandle, uint64_t nMemorySize, uint32_t nMemorySegmentSize);\r
663 \r
664 /**\r
665  * @ingroup xran\r
666  *\r
667  *   Function allocates buffer memory (bm) used between XRAN layer and PHY. In general case it's DPDK mbuf.\r
668  *   it uses Memory Management system to get memory chunk and define memory pool on top of it.\r
669  *\r
670  * @param pHandle\r
671  *   Pointer to XRAN layer handle for given CC\r
672  * @param nPoolIndex\r
673  *   pointer to buffer pool identification to be returned\r
674  * @param nNumberOfBuffers\r
675  *   number of buffer to allocate in the pool\r
676  * @param nBufferSize\r
677  *   buffer size to allocate\r
678  *\r
679  * @return\r
680  *   0 - on success\r
681  */\r
682 int32_t xran_bm_init (void * pHandle, uint32_t * pPoolIndex, uint32_t nNumberOfBuffers, uint32_t nBufferSize);\r
683 \r
684 /**\r
685  * @ingroup xran\r
686  *\r
687  *   Function allocates buffer used between XRAN layer and PHY. In general case it's DPDK mbuf.\r
688  *\r
689  * @param pHandle\r
690  *   Pointer to XRAN layer handle for given CC\r
691  * @param nPoolIndex\r
692  *   buffer pool identification\r
693  * @param ppData\r
694  *   Pointer to pointer where to store address of new buffer\r
695  * @param ppCtrl\r
696  *   Pointer to pointer where to store address of internal private control information\r
697  *\r
698  *\r
699  * @return\r
700  *   0 - on success\r
701  */\r
702 int32_t xran_bm_allocate_buffer(void * pHandle, uint32_t nPoolIndex, void **ppData,  void **ppCtrl);\r
703 \r
704 /**\r
705  * @ingroup xran\r
706  *\r
707  *   Function frees buffer used between XRAN layer and PHY. In general case it's DPDK mbuf\r
708  *\r
709  * @param pHandle\r
710  *   Pointer to XRAN layer handle for given CC\r
711  * @param pData\r
712  *   Pointer to buffer\r
713  * @param pData\r
714  *   Pointer to internal private control information\r
715  *\r
716  * @return\r
717  *   0 - on success\r
718  */\r
719 int32_t xran_bm_free_buffer(void * pHandle, void *pData, void *pCtrl);\r
720 \r
721 /**\r
722  * @ingroup xran\r
723  *\r
724  *   Function destroys Memory Management (MM) layer of XRAN library\r
725  *\r
726  * @param pHandle\r
727  *   Pointer to XRAN layer handle for given CC\r
728  *\r
729  * @return\r
730  *   0 - on success\r
731  */\r
732 int32_t xran_mm_destroy (void * pHandle);\r
733 \r
734 /**\r
735  * @ingroup xran\r
736  *\r
737  *   Function configures TX(DL) and RX(UL) output buffers and callback (UL only) for XRAN layer with\r
738  *   given handle\r
739  *\r
740  * @param pHandle\r
741  *   Pointer to XRAN layer handle for given CC\r
742  * @param pSrcBuffer\r
743  *   list of memory buffers to use to fetch IQs from PHY to XRAN layer (DL)\r
744  * @param pSrcCpBuffer\r
745  *   list of memory buffers to use to configure C-plane (DL)\r
746  * @param pDstBuffer\r
747  *   list of memory buffers to use to deliver IQs from XRAN layer to PHY (UL)\r
748  * @param pDstCpBuffer\r
749  *   list of memory buffers to use to configure C-plane (UL)\r
750  * @param xran_transport_callback_fn pCallback\r
751  *   Callback function to call with arrival of all packets for given CC for given symbol\r
752  * @param pCallbackTag\r
753  *   Parameters of Callback function\r
754  *\r
755  * @return\r
756  *   0  - on success\r
757  *   -1 - on error\r
758  */\r
759  int32_t xran_5g_fronthault_config (void * pHandle,\r
760                     struct xran_buffer_list *pSrcBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],\r
761                     struct xran_buffer_list *pSrcCpBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],\r
762                     struct xran_buffer_list *pDstBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],\r
763                     struct xran_buffer_list *pDstCpBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],\r
764                     xran_transport_callback_fn pCallback,\r
765                     void *pCallbackTag);\r
766 \r
767 /**\r
768  * @ingroup xran\r
769  *\r
770  *   Function configures PRACH output buffers and callback for XRAN layer with given handle\r
771  *\r
772  * @param pHandle\r
773  *   Pointer to XRAN layer handle for given CC\r
774  * @param pDstBuffer\r
775  *   list of memory buffers to use to deliver PRACH IQs from xran layer to PHY\r
776  * @param xran_transport_callback_fn pCallback\r
777  *   Callback function to call with arrival of PRACH packets for given CC\r
778  * @param pCallbackTag\r
779  *   Parameters of Callback function\r
780  *\r
781  * @return\r
782  *   0  - on success\r
783  *   -1 - on error\r
784  */\r
785 int32_t xran_5g_prach_req (void *  pHandle,\r
786                 struct xran_buffer_list *pDstBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],\r
787                 xran_transport_callback_fn pCallback,\r
788                 void *pCallbackTag);\r
789 \r
790 /**\r
791  * @ingroup xran\r
792  *\r
793  *   Function configures SRS output buffers and callback for XRAN layer with given handle\r
794  *\r
795  * @param pHandle\r
796  *   Pointer to XRAN layer handle for given CC\r
797  * @param pDstBuffer\r
798  *   list of memory buffers to use to deliver SRS IQs from xran layer to PHY\r
799  * @param xran_transport_callback_fn pCallback\r
800  *   Callback function to call with arrival of SRS packets for given CC\r
801  * @param pCallbackTag\r
802  *   Parameters of Callback function\r
803  *\r
804  * @return\r
805  *   0  - on success\r
806  *   -1 - on error\r
807  */\r
808 int32_t xran_5g_srs_req (void *  pHandle,\r
809                 struct xran_buffer_list *pDstBuffer[XRAN_MAX_ANT_ARRAY_ELM_NR][XRAN_N_FE_BUF_LEN],\r
810                 xran_transport_callback_fn pCallback,\r
811                 void *pCallbackTag);\r
812 \r
813 \r
814 /**\r
815  * @ingroup xran\r
816  *\r
817  *   Function returns XRAN core utilization stats\r
818  *\r
819  * @param total_time (out)\r
820  *   Pointer to variable to store Total time thread has been running\r
821  * @param used_time (out)\r
822  *   Pointer to variable to store Total time essential tasks have been running on the thread\r
823  * @param core_used (out)\r
824  *   Pointer to variable to store Core on which the XRAN thread is running\r
825  * @param clear (in)\r
826  *   If set to 1, then internal variables total_time and used_time are cleared\r
827  *\r
828  * @return\r
829  *   0 - on success\r
830  */\r
831 uint32_t xran_get_time_stats(uint64_t *total_time, uint64_t *used_time, uint32_t *core_used, uint32_t clear);\r
832 \r
833 /**\r
834  * @ingroup xran\r
835  *\r
836  *   Function opens XRAN layer with given handle\r
837  *\r
838  * @param pHandle\r
839  *   Pointer to XRAN layer handle for given CC\r
840  * @param pointer to struct xran_fh_config pConf\r
841  *   Pointer to XRAN configuration structure with specific settings to use\r
842  *\r
843  * @return\r
844  *   0 - on success\r
845  */\r
846 int32_t xran_open(void *pHandle, struct xran_fh_config* pConf);\r
847 \r
848 /**\r
849  * @ingroup xran\r
850  *\r
851  *   Function starts XRAN layer with given handle\r
852  *\r
853  * @param pHandle\r
854  *   Pointer to XRAN layer handle for given CC\r
855  *\r
856  * @return\r
857  *   0 - on success\r
858  */\r
859 int32_t xran_start(void *pHandle);\r
860 \r
861 /**\r
862  * @ingroup xran\r
863  *\r
864  *   Function stops XRAN layer with given handle\r
865  *\r
866  * @param pHandle\r
867  *   Pointer to XRAN layer handle for given CC\r
868  *\r
869  * @return\r
870  *   0 - on success\r
871  */\r
872 int32_t xran_stop(void *pHandle);\r
873 \r
874 /**\r
875  * @ingroup xran\r
876  *\r
877  *   Function closes XRAN layer with given handle\r
878  *\r
879  * @param pHandle\r
880  *   Pointer to XRAN layer handle for given CC\r
881  *\r
882  * @return\r
883  *   0 - on success\r
884  */\r
885 int32_t xran_close(void *pHandle);\r
886 \r
887 /**\r
888  * @ingroup xran\r
889  *\r
890  *   Function registers callback to XRAN layer. Function support callbacks aligned on packet arrival.\r
891  *\r
892  * @param pHandle\r
893  *   Pointer to XRAN layer handle for given CC\r
894  * @param symCb\r
895  *   pointer to callback function\r
896  * @param symCb\r
897  *   pointer to Callback Function parameters\r
898  * @param symb\r
899  *   symbol to be register for\r
900  * @param ant\r
901  *   Antenna number to trigger callback for packet arrival\r
902  *\r
903  * @return\r
904  *    0 - in case of success\r
905  *   -1 - in case of failure\r
906  */\r
907 int32_t xran_reg_sym_cb(void *pHandle, xran_callback_sym_fn symCb, void * symCbParam, uint8_t symb, uint8_t ant);\r
908 \r
909 /**\r
910  * @ingroup xran\r
911  *\r
912  *   Function registers callback to XRAN layer. Function support callbacks align to OTA time. TTI even, half of slot,\r
913  *   full slot with respect to PTP time.\r
914  *\r
915  * @param pHandle\r
916  *   Pointer to XRAN layer handle for given CC\r
917  * @param Cb\r
918  *   pointer to callback function\r
919  * @param cbParam\r
920  *   pointer to Callback Function parameters\r
921  * @param skipTtiNum\r
922  *   number of calls to be skipped before first call\r
923  * @param callback_to_phy_id\r
924  *   call back time identification (see enum callback_to_phy_id)\r
925  *\r
926  * @return\r
927  *    0 - in case of success\r
928  *   -1 - in case of failure\r
929  */\r
930 int32_t xran_reg_physide_cb(void *pHandle, xran_fh_tti_callback_fn Cb, void *cbParam, int skipTtiNum, enum callback_to_phy_id);\r
931 \r
932 /**\r
933  * @ingroup xran\r
934  *\r
935  *   Function returns current TTI, Frame, Subframe, Slot Number as seen "Over air" base on PTP time\r
936  *\r
937  * @param nFrameIdx\r
938  *    Pointer to Frame number [0-99]\r
939  *\r
940  * @param nSubframeIdx\r
941  *    Pointer to Subframe number [0-10]\r
942  *\r
943  * @param nSlotIdx\r
944  *    Pointer to Slot number [0-7]\r
945  *\r
946  * @param nSecond\r
947  *    Pointer to current UTC second\r
948  *\r
949  * @return\r
950  *   current TTI number [0-7999]\r
951  */\r
952 int32_t xran_get_slot_idx (uint32_t *nFrameIdx, uint32_t *nSubframeIdx,  uint32_t *nSlotIdx, uint64_t *nSecond);\r
953 \r
954 /**\r
955  * @ingroup xran\r
956  *\r
957  *   Function retrun XRAN layer common counters for given handle\r
958  *\r
959  * @param pHandle\r
960  *   Pointer to XRAN layer handle for given CC\r
961  *\r
962  * @param pStats\r
963  *   Pointer to pointer of common counter structure\r
964  *\r
965  * @return\r
966  *   0 - on success\r
967  */\r
968 int32_t xran_get_common_counters(void *pXranLayerHandle, struct xran_common_counters *pStats);\r
969 \r
970 \r
971 /**\r
972  * @ingroup xran\r
973  *\r
974  *   Function returns status of operation of FH layer\r
975  *\r
976  * @return\r
977  *  XRAN_INIT    - init state\r
978  *  XRAN_RUNNING - running\r
979  *  XRAN_STOPPED - stopped\r
980  */\r
981 enum xran_if_state xran_get_if_state(void);\r
982 \r
983 \r
984 /**\r
985  * @ingroup xran\r
986  *\r
987  *   Function allocates memory of given size from heap\r
988  *\r
989  * @param buf_len\r
990  *   buffer size\r
991  *\r
992  * @return\r
993  *   ptr - to memory buffer or NULL\r
994  */\r
995 void*    xran_malloc(size_t buf_len);\r
996 \r
997 \r
998 /**\r
999  * @ingroup xran\r
1000  *\r
1001  *   Function calculates offset for ptr according to ORAN headers requared\r
1002  *\r
1003  * @param dst\r
1004  *   pointer to be addjusted\r
1005  * @compMethod\r
1006  *   compression method according to enum xran_compression_method\r
1007  *\r
1008  * @return\r
1009  *   ptr - pointer to payload given header requared\r
1010  */\r
1011 uint8_t* xran_add_hdr_offset(uint8_t  *dst, int16_t compMethod);\r
1012 \r
1013 #ifdef __cplusplus\r
1014 }\r
1015 #endif\r
1016 \r
1017 #endif /* _XRAN_FH_O_DU_H_*/\r