O-RAN E Maintenance Release contribution for ODULOW
[o-du/phy.git] / fhi_lib / lib / api / xran_fh_o_du.h
index 6365f27..7419ae1 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
 *
-*   Copyright (c) 2019 Intel.
+*   Copyright (c) 2020 Intel.
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
@@ -51,6 +51,7 @@ extern "C" {
 #include <getopt.h>
 #include <unistd.h>
 
+
 #define XRAN_STATUS_SUCCESS (0)
 /**<
  *  @ingroup xran
@@ -105,19 +106,18 @@ extern "C" {
 /** Macro to calculate Slot number */
 #define XranGetSlotNum(tti, numSlotPerSfn) ((uint32_t)tti % ((uint32_t)numSlotPerSfn))
 
-#define XRAN_PORTS_NUM               (1)    /**< number of XRAN ports (aka O-RU devices) supported */
-#define XRAN_N_FE_BUF_LEN            (40)   /**< Number of TTIs (slots) */
-#define XRAN_MAX_SECTOR_NR           (12)    /**< Max sectors per XRAN port */
+#define XRAN_PORTS_NUM               (4)    /**< number of XRAN ports (aka O-RU|O-DU devices) supported */
+#define XRAN_ETH_PF_LINKS_NUM        (4)    /**< number of Physical Ethernet links per one O-RU|O-DU */
+#define XRAN_N_FE_BUF_LEN            (20)   /**< Number of TTIs (slots) */
+#define XRAN_MAX_SECTOR_NR           (16)   /**< Max sectors per XRAN port */
 #define XRAN_MAX_ANTENNA_NR          (16)   /**< Max number of extended Antenna-Carriers:
                                                 a data flow for a single antenna (or spatial stream) for a single carrier in a single sector */
 
-/* see 10.2    Hierarchy of Radiation Structure in O-RU (assume TX and RX pannel are the same dimensions)*/
+/* see 10.2    Hierarchy of Radiation Structure in O-RU (assume TX and RX panel are the same dimensions)*/
 #define XRAN_MAX_PANEL_NR            (1)   /**< Max number of Panels supported per O-RU */
 #define XRAN_MAX_TRX_ANTENNA_ARRAY   (1)   /**< Max number of TX and RX arrays per panel in O-RU */
 #define XRAN_MAX_ANT_ARRAY_ELM_NR    (64)  /**< Maximum number of Antenna Array Elemets in Antenna Array in the O-RU */
 
-
-
 #define XRAN_NUM_OF_SYMBOL_PER_SLOT  (14) /**< Number of symbols per slot */
 #define XRAN_MAX_NUM_OF_SRS_SYMBOL_PER_SLOT  XRAN_NUM_OF_SYMBOL_PER_SLOT /**< Max Number of SRS symbols per slot */
 #define XRAN_MAX_TDD_PERIODICITY     (80) /**< Max TDD pattern period */
@@ -125,8 +125,15 @@ extern "C" {
 #define XRAN_COMPONENT_CARRIERS_MAX  (XRAN_MAX_SECTOR_NR) /**< number of CCs */
 #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 */
 #define XRAN_MAX_PRBS                (275) /**< Max of PRBs per CC per antanna for 5G NR */
+#define XRAN_NUM_OF_SC_PER_RB  (12) /**< Number of subcarriers per RB */
+
+#define XRAN_MAX_SECTIONS_PER_SLOT   (24)  /**< Max number of different sections in single slot (section may be equal to RB allocation for UE) */
+#define XRAN_MIN_SECTIONS_PER_SLOT   (6)   /**< Min number of different sections in single slot (section may be equal to RB allocation for UE) */
+#define XRAN_MAX_SECTIONS_PER_SYM    (XRAN_MAX_SECTIONS_PER_SLOT)  /**< Max number of different sections in single slot (section may be equal to RB allocation for UE) */
+#define XRAN_MIN_SECTIONS_PER_SYM    (XRAN_MIN_SECTIONS_PER_SLOT)  /**< Min number of different sections in single slot (section may be equal to RB allocation for UE) */
 
-#define XRAN_MAX_SECTIONS_PER_SYM    (16)  /**< Max number of different sections in single symbol (section is equal to RB allocation for UE) */
+#define XRAN_MAX_FRAGMENT            (1)   /**< Max number of fragmentations in single symbol */
+#define XRAN_MAX_SET_BFWS            (64)  /**< Assumed 64Ant, BFP 9bit with 9K jumbo frame */
 
 #define XRAN_MAX_PKT_BURST (448+4) /**< 4x14x8 symbols per ms */
 #define XRAN_N_MAX_BUFFER_SEGMENT XRAN_MAX_PKT_BURST /**< Max number of segments per ms */
@@ -151,6 +158,9 @@ extern "C" {
 
 //#define _XRAN_DEBUG   /**< Enable debug log */
 //#define _XRAN_VERBOSE /**< Enable verbose log */
+#define MX_NUM_SAMPLES                       (16)/**< MAX Number of Samples for One Way delay Measurement */
+
+#define XRAN_VF_QUEUE_MAX (XRAN_MAX_ANTENNA_NR*2+XRAN_MAX_ANT_ARRAY_ELM_NR) /**< MAX number of HW queues for given VF */
 
 #ifdef _XRAN_DEBUG
     #define xran_log_dbg(fmt, ...)          \
@@ -189,7 +199,8 @@ enum xran_if_state
 {
     XRAN_INIT = 0,
     XRAN_RUNNING,
-    XRAN_STOPPED
+    XRAN_STOPPED,
+    XRAN_OWDM
 };
 
 /**
@@ -213,7 +224,7 @@ enum xran_compression_method {
  * @ingroup xran
  *
  * @description
- *      Callback function type for symbol packet enum
+ *       enum of callback function type ids for TTI
  *****************************************************************************/
 enum callback_to_phy_id
 {
@@ -223,6 +234,27 @@ enum callback_to_phy_id
     XRAN_CB_MAX /**< max number of callbacks */
 };
 
+/**
+ ******************************************************************************
+ * @ingroup xran
+ *
+ * @description
+ *       enum of callback function type ids for sumbol
+ *****************************************************************************/
+enum cb_per_sym_type_id
+{
+    XRAN_CB_SYM_OTA_TIME         = 0, /**< callback on exact SYM OTA time (+-SW jitter)  */
+    XRAN_CB_SYM_RX_WIN_BEGIN     = 1, /**< callback on exact SYM RX window start time (+-SW jitter) */
+    XRAN_CB_SYM_RX_WIN_END       = 2, /**< callback on exact SYM RX window stop time (+-SW jitter)  */
+    XRAN_CB_SYM_TX_WIN_BEGIN     = 3, /**< callback on exact SYM TX window start time (+-SW jitter) */
+    XRAN_CB_SYM_TX_WIN_END       = 4, /**< callback on exact SYM TX window stop time (+-SW jitter)  */
+    XRAN_CB_SYM_CP_DL_WIN_BEGIN  = 5, /**< callback on exact SYM DL CP window start time (+-SW jitter)  */
+    XRAN_CB_SYM_CP_DL_WIN_END    = 6, /**< callback on exact SYM DL CP window stop time (+-SW jitter)  */
+    XRAN_CB_SYM_CP_UL_WIN_BEGIN  = 7, /**< callback on exact SYM UL CP window start time (+-SW jitter)  */
+    XRAN_CB_SYM_CP_UL_WIN_END    = 8, /**< callback on exact SYM UL CP window stop time (+-SW jitter)  */
+    XRAN_CB_SYM_MAX                   /**< max number of types of callbacks */
+};
+
 /**  Beamforming type, enumerated as "frequency", "time" or "hybrid"
      section 10.4.2    Weight-based dynamic beamforming */
 enum xran_weight_based_beamforming_type {
@@ -232,13 +264,24 @@ enum xran_weight_based_beamforming_type {
     XRAN_BF_T_MAX
 };
 
+/** contains time related information according to type of event */
+struct xran_sense_of_time {
+    enum cb_per_sym_type_id type_of_event; /**< event type id */
+    uint32_t tti_counter;  /**< TTI counter with in GPS second */
+    uint32_t nSymIdx;      /**< Symbol Idx with in Slot [0-13] */
+    uint32_t nFrameIdx;    /**< ORAN Frame */
+    uint32_t nSubframeIdx; /**< ORAN Subframe */
+    uint32_t nSlotIdx;     /**< Slot within subframe */
+    uint64_t nSecond;      /**< GPS second of this symbol */
+};
+
 typedef int32_t xran_status_t; /**< Xran status return value */
 
 /** callback function type for Symbol packet */
-typedef void (*xran_callback_sym_fn)(void*);
+typedef int32_t (*xran_callback_sym_fn)(void*, struct xran_sense_of_time* p_sense_of_time);
 
 /** Callback function type for TTI event */
-typedef int (*xran_fh_tti_callback_fn)(void*);
+typedef int32_t (*xran_fh_tti_callback_fn)(void*);
 
 /** Callback function type packet arrival from transport layer (ETH or IP) */
 typedef void (*xran_transport_callback_fn)(void*, xran_status_t);
@@ -299,8 +342,9 @@ enum xran_category
 enum xran_beamforming_type
 {
     XRAN_BEAM_ID_BASED = 0, /**< beam index based */
-    XRAN_BEAM_WEIGHT,       /**< beam forming weights */
-    XRAN_BEAM_ATTRIBUTE,    /**< beam index based */
+    XRAN_BEAM_WEIGHT    = 1, /**< beam forming weights */
+    XRAN_BEAM_ATTRIBUTE = 2, /**< beam index based */
+    XRAN_BEAM_TYPE_MAX
 };
 
 /** state of bbdev with xran */
@@ -309,32 +353,74 @@ enum xran_bbdev_init
     XRAN_BBDEV_NOT_USED    = -1, /**< BBDEV is disabled */
     XRAN_BBDEV_MODE_HW_OFF = 0,  /**< BBDEV is enabled for SW sim mode */
     XRAN_BBDEV_MODE_HW_ON  = 1,  /**< BBDEV is enable for HW */
+    XRAN_BBDEV_MODE_HW_SW  =  2, /**< BBDEV for SW and HW is enabled */
     XRAN_BBDEV_MODE_MAX
 };
 
 /** callback return information */
 struct xran_cb_tag {
     uint16_t cellId;
+    uint16_t oXuId;
     uint32_t symbol;
     uint32_t slotiId;
 };
 
+/** Common Data for ecpri one-way delay measurements  */
+struct xran_ecpri_del_meas_cmn {
+    uint16_t initiator_en;      // Initiator 1, Recipient 0
+    uint16_t numberOfSamples;   // Total number of samples to be collected and averaged
+    uint32_t filterType;        // Average for number of samples collected 0
+    uint64_t responseTo;        //  Response Timeout in ns
+    uint16_t measVf;            //  Vf using the owd transmitter
+    uint16_t measState;         //  The state of the owd Transmitter: OWDMTX_DIS,OWDMTX_INIT,OWDMTX_IDLE,OWDMTX_ACTIVE,OWDTX_DONE
+    uint16_t measId;            //  Measurement Id to be used by the transmitter
+    uint16_t measMethod;        //  Measurement Method i.e. REQUEST, REM_REQ, REQ_WFUP or REM_REQ_WFUP
+    uint16_t owdm_enable;       //  1: Enabled  0:Disabled
+    uint16_t owdm_PlLength;     //  Payload Length   44 <= PlLength <= 1400
+};
+
+/** Port specific data for ecpri one-way delay measurements */
+struct xran_ecpri_del_meas_port {
+    uint64_t t1;                            // ecpri ts1
+    uint64_t t2;                            // ecpri ts2
+    uint64_t tr;                            // ecpri tr
+    int64_t delta;                          // stores differences based on the msState
+    uint8_t portid;                         // portid for this owdm
+    uint8_t runMeas;                        // run One Way Delay measurements for numberOfSamples
+    uint16_t currentMeasID;                 // Last Measurement ID received, for originator use as base for the Measurement ID being send out
+    uint16_t msState;                       // Measurement State for Initiator: Idle, Waiting_Response, Waiting_Request, Waiting_Request_with_fup, Waiting_fup, Done
+                                            // Measurement State for Recipient: Idle, Waiting_Response, Waiting_Follow_up, Done
+    uint16_t numMeas;                       // Number of Measurements completed (Running number up to common config numberOfSamples
+    uint16_t txDone;                        // For originator clear after each change of state and set once the transmission is done
+    uint64_t rspTimerIdx;                   // Timer Index for TimeOut Timer. On timeout abort current measurement and go back to idle state
+    uint64_t delaySamples[MX_NUM_SAMPLES];  // Storage for collected delay samples i.e. td
+    uint64_t delayAvg;                      // Contains the average based on the numberOfSamples for the delay, gets computed once we have
+                                            // completed the collection for all the numberOfSamples prescribed
+};
+
 /** DPDK IO configuration for XRAN layer */
 struct xran_io_cfg {
     uint8_t id; /**< should be (0) for O-DU or (1) O-RU (debug) */
     uint8_t num_vfs; /**< number of VFs for C-plane and U-plane (should be even) */
+    uint16_t num_rxq;             /**< number of RX queues per VF */
     char *dpdk_dev[XRAN_VF_MAX]; /**< VFs devices  */
     char *bbdev_dev[1];      /**< BBDev dev name */
     int32_t bbdev_mode;      /**< DPDK for BBDev */
     uint32_t dpdkIoVaMode;   /**< IOVA Mode */
     uint32_t dpdkMemorySize; /**< DPDK max memory allocation */
-    int32_t  core;            /**< reservd */
-    int32_t  system_core;     /**< reservd */
-    uint64_t pkt_proc_core;  /**< worker mask */
-    int32_t  pkt_aux_core;    /**< reservd */
+    int32_t  core;                /**< reserved */
+    int32_t  system_core;         /**< reserved */
+    uint64_t pkt_proc_core;         /**< worker mask 0-63 */
+    uint64_t pkt_proc_core_64_127;  /**< worker mask 64-127 */
+    int32_t  pkt_aux_core;        /**< reserved */
     int32_t  timing_core;     /**< core used by xRAN */
     int32_t  port[XRAN_VF_MAX];  /**< VFs ports */
     int32_t  io_sleep;        /**< enable sleep on PMD cores */
+    uint32_t nEthLinePerPort;     /**< 1, 2, 3 total number of links per O-RU (Fronthaul Ethernet link) */
+    uint32_t nEthLineSpeed;       /**< 10G,25G,40G,100G speed of Physical connection on O-RU */
+    int32_t  one_vf_cu_plane;      /**< 1 - C-plane and U-plane use one VF */
+    struct xran_ecpri_del_meas_cmn eowd_cmn[2];/**<ecpriowdmeasurementscommonsettingsforO-DUandO-RU*/
+    struct xran_ecpri_del_meas_port eowd_port[2][XRAN_VF_MAX];  /**< ecpri owd measurements per port variables for O-DU and O-RU */
 };
 
 /** XRAN spec section 3.1.3.1.6 ecpriRtcid / ecpriPcid define */
@@ -344,9 +430,9 @@ struct xran_eaxcid_config {
     uint16_t mask_ccId;         /**< Mask CC */
     uint16_t mask_ruPortId;     /**< Mask RU Port ID */
 
-    uint8_t bit_cuPortId;       /**< bandsectorId + ccId + ruportId */
+    uint8_t bit_cuPortId;       /**< bandsectorId + ccId + ru_portId */
     uint8_t bit_bandSectorId;   /**< ccId + ruPortId */
-    uint8_t bit_ccId;           /**< ruportId */
+    uint8_t bit_ccId;           /**< ru_portId */
     uint8_t bit_ruPortId;       /**< 0 */
 };
 
@@ -357,6 +443,7 @@ struct xran_fh_init {
     struct xran_io_cfg io_cfg;/**< DPDK IO for XRAN */
     struct xran_eaxcid_config eAxCId_conf; /**< config of ecpriRtcid/ecpriPcid */
 
+    uint32_t xran_ports;          /**< Number of O-RU/O-DU connected to this instantiation of ORAN FH layer */
     uint32_t dpdkBasebandFecMode; /**< DPDK Baseband FEC device mode (0-SW, 1-HW) */
     char *dpdkBasebandDevice;     /**< DPDK Baseband device address */
     char *filePrefix;             /**< DPDK prefix */
@@ -367,43 +454,28 @@ struct xran_fh_init {
     int8_t *p_o_ru_addr;  /**<  O-RU Ethernet Mac Address */
 
     uint16_t totalBfWeights;/**< The total number of beamforming weights on RU for extensions */
-
-    uint16_t Tadv_cp_dl;    /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t T2a_min_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t T2a_max_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t T2a_min_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t T2a_max_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t T2a_min_up;    /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t T2a_max_up;    /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t Ta3_min;       /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t Ta3_max;       /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t T1a_min_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t T1a_max_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t T1a_min_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t T1a_max_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t T1a_min_up;    /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t T1a_max_up;    /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t Ta4_min;       /**< Table 2 7 : xRAN Delay Management Model Parameters */
-    uint16_t Ta4_max;       /**< Table 2 7 : xRAN Delay Management Model Parameters */
-
-    uint8_t enableCP;       /**<  enable C-plane */
-    uint8_t prachEnable;    /**<  enable PRACH   */
-    uint8_t srsEnable;      /**<  enable SRS (Cat B specific) */
-    uint8_t cp_vlan_tag;    /**<  C-plane vlan tag */
-    uint8_t up_vlan_tag;    /**<  U-plane vlan tag */
-    int32_t debugStop;      /**<  enable auto stop */
-    int32_t debugStopCount;      /**<  enable auto stop after number of Tx packets */
-    int32_t DynamicSectionEna; /**<  enable dynamic C-Plane section allocation */
-    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)
-    int32_t GPS_Beta;   //beta value as defined in section 9.7.2 of ORAN spec. range -32767 ~ +32767
 };
 
+struct xran_ext11_bfw_info {
+        uint16_t    beamId;     /* 15bits, needs to strip MSB */
+        uint8_t     *pBFWs;     /* external buffer pointer */
+    };
 /** Beamforming waights for single stream for each PRBs  given number of Antenna elements */
 struct xran_cp_bf_weight{
     int16_t nAntElmTRx;        /**< num TRX for this allocation */
+    int16_t  ext_section_sz;   /**< extType section size */
     int8_t*  p_ext_start;      /**< pointer to start of buffer for full C-plane packet */
     int8_t*  p_ext_section;    /**< pointer to form extType */
-    int16_t  ext_section_sz;   /**< extType section size */
+
+    /* For ext 11 */
+    uint8_t     bfwCompMeth;    /* Compression Method for BFW */
+    uint8_t     bfwIqWidth;     /* Bitwidth of BFW */
+    uint8_t     numSetBFWs;     /* Total number of beam forming weights set (L) */
+    uint8_t     numBundPrb;     /* This parameter is the number of bundled PRBs per beamforming weights, 0 means to use ext1 */
+    uint8_t     RAD;
+    uint8_t     disableBFWs;
+    int16_t     maxExtBufSize;  /* Maximum space of external buffer */
+    struct xran_ext11_bfw_info bfw[XRAN_MAX_SET_BFWS];
 };
 struct xran_cp_bf_attribute{
     int16_t weight[4];
@@ -415,12 +487,13 @@ struct xran_cp_bf_precoding{
 /** section descriptor for given number of PRBs used on U-plane packet creation */
 struct xran_section_desc {
     uint16_t section_id; /**< section id used for this element */
-
-    int16_t iq_buffer_offset;    /**< Offset in bytes for the content of IQs with in main symb buffer */
-    int16_t iq_buffer_len;       /**< Length in bytes for the content of IQs with in main symb buffer */
+    uint16_t num_prbu;
+    uint16_t start_prbu;
+    int16_t iq_buffer_offset;    /**< Offset in bytes for the content of IQs with in main symbol buffer */
+    int16_t iq_buffer_len;       /**< Length in bytes for the content of IQs with in main symbol buffer */
 
     uint8_t *pData;      /**< optional pointer to data buffer */
-    void    *pCtrl;      /**< optional poitner to mbuf */
+    void    *pCtrl;      /**< optional pointer to mbuf */
 };
 
 /** PRB element structure */
@@ -433,9 +506,12 @@ struct xran_prb_elm {
     int16_t bf_weight_update; /** need to update beam weights or not */
     int16_t compMethod;  /**< compression index for given PRB */
     int16_t iqWidth;     /**< compression bit width for given PRB */
+    uint16_t ScaleFactor;  /**< scale factor for modulation compression */
+    int16_t reMask;   /**< 12-bit RE Mask for modulation compression */
     int16_t BeamFormingType; /**< index based, weights based or attribute based beam forming*/
+    int16_t nSecDesc[XRAN_NUM_OF_SYMBOL_PER_SLOT]; /**<  number of section descriptors per symbol */
 
-    struct xran_section_desc * p_sec_desc[XRAN_NUM_OF_SYMBOL_PER_SLOT]; /**< section desctiptors to U-plane data given RBs */
+    struct xran_section_desc * p_sec_desc[XRAN_NUM_OF_SYMBOL_PER_SLOT][XRAN_MAX_FRAGMENT]; /**< section desctiptors to U-plane data given RBs */
     struct xran_cp_bf_weight   bf_weight; /**< beam forming information relevant for given RBs */
 
     union {
@@ -449,14 +525,12 @@ struct xran_prb_map {
     uint8_t   dir;        /**< DL or UL direction */
     uint8_t   xran_port;  /**< xran id of given RU [0-(XRAN_PORTS_NUM-1)] */
     uint16_t  band_id;    /**< xran band id */
-    uint16_t  cc_id;      /**< componnent carrier id [0 - (XRAN_MAX_SECTOR_NR-1)] */
+    uint16_t  cc_id;      /**< component carrier id [0 - (XRAN_MAX_SECTOR_NR-1)] */
     uint16_t  ru_port_id; /**< RU device antenna port id [0 - (XRAN_MAX_ANTENNA_NR-1) */
     uint16_t  tti_id;     /**< xRAN slot id [0 - (max tti-1)] */
     uint8_t   start_sym_id;     /**< start symbol Id [0-13] */
-    uint32_t  nPrbElm;    /**< total number of PRB elements for given map [0- (XRAN_MAX_PRBS-1)] */
-    struct xran_prb_elm prbMap[XRAN_MAX_PRBS];
-
-
+    uint32_t  nPrbElm;    /**< total number of PRB elements for given map [0- (XRAN_MAX_SECTIONS_PER_SLOT-1)] */
+    struct xran_prb_elm prbMap[1];
 };
 
 /* PRACH config required for XRAN based FH */
@@ -475,6 +549,15 @@ struct xran_prach_config
     uint16_t     nPrachFreqStart;  /**< PRACH prach-frequency-start  */
     int32_t      nPrachFreqOffset; /**< PRACH prach-frequency-offset */
     uint8_t      nPrachFilterIdx;  /**< PRACH Filter index */
+
+    /* Return values after initialization */
+    uint8_t    startSymId;
+    uint8_t    lastSymId;
+    uint16_t   startPrbc;
+    uint8_t    numPrbc;
+    uint16_t   timeOffset;
+    int32_t    freqOffset;
+    uint8_t    eAxC_offset;
 };
 
 /**< SRS configuration required for XRAN based FH */
@@ -520,6 +603,8 @@ struct xran_ru_config {
     enum xran_comp_hdr_type xranCompHdrType;   /**< dynamic or static udCompHdr handling*/
     uint8_t                 iqWidth;           /**< IQ bit width */
     uint8_t                 compMeth;      /**< Compression method */
+    uint8_t                 iqWidth_PRACH;           /**< IQ bit width for PRACH */
+    uint8_t                 compMeth_PRACH;      /**< Compression method for PRACH */    
     uint8_t                 fftSize;       /**< FFT Size */
     enum xran_input_byte_order byteOrder; /**< Order of bytes in int16_t in buffer. Big or little endian */
     enum xran_input_i_q_order  iqOrder;   /**< order of IQs in the buffer */
@@ -542,11 +627,42 @@ struct xran_fh_config {
     uint16_t            nULRBs;      /**< UL PRB  */
     uint32_t            nDLAbsFrePointA; /**< Abs Freq Point A of the Carrier Center Frequency for in KHz Value: 450000->52600000 */
     uint32_t            nULAbsFrePointA; /**< Abs Freq Point A of the Carrier Center Frequency for in KHz Value: 450000->52600000 */
-    uint32_t            nDLCenterFreqARFCN;   /**< center frerquency for DL in MHz */
-    uint32_t            nULCenterFreqARFCN;   /**< center frerquency for UL in MHz */
+    uint32_t            nDLCenterFreqARFCN;   /**< center frequency for DL in MHz */
+    uint32_t            nULCenterFreqARFCN;   /**< center frequency for UL in MHz */
     xran_fh_tti_callback_fn     ttiCb;        /**< call back for TTI event */
     void                *ttiCbParam;  /**< parameters of call back function */
 
+    uint16_t Tadv_cp_dl;    /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t T2a_min_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t T2a_max_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t T2a_min_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t T2a_max_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t T2a_min_up;    /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t T2a_max_up;    /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t Ta3_min;       /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t Ta3_max;       /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t T1a_min_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t T1a_max_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t T1a_min_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t T1a_max_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t T1a_min_up;    /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t T1a_max_up;    /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t Ta4_min;       /**< Table 2 7 : xRAN Delay Management Model Parameters */
+    uint16_t Ta4_max;       /**< Table 2 7 : xRAN Delay Management Model Parameters */
+
+    uint8_t enableCP;       /**<  enable C-plane */
+    uint8_t prachEnable;    /**<  enable PRACH   */
+    uint8_t srsEnable;      /**<  enable SRS (Cat B specific) */
+    uint8_t puschMaskEnable;/**< enable pusch mask> */
+    uint8_t puschMaskSlot;  /**< specific which slot pusch channel masked> */
+    uint8_t cp_vlan_tag;    /**<  C-plane vlan tag */
+    uint8_t up_vlan_tag;    /**<  U-plane vlan tag */
+    int32_t debugStop;      /**<  enable auto stop */
+    int32_t debugStopCount;      /**<  enable auto stop after number of Tx packets */
+    int32_t DynamicSectionEna; /**<  enable dynamic C-Plane section allocation */
+    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)
+    int32_t GPS_Beta;   //beta value as defined in section 9.7.2 of ORAN spec. range -32767 ~ +32767
+
     struct xran_prach_config     prach_conf;   /**< PRACH specific configurations for FH */
     struct xran_srs_config       srs_conf;     /**< SRS specific configurations for FH */
     struct xran_frame_config     frame_conf;   /**< frame config */
@@ -562,6 +678,9 @@ struct xran_fh_config {
     uint16_t rx_up_eAxC2Vf[XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR*2 + XRAN_MAX_ANT_ARRAY_ELM_NR]; /**< mapping of C-Plane (ecpriRtcid) or U-Plane (ecpriPcid) to VF */
 
     uint32_t log_level; /**< configuration of log level */
+
+    uint16_t max_sections_per_slot; /**< M-Plane settings for section */
+    uint16_t max_sections_per_symbol; /**< M-Plane settings for section */
 };
 
 /**
@@ -586,6 +705,7 @@ struct xran_common_counters{
     uint64_t rx_pusch_packets[XRAN_MAX_ANTENNA_NR];
     uint64_t rx_prach_packets[XRAN_MAX_ANTENNA_NR];
     uint64_t rx_srs_packets;
+
 };
 
 /**
@@ -605,23 +725,16 @@ typedef void * xran_cc_handle_t;
  *****************************************************************************/
 struct xran_flat_buffer
 {
-    uint32_t nElementLenInBytes;
-    /**< The Element length specified in bytes.
+    uint32_t nElementLenInBytes; /**< The Element length specified in bytes.
      * This parameter specifies the size of a single element in the buffer.
      * The total size of the buffer is described as
      * bufferSize = nElementLenInBytes * nNumberOfElements */
-    uint32_t nNumberOfElements;
-    /**< The number of elements in the physical contiguous memory segment */
-    uint32_t nOffsetInBytes;
-    /**< Offset in bytes to the start of the data in the physical contiguous
+    uint32_t nNumberOfElements;  /**< The number of elements in the physical contiguous memory segment */
+    uint32_t nOffsetInBytes;     /**< Offset in bytes to the start of the data in the physical contiguous
      * memory segment */
     uint32_t nIsPhyAddr;
-    uint8_t *pData;
-    /**< The data pointer is a virtual address, however the actual data pointed
-     * to is required to be in contiguous physical memory unless the field
-     requiresPhysicallyContiguousMemory in CpaInstanceInfo is false. */
-    void *pCtrl;
-    /**< pointer to control section coresponding to data buffer */
+    uint8_t *pData;  /**< The data pointer is a virtual address */
+    void *pCtrl;     /**< pointer to control section coresponding to data buffer */
 };
 
 /**
@@ -634,30 +747,13 @@ struct xran_flat_buffer
  *      structure will be used where more than one flat buffer can be provided
  *      on a particular API.
  *
- *      IMPORTANT - The memory for the pPrivateMetaData member must be allocated
- *      by the client as contiguous memory.  When allocating memory for
- *      pPrivateMetaData a call to cpaCyBufferListGetMetaSize MUST be made to
- *      determine the size of the Meta Data Buffer.  The returned size
- *      (in bytes) may then be passed in a memory allocation routine to allocate
- *      the pPrivateMetaData memory.
- *
  *****************************************************************************/
 struct xran_buffer_list
 {
-    uint32_t nNumBuffers;
-    /**< Number of pointers */
+    uint32_t nNumBuffers; /**< Number of pointers */
     struct xran_flat_buffer *pBuffers;
-    /**< Pointer to an unbounded array containing the number of CpaFlatBuffers
-     * defined by nNumBuffers */
     void *pUserData;
-    /**< This is an opaque field that is not read or modified internally. */
     void *pPrivateMetaData;
-    /**< Private Meta representation of this buffer List - the memory for this
-     * buffer needs to be allocated by the client as contiguous data.
-     * The amount of memory required is returned with a call to
-     * cpaCyBufferListGetMetaSize. If cpaCyBufferListGetMetaSize returns a size
-     * of zero no memory needs to be allocated, and this parameter can be NULL.
-     */
 };
 
 /**
@@ -694,7 +790,7 @@ int32_t xran_init(int argc, char *argv[], struct xran_fh_init *p_xran_fh_init, c
  * @return
  *   0 - on success
  */
-int32_t xran_sector_get_instances (void * pHandle, uint16_t nNumInstances,
+int32_t xran_sector_get_instances (uint32_t xran_port, void * pDevHandle, uint16_t nNumInstances,
                xran_cc_handle_t * pSectorInstanceHandles);
 
 /**
@@ -838,6 +934,7 @@ int32_t xran_mm_destroy (void * pHandle);
  */
 int32_t xran_5g_prach_req (void *  pHandle,
                 struct xran_buffer_list *pDstBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],
+                struct xran_buffer_list *pDstBufferDecomp[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],                
                 xran_transport_callback_fn pCallback,
                 void *pCallbackTag);
 
@@ -861,6 +958,7 @@ int32_t xran_5g_prach_req (void *  pHandle,
  */
 int32_t xran_5g_srs_req (void *  pHandle,
                 struct xran_buffer_list *pDstBuffer[XRAN_MAX_ANT_ARRAY_ELM_NR][XRAN_N_FE_BUF_LEN],
+                struct xran_buffer_list *pDstCpBuffer[XRAN_MAX_ANT_ARRAY_ELM_NR][XRAN_N_FE_BUF_LEN],
                 xran_transport_callback_fn pCallback,
                 void *pCallbackTag);
 
@@ -882,7 +980,7 @@ int32_t xran_5g_srs_req (void *  pHandle,
  * @return
  *   0 - on success
  */
-uint32_t xran_get_time_stats(uint64_t *total_time, uint64_t *used_time, uint32_t *core_used, uint32_t clear);
+uint32_t xran_get_time_stats(uint64_t *total_time, uint64_t *used_time, uint32_t *num_core_used, uint32_t *core_used, uint32_t clear);
 
 /**
  * @ingroup xran
@@ -947,18 +1045,19 @@ int32_t xran_close(void *pHandle);
  *   Pointer to XRAN layer handle for given CC
  * @param symCb
  *   pointer to callback function
- * @param symCb
+ * @param symCbParam
  *   pointer to Callback Function parameters
  * @param symb
  *   symbol to be register for
- * @param ant
- *   Antenna number to trigger callback for packet arrival
+ * @param cb_per_sym_type_id
+ *   call back time identification (see enum cb_per_sym_type_id)
  *
  * @return
  *    0 - in case of success
  *   -1 - in case of failure
  */
-int32_t xran_reg_sym_cb(void *pHandle, xran_callback_sym_fn symCb, void * symCbParam, uint8_t symb, uint8_t ant);
+int32_t xran_reg_sym_cb(void *pHandle, xran_callback_sym_fn symCb, void * symCbParam, struct xran_sense_of_time* symCbTime,  uint8_t symb, enum cb_per_sym_type_id cb_sym_t_id);
+
 
 /**
  * @ingroup xran
@@ -1003,7 +1102,26 @@ int32_t xran_reg_physide_cb(void *pHandle, xran_fh_tti_callback_fn Cb, void *cbP
  * @return
  *   current TTI number [0-7999]
  */
-int32_t xran_get_slot_idx (uint32_t *nFrameIdx, uint32_t *nSubframeIdx,  uint32_t *nSlotIdx, uint64_t *nSecond);
+int32_t xran_get_slot_idx (uint32_t PortId, uint32_t *nFrameIdx, uint32_t *nSubframeIdx,  uint32_t *nSlotIdx, uint64_t *nSecond);
+
+/**
+ * @ingroup xran
+ *
+ *   Function returns whether it is a prach slot or not based on given port and slot number
+ *
+ * @param PortId
+ *    xRAN Port Id
+ *
+ * @param subframe_id
+ *    Subframe number [0-9]
+ *
+ * @param slot_id
+ *    Pointer to Slot number [0-7]
+ *
+ * @return
+ *   whether it is a prach slot or not
+ */
+int32_t xran_is_prach_slot(uint8_t PortId, uint32_t subframe_id, uint32_t slot_id);
 
 /**
  * @ingroup xran
@@ -1089,6 +1207,20 @@ uint8_t* xran_add_hdr_offset(uint8_t  *dst, int16_t compMethod);
  */
 uint8_t  *xran_add_cp_hdr_offset(uint8_t  *dst);
 
+/**
+ * @ingroup xran
+ *
+ *   Debug function to trigger stop on 1pps (GPS second) boundary
+ *
+ * @param value
+ *   1 - enable stop
+ *   0 - disable stop
+ * @param count
+ *   enable auto stop after number of Tx packets
+ * @return
+ *    0 - on success
+ */
+int32_t xran_set_debug_stop(int32_t value, int32_t count);
 #ifdef __cplusplus
 }
 #endif