o-du/phy
Intel O-RAN/X-RAN Generated Doxygen Documentation
Data Structures | Macros | Functions | Variables
xran_main.c File Reference

XRAN main functionality module. More...

#include <sched.h>
#include <assert.h>
#include <err.h>
#include <libgen.h>
#include <sys/time.h>
#include <sys/queue.h>
#include <time.h>
#include <unistd.h>
#include <stdio.h>
#include <pthread.h>
#include <malloc.h>
#include <rte_common.h>
#include <rte_eal.h>
#include <rte_errno.h>
#include <rte_lcore.h>
#include <rte_cycles.h>
#include <rte_memory.h>
#include <rte_memzone.h>
#include <rte_mbuf.h>
#include <rte_ring.h>
#include "xran_fh_o_du.h"
#include "ethdi.h"
#include "xran_pkt.h"
#include "xran_up_api.h"
#include "xran_cp_api.h"
#include "xran_sync_api.h"
#include "xran_lib_mlog_tasks_id.h"
#include "xran_timer.h"
#include "xran_common.h"
#include "xran_frame_struct.h"
#include "xran_printf.h"
#include "xran_app_frag.h"
#include "xran_mlog_lnx.h"
Include dependency graph for xran_main.c:

Go to the source code of this file.

Data Structures

struct  xran_timer_ctx
 

Macros

#define _GNU_SOURCE
 
#define DIV_ROUND_OFFSET(X, Y)   ( X/Y + ((X%Y)?1:0) )
 
#define XranOffsetSym(offSym, otaSym, numSymTotal)
 
#define MAX_NUM_OF_XRAN_CTX   (2)
 
#define XranIncrementCtx(ctx)   ((ctx >= (MAX_NUM_OF_XRAN_CTX-1)) ? 0 : (ctx+1))
 
#define XranDecrementCtx(ctx)   ((ctx == 0) ? (MAX_NUM_OF_XRAN_CTX-1) : (ctx-1))
 
#define MAX_NUM_OF_DPDK_TIMERS   (10)
 
#define DpdkTimerIncrementCtx(ctx)   ((ctx >= (MAX_NUM_OF_DPDK_TIMERS-1)) ? 0 : (ctx+1))
 
#define DpdkTimerDecrementCtx(ctx)   ((ctx == 0) ? (MAX_NUM_OF_DPDK_TIMERS-1) : (ctx-1))
 
#define UNIX_TO_GPS_SECONDS_OFFSET   315964782UL
 
#define NUM_OF_FRAMES_PER_SECOND   100
 

Functions

void xran_timer_arm (struct rte_timer *tim, void *arg)
 
int32_t xran_process_tx_sym (void *arg)
 
int32_t xran_process_rx_sym (void *arg, struct rte_mbuf *mbuf, void *iq_data_start, uint16_t size, uint8_t CC_ID, uint8_t Ant_ID, uint8_t frame_id, uint8_t subframe_id, uint8_t slot_id, uint8_t symb_id, uint16_t num_prbu, uint16_t start_prbu, uint16_t sym_inc, uint16_t rb, uint16_t sect_id, uint32_t *mb_free)
 
int32_t xran_process_prach_sym (void *arg, struct rte_mbuf *mbuf, void *iq_data_start, uint16_t size, uint8_t CC_ID, uint8_t Ant_ID, uint8_t frame_id, uint8_t subframe_id, uint8_t slot_id, uint8_t symb_id, uint16_t num_prbu, uint16_t start_prbu, uint16_t sym_inc, uint16_t rb, uint16_t sect_id, uint32_t *mb_free)
 
int32_t xran_process_srs_sym (void *arg, struct rte_mbuf *mbuf, void *iq_data_start, uint16_t size, uint8_t CC_ID, uint8_t Ant_ID, uint8_t frame_id, uint8_t subframe_id, uint8_t slot_id, uint8_t symb_id, uint16_t num_prbu, uint16_t start_prbu, uint16_t sym_inc, uint16_t rb, uint16_t sect_id, uint32_t *mb_free)
 
void tti_ota_cb (struct rte_timer *tim, void *arg)
 
void tti_to_phy_cb (struct rte_timer *tim, void *arg)
 
void xran_timer_arm_ex (struct rte_timer *tim, void *CbFct, void *CbArg, unsigned tim_lcore)
 
void xran_updateSfnSecStart (void)
 
struct xran_device_ctxxran_dev_get_ctx (void)
 
uint16_t xran_get_beamid (void *pHandle, uint8_t dir, uint8_t cc_id, uint8_t ant_id, uint8_t slot_id)
 
enum xran_if_state xran_get_if_state (void)
 
int xran_is_prach_slot (uint32_t subframe_id, uint32_t slot_id)
 
int xran_init_sectionid (void *pHandle)
 
int xran_init_srs (struct xran_fh_config *pConf, struct xran_device_ctx *p_xran_dev_ctx)
 
int xran_init_prach (struct xran_fh_config *pConf, struct xran_device_ctx *p_xran_dev_ctx)
 
uint16_t xran_alloc_sectionid (void *pHandle, uint8_t dir, uint8_t cc_id, uint8_t ant_id, uint8_t slot_id)
 
int xran_init_seqid (void *pHandle)
 
int process_cplane (struct rte_mbuf *pkt)
 
void sym_ota_cb (struct rte_timer *tim, void *arg, unsigned long *used_tick)
 
int xran_cp_create_and_send_section (void *pHandle, uint8_t ru_port_id, int dir, int tti, int cc_id, struct xran_prb_map *prbMap, enum xran_category category, uint8_t ctx_id)
 
void tx_cp_dl_cb (struct rte_timer *tim, void *arg)
 
void rx_ul_deadline_half_cb (struct rte_timer *tim, void *arg)
 
void rx_ul_deadline_full_cb (struct rte_timer *tim, void *arg)
 
void tx_cp_ul_cb (struct rte_timer *tim, void *arg)
 
void ul_up_full_slot_cb (struct rte_timer *tim, void *arg)
 
int xran_timing_source_thread (void *args)
 
int handle_ecpri_ethertype (struct rte_mbuf *pkt, uint64_t rx_time)
 
int32_t xran_pkt_validate (void *arg, struct rte_mbuf *mbuf, void *iq_data_start, uint16_t size, uint8_t CC_ID, uint8_t Ant_ID, uint8_t frame_id, uint8_t subframe_id, uint8_t slot_id, uint8_t symb_id, struct ecpri_seq_id *seq_id, uint16_t num_prbu, uint16_t start_prbu, uint16_t sym_inc, uint16_t rb, uint16_t sect_id)
 
int32_t xran_process_tx_sym_cp_off (uint8_t ctx_id, uint32_t tti, int32_t cc_id, int32_t ant_id, uint32_t frame_id, uint32_t subframe_id, uint32_t slot_id, uint32_t sym_id, int32_t do_srs)
 
int32_t xran_process_tx_sym_cp_on (uint8_t ctx_id, uint32_t tti, int32_t cc_id, int32_t ant_id, uint32_t frame_id, uint32_t subframe_id, uint32_t slot_id, uint32_t sym_id)
 
int xran_packet_and_dpdk_timer_thread (void *args)
 
int32_t xran_init (int argc, char *argv[], struct xran_fh_init *p_xran_fh_init, char *appName, void **pXranLayerHandle)
 
int32_t xran_sector_get_instances (void *pDevHandle, uint16_t nNumInstances, xran_cc_handle_t *pSectorInstanceHandles)
 
int32_t xran_mm_init (void *pHandle, uint64_t nMemorySize, uint32_t nMemorySegmentSize)
 
int32_t xran_bm_init (void *pHandle, uint32_t *pPoolIndex, uint32_t nNumberOfBuffers, uint32_t nBufferSize)
 
int32_t xran_bm_allocate_buffer (void *pHandle, uint32_t nPoolIndex, void **ppData, void **ppCtrl)
 
int32_t xran_bm_free_buffer (void *pHandle, void *pData, void *pCtrl)
 
int32_t xran_5g_fronthault_config (void *pHandle, struct xran_buffer_list *pSrcBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN], struct xran_buffer_list *pSrcCpBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN], struct xran_buffer_list *pDstBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN], struct xran_buffer_list *pDstCpBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN], xran_transport_callback_fn pCallback, void *pCallbackTag)
 
int32_t xran_5g_prach_req (void *pHandle, struct xran_buffer_list *pDstBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN], xran_transport_callback_fn pCallback, void *pCallbackTag)
 
int32_t xran_5g_srs_req (void *pHandle, struct xran_buffer_list *pDstBuffer[XRAN_MAX_ANT_ARRAY_ELM_NR][XRAN_N_FE_BUF_LEN], xran_transport_callback_fn pCallback, void *pCallbackTag)
 
uint32_t xran_get_time_stats (uint64_t *total_time, uint64_t *used_time, uint32_t *core_used, uint32_t clear)
 
void * xran_malloc (size_t buf_len)
 
uint8_t * xran_add_hdr_offset (uint8_t *dst, int16_t compMethod)
 
int32_t xran_open (void *pHandle, struct xran_fh_config *pConf)
 
int32_t xran_start (void *pHandle)
 
int32_t xran_stop (void *pHandle)
 
int32_t xran_close (void *pHandle)
 
int32_t xran_mm_destroy (void *pHandle)
 
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_physide_cb (void *pHandle, xran_fh_tti_callback_fn Cb, void *cbParam, int skipTtiNum, enum callback_to_phy_id id)
 
int xran_register_cb_mbuf2ring (xran_ethdi_mbuf_send_fn mbuf_send_cp, xran_ethdi_mbuf_send_fn mbuf_send_up)
 
int32_t xran_get_slot_idx (uint32_t *nFrameIdx, uint32_t *nSubframeIdx, uint32_t *nSlotIdx, uint64_t *nSecond)
 
struct xran_eaxcid_configxran_get_conf_eAxC (void *pHandle)
 Get the configuration of eAxC ID. More...
 
uint8_t xran_get_conf_num_bfweights (void *pHandle)
 Get the configuration of the total number of beamforming weights on RU. More...
 
uint8_t xran_get_conf_prach_scs (void *pHandle)
 Get the configuration of subcarrier spacing for PRACH. More...
 
uint8_t xran_get_conf_fftsize (void *pHandle)
 Get the configuration of FFT size for RU. More...
 
uint8_t xran_get_conf_numerology (void *pHandle)
 Get the configuration of nummerology. More...
 
uint8_t xran_get_conf_iqwidth (void *pHandle)
 Get the configuration of IQ bit width for RU. More...
 
uint8_t xran_get_conf_compmethod (void *pHandle)
 Get the configuration of compression method for RU. More...
 
uint8_t xran_get_num_cc (void *pHandle)
 Get the configuration of the number of component carriers. More...
 
uint8_t xran_get_num_eAxc (void *pHandle)
 Get the configuration of the number of antenna for UL. More...
 
enum xran_category xran_get_ru_category (void *pHandle)
 Get configuration of O-RU (Cat A or Cat B) More...
 
uint8_t xran_get_num_eAxcUl (void *pHandle)
 Get the configuration of the number of antenna. More...
 
uint8_t xran_get_num_ant_elm (void *pHandle)
 Get the configuration of the number of antenna elements. More...
 
int32_t xran_get_common_counters (void *pXranLayerHandle, struct xran_common_counters *pStats)
 

Variables

struct xran_timer_ctx timer_ctx [MAX_NUM_OF_XRAN_CTX]
 
uint64_t interval_us = 1000
 
uint32_t xran_lib_ota_tti = 0
 
uint32_t xran_lib_ota_sym = 0
 
uint32_t xran_lib_ota_sym_idx = 0
 
uint16_t xran_SFN_at_Sec_Start = 0
 
uint16_t xran_max_frame = 1023
 

Detailed Description

XRAN main functionality module.

Author
Intel Corporation

Definition in file xran_main.c.

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 26 of file xran_main.c.

◆ DIV_ROUND_OFFSET

#define DIV_ROUND_OFFSET (   X,
 
)    ( X/Y + ((X%Y)?1:0) )

Definition at line 65 of file xran_main.c.

◆ DpdkTimerDecrementCtx

#define DpdkTimerDecrementCtx (   ctx)    ((ctx == 0) ? (MAX_NUM_OF_DPDK_TIMERS-1) : (ctx-1))

Definition at line 79 of file xran_main.c.

◆ DpdkTimerIncrementCtx

#define DpdkTimerIncrementCtx (   ctx)    ((ctx >= (MAX_NUM_OF_DPDK_TIMERS-1)) ? 0 : (ctx+1))

Definition at line 78 of file xran_main.c.

◆ MAX_NUM_OF_DPDK_TIMERS

#define MAX_NUM_OF_DPDK_TIMERS   (10)

Definition at line 77 of file xran_main.c.

◆ MAX_NUM_OF_XRAN_CTX

#define MAX_NUM_OF_XRAN_CTX   (2)

Definition at line 73 of file xran_main.c.

◆ NUM_OF_FRAMES_PER_SECOND

#define NUM_OF_FRAMES_PER_SECOND   100

Definition at line 91 of file xran_main.c.

◆ UNIX_TO_GPS_SECONDS_OFFSET

#define UNIX_TO_GPS_SECONDS_OFFSET   315964782UL

Definition at line 90 of file xran_main.c.

◆ XranDecrementCtx

#define XranDecrementCtx (   ctx)    ((ctx == 0) ? (MAX_NUM_OF_XRAN_CTX-1) : (ctx-1))

Definition at line 75 of file xran_main.c.

◆ XranIncrementCtx

#define XranIncrementCtx (   ctx)    ((ctx >= (MAX_NUM_OF_XRAN_CTX-1)) ? 0 : (ctx+1))

Definition at line 74 of file xran_main.c.

◆ XranOffsetSym

#define XranOffsetSym (   offSym,
  otaSym,
  numSymTotal 
)
Value:
(((int32_t)offSym > (int32_t)otaSym) ? \
((int32_t)otaSym + ((int32_t)numSymTotal) - (uint32_t)offSym) : \
(((int32_t)otaSym - (int32_t)offSym) >= numSymTotal) ? \
(((int32_t)otaSym - (int32_t)offSym) - numSymTotal) : \
((int32_t)otaSym - (int32_t)offSym))

Definition at line 67 of file xran_main.c.

Function Documentation

◆ handle_ecpri_ethertype()

int handle_ecpri_ethertype ( struct rte_mbuf *  pkt,
uint64_t  rx_time 
)

Definition at line 1342 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_cplane()

int process_cplane ( struct rte_mbuf *  pkt)

Definition at line 571 of file xran_main.c.

Here is the caller graph for this function:

◆ rx_ul_deadline_full_cb()

void rx_ul_deadline_full_cb ( struct rte_timer *  tim,
void *  arg 
)

Definition at line 999 of file xran_main.c.

Here is the call graph for this function:

◆ rx_ul_deadline_half_cb()

void rx_ul_deadline_half_cb ( struct rte_timer *  tim,
void *  arg 
)

Definition at line 963 of file xran_main.c.

Here is the call graph for this function:

◆ sym_ota_cb()

void sym_ota_cb ( struct rte_timer *  tim,
void *  arg,
unsigned long *  used_tick 
)

Definition at line 582 of file xran_main.c.

Here is the call graph for this function:

◆ tti_ota_cb()

void tti_ota_cb ( struct rte_timer *  tim,
void *  arg 
)

Definition at line 632 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tti_to_phy_cb()

void tti_to_phy_cb ( struct rte_timer *  tim,
void *  arg 
)

Definition at line 1136 of file xran_main.c.

Here is the call graph for this function:

◆ tx_cp_dl_cb()

void tx_cp_dl_cb ( struct rte_timer *  tim,
void *  arg 
)

Definition at line 910 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tx_cp_ul_cb()

void tx_cp_ul_cb ( struct rte_timer *  tim,
void *  arg 
)

Definition at line 1045 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ul_up_full_slot_cb()

void ul_up_full_slot_cb ( struct rte_timer *  tim,
void *  arg 
)

Definition at line 1129 of file xran_main.c.

◆ xran_5g_fronthault_config()

int32_t xran_5g_fronthault_config ( void *  pHandle,
struct xran_buffer_list pSrcBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],
struct xran_buffer_list pSrcCpBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],
struct xran_buffer_list pDstBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],
struct xran_buffer_list pDstCpBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],
xran_transport_callback_fn  pCallback,
void *  pCallbackTag 
)

Function configures TX(DL) and RX(UL) output buffers and callback (UL only) for XRAN layer with given handle

Parameters
pHandlePointer to XRAN layer handle for given CC
pSrcBufferlist of memory buffers to use to fetch IQs from PHY to XRAN layer (DL)
pSrcCpBufferlist of memory buffers to use to configure C-plane (DL)
pDstBufferlist of memory buffers to use to deliver IQs from XRAN layer to PHY (UL)
pDstCpBufferlist of memory buffers to use to configure C-plane (UL)
xran_transport_callback_fnpCallback Callback function to call with arrival of all packets for given CC for given symbol
pCallbackTagParameters of Callback function
Returns
0 - on success -1 - on error

Definition at line 2551 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_5g_prach_req()

int32_t xran_5g_prach_req ( void *  pHandle,
struct xran_buffer_list pDstBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],
xran_transport_callback_fn  pCallback,
void *  pCallbackTag 
)

Function configures PRACH output buffers and callback for XRAN layer with given handle

Parameters
pHandlePointer to XRAN layer handle for given CC
pDstBufferlist of memory buffers to use to deliver PRACH IQs from xran layer to PHY
xran_transport_callback_fnpCallback Callback function to call with arrival of PRACH packets for given CC
pCallbackTagParameters of Callback function
Returns
0 - on success -1 - on error

Definition at line 2636 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_5g_srs_req()

int32_t xran_5g_srs_req ( void *  pHandle,
struct xran_buffer_list pDstBuffer[XRAN_MAX_ANT_ARRAY_ELM_NR][XRAN_N_FE_BUF_LEN],
xran_transport_callback_fn  pCallback,
void *  pCallbackTag 
)

Function configures SRS output buffers and callback for XRAN layer with given handle

Parameters
pHandlePointer to XRAN layer handle for given CC
pDstBufferlist of memory buffers to use to deliver SRS IQs from xran layer to PHY
xran_transport_callback_fnpCallback Callback function to call with arrival of SRS packets for given CC
pCallbackTagParameters of Callback function
Returns
0 - on success -1 - on error

Definition at line 2679 of file xran_main.c.

Here is the call graph for this function:

◆ xran_add_hdr_offset()

uint8_t* xran_add_hdr_offset ( uint8_t *  dst,
int16_t  compMethod 
)

Function calculates offset for ptr according to ORAN headers requared

Parameters
dstpointer to be addjusted compression method according to enum xran_compression_method
Returns
ptr - pointer to payload given header requared

Definition at line 2741 of file xran_main.c.

◆ xran_alloc_sectionid()

uint16_t xran_alloc_sectionid ( void *  pHandle,
uint8_t  dir,
uint8_t  cc_id,
uint8_t  ant_id,
uint8_t  slot_id 
)
inline

Definition at line 379 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_bm_allocate_buffer()

int32_t xran_bm_allocate_buffer ( void *  pHandle,
uint32_t  nPoolIndex,
void **  ppData,
void **  ppCtrl 
)

Function allocates buffer used between XRAN layer and PHY. In general case it's DPDK mbuf.

Parameters
pHandlePointer to XRAN layer handle for given CC
nPoolIndexbuffer pool identification
ppDataPointer to pointer where to store address of new buffer
ppCtrlPointer to pointer where to store address of internal private control information
Returns
0 - on success

Definition at line 2499 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_bm_free_buffer()

int32_t xran_bm_free_buffer ( void *  pHandle,
void *  pData,
void *  pCtrl 
)

Function frees buffer used between XRAN layer and PHY. In general case it's DPDK mbuf

Parameters
pHandlePointer to XRAN layer handle for given CC
pDataPointer to buffer
pDataPointer to internal private control information
Returns
0 - on success

Definition at line 2541 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_bm_init()

int32_t xran_bm_init ( void *  pHandle,
uint32_t *  pPoolIndex,
uint32_t  nNumberOfBuffers,
uint32_t  nBufferSize 
)

Function allocates buffer memory (bm) used between XRAN layer and PHY. In general case it's DPDK mbuf. it uses Memory Management system to get memory chunk and define memory pool on top of it.

Parameters
pHandlePointer to XRAN layer handle for given CC
nPoolIndexpointer to buffer pool identification to be returned
nNumberOfBuffersnumber of buffer to allocate in the pool
nBufferSizebuffer size to allocate
Returns
0 - on success

Definition at line 2454 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_close()

int32_t xran_close ( void *  pHandle)

Function closes XRAN layer with given handle

Parameters
pHandlePointer to XRAN layer handle for given CC
Returns
0 - on success

Definition at line 2863 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_cp_create_and_send_section()

int xran_cp_create_and_send_section ( void *  pHandle,
uint8_t  ru_port_id,
int  dir,
int  tti,
int  cc_id,
struct xran_prb_map prbMap,
enum xran_category  category,
uint8_t  ctx_id 
)

Definition at line 737 of file xran_main.c.

Here is the call graph for this function:

◆ xran_dev_get_ctx()

struct xran_device_ctx* xran_dev_get_ctx ( void  )

Definition at line 223 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_beamid()

uint16_t xran_get_beamid ( void *  pHandle,
uint8_t  dir,
uint8_t  cc_id,
uint8_t  ant_id,
uint8_t  slot_id 
)

Definition at line 233 of file xran_main.c.

◆ xran_get_common_counters()

int32_t xran_get_common_counters ( void *  pXranLayerHandle,
struct xran_common_counters pStats 
)

Function retrun XRAN layer common counters for given handle

Parameters
pHandlePointer to XRAN layer handle for given CC
pStatsPointer to pointer of common counter structure
Returns
0 - on success

Definition at line 3074 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_conf_compmethod()

uint8_t xran_get_conf_compmethod ( void *  pHandle)
inline

Get the configuration of compression method for RU.

Returns
Compression method for RU

Definition at line 3018 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_conf_eAxC()

struct xran_eaxcid_config* xran_get_conf_eAxC ( void *  pHandle)

Get the configuration of eAxC ID.

Returns
the pointer of configuration

Definition at line 2955 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_get_conf_fftsize()

uint8_t xran_get_conf_fftsize ( void *  pHandle)
inline

Get the configuration of FFT size for RU.

Returns
FFT size value for RU

Definition at line 2985 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_conf_iqwidth()

uint8_t xran_get_conf_iqwidth ( void *  pHandle)
inline

Get the configuration of IQ bit width for RU.

Returns
IQ bit width for RU

Definition at line 3005 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_conf_num_bfweights()

uint8_t xran_get_conf_num_bfweights ( void *  pHandle)
inline

Get the configuration of the total number of beamforming weights on RU.

Returns
Configured the number of beamforming weights

Definition at line 2965 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_get_conf_numerology()

uint8_t xran_get_conf_numerology ( void *  pHandle)
inline

Get the configuration of nummerology.

Returns
Configured numerology

Definition at line 2995 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_conf_prach_scs()

uint8_t xran_get_conf_prach_scs ( void *  pHandle)
inline

Get the configuration of subcarrier spacing for PRACH.

Returns
subcarrier spacing value for PRACH

Definition at line 2975 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_if_state()

enum xran_if_state xran_get_if_state ( void  )

Function returns status of operation of FH layer

Returns
XRAN_INIT - init state XRAN_RUNNING - running XRAN_STOPPED - stopped

Definition at line 238 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_num_ant_elm()

uint8_t xran_get_num_ant_elm ( void *  pHandle)
inline

Get the configuration of the number of antenna elements.

Returns
Configured the number of antenna

Definition at line 3069 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_num_cc()

uint8_t xran_get_num_cc ( void *  pHandle)
inline

Get the configuration of the number of component carriers.

Returns
Configured the number of component carriers

Definition at line 3029 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_num_eAxc()

uint8_t xran_get_num_eAxc ( void *  pHandle)
inline

Get the configuration of the number of antenna for UL.

Returns
Configured the number of antenna

Definition at line 3039 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_num_eAxcUl()

uint8_t xran_get_num_eAxcUl ( void *  pHandle)
inline

Get the configuration of the number of antenna.

Returns
Configured the number of antenna

Definition at line 3059 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_ru_category()

enum xran_category xran_get_ru_category ( void *  pHandle)
inline

Get configuration of O-RU (Cat A or Cat B)

Returns
Configured the number of antenna

Definition at line 3049 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_slot_idx()

int32_t xran_get_slot_idx ( uint32_t *  nFrameIdx,
uint32_t *  nSubframeIdx,
uint32_t *  nSlotIdx,
uint64_t *  nSecond 
)

Function returns current TTI, Frame, Subframe, Slot Number as seen "Over air" base on PTP time

Parameters
nFrameIdxPointer to Frame number [0-99]
nSubframeIdxPointer to Subframe number [0-10]
nSlotIdxPointer to Slot number [0-7]
nSecondPointer to current UTC second
Returns
current TTI number [0-7999]

Definition at line 2936 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_get_time_stats()

uint32_t xran_get_time_stats ( uint64_t *  total_time,
uint64_t *  used_time,
uint32_t *  core_used,
uint32_t  clear 
)

Function returns XRAN core utilization stats

Parameters
total_time(out) Pointer to variable to store Total time thread has been running
used_time(out) Pointer to variable to store Total time essential tasks have been running on the thread
core_used(out) Pointer to variable to store Core on which the XRAN thread is running
clear(in) If set to 1, then internal variables total_time and used_time are cleared
Returns
0 - on success

Definition at line 2721 of file xran_main.c.

◆ xran_init()

int32_t xran_init ( int  argc,
char *  argv[],
struct xran_fh_init p_xran_fh_init,
char *  appName,
void **  pHandle 
)

Initialize the XRAN Layer via DPDK.

Parameters
argcA non-negative value. If it is greater than 0, the array members for argv[0] through argv[argc] (non-inclusive) shall contain pointers to strings.
argvAn array of strings. The contents of the array, as well as the strings which are pointed to by the array, may be modified by this function.
Returns
0 - on success Error codes returned via rte_errno

Definition at line 2319 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_init_prach()

int xran_init_prach ( struct xran_fh_config pConf,
struct xran_device_ctx p_xran_dev_ctx 
)

Definition at line 308 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_init_sectionid()

int xran_init_sectionid ( void *  pHandle)

Definition at line 278 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_init_seqid()

int xran_init_seqid ( void *  pHandle)

Definition at line 400 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_init_srs()

int xran_init_srs ( struct xran_fh_config pConf,
struct xran_device_ctx p_xran_dev_ctx 
)

Definition at line 294 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_is_prach_slot()

int xran_is_prach_slot ( uint32_t  subframe_id,
uint32_t  slot_id 
)

Definition at line 243 of file xran_main.c.

Here is the call graph for this function:

◆ xran_malloc()

void* xran_malloc ( size_t  buf_len)

Function allocates memory of given size from heap

Parameters
buf_lenbuffer size
Returns
ptr - to memory buffer or NULL

Definition at line 2736 of file xran_main.c.

◆ xran_mm_destroy()

int32_t xran_mm_destroy ( void *  pHandle)

Function destroys Memory Management (MM) layer of XRAN library

Parameters
pHandlePointer to XRAN layer handle for given CC
Returns
0 - on success

Definition at line 2877 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_mm_init()

int32_t xran_mm_init ( void *  pHandle,
uint64_t  nMemorySize,
uint32_t  nMemorySegmentSize 
)

Function initialize Memory Management subsystem (mm) in order to handle memory buffers between XRAN layer and PHY.

Parameters
pHandlePointer to XRAN layer handle for given CC
nMemorySizememory size of all segments
nMemorySegmentSizesize of memory per segment
Returns
0 - on success

Definition at line 2447 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_open()

int32_t xran_open ( void *  pHandle,
struct xran_fh_config pConf 
)

Function opens XRAN layer with given handle

Parameters
pHandlePointer to XRAN layer handle for given CC
pointerto struct xran_fh_config pConf Pointer to XRAN configuration structure with specific settings to use
Returns
0 - on success

Definition at line 2756 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_packet_and_dpdk_timer_thread()

int xran_packet_and_dpdk_timer_thread ( void *  args)

Definition at line 2282 of file xran_main.c.

◆ xran_pkt_validate()

int32_t xran_pkt_validate ( void *  arg,
struct rte_mbuf *  mbuf,
void *  iq_data_start,
uint16_t  size,
uint8_t  CC_ID,
uint8_t  Ant_ID,
uint8_t  frame_id,
uint8_t  subframe_id,
uint8_t  slot_id,
uint8_t  symb_id,
struct ecpri_seq_id seq_id,
uint16_t  num_prbu,
uint16_t  start_prbu,
uint16_t  sym_inc,
uint16_t  rb,
uint16_t  sect_id 
)

Definition at line 1536 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_process_prach_sym()

int32_t xran_process_prach_sym ( void *  arg,
struct rte_mbuf *  mbuf,
void *  iq_data_start,
uint16_t  size,
uint8_t  CC_ID,
uint8_t  Ant_ID,
uint8_t  frame_id,
uint8_t  subframe_id,
uint8_t  slot_id,
uint8_t  symb_id,
uint16_t  num_prbu,
uint16_t  start_prbu,
uint16_t  sym_inc,
uint16_t  rb,
uint16_t  sect_id,
uint32_t *  mb_free 
)

Definition at line 1384 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_process_rx_sym()

int32_t xran_process_rx_sym ( void *  arg,
struct rte_mbuf *  mbuf,
void *  iq_data_start,
uint16_t  size,
uint8_t  CC_ID,
uint8_t  Ant_ID,
uint8_t  frame_id,
uint8_t  subframe_id,
uint8_t  slot_id,
uint8_t  symb_id,
uint16_t  num_prbu,
uint16_t  start_prbu,
uint16_t  sym_inc,
uint16_t  rb,
uint16_t  sect_id,
uint32_t *  mb_free 
)

Definition at line 1578 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_process_srs_sym()

int32_t xran_process_srs_sym ( void *  arg,
struct rte_mbuf *  mbuf,
void *  iq_data_start,
uint16_t  size,
uint8_t  CC_ID,
uint8_t  Ant_ID,
uint8_t  frame_id,
uint8_t  subframe_id,
uint8_t  slot_id,
uint8_t  symb_id,
uint16_t  num_prbu,
uint16_t  start_prbu,
uint16_t  sym_inc,
uint16_t  rb,
uint16_t  sect_id,
uint32_t *  mb_free 
)

Definition at line 1461 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_process_tx_sym()

int32_t xran_process_tx_sym ( void *  arg)

Definition at line 2202 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_process_tx_sym_cp_off()

int32_t xran_process_tx_sym_cp_off ( uint8_t  ctx_id,
uint32_t  tti,
int32_t  cc_id,
int32_t  ant_id,
uint32_t  frame_id,
uint32_t  subframe_id,
uint32_t  slot_id,
uint32_t  sym_id,
int32_t  do_srs 
)

Definition at line 1715 of file xran_main.c.

Here is the call graph for this function:

◆ xran_process_tx_sym_cp_on()

int32_t xran_process_tx_sym_cp_on ( uint8_t  ctx_id,
uint32_t  tti,
int32_t  cc_id,
int32_t  ant_id,
uint32_t  frame_id,
uint32_t  subframe_id,
uint32_t  slot_id,
uint32_t  sym_id 
)

Definition at line 2000 of file xran_main.c.

Here is the call graph for this function:

◆ xran_reg_physide_cb()

int32_t xran_reg_physide_cb ( void *  pHandle,
xran_fh_tti_callback_fn  Cb,
void *  cbParam,
int  skipTtiNum,
enum  callback_to_phy_id 
)

Function registers callback to XRAN layer. Function support callbacks align to OTA time. TTI even, half of slot, full slot with respect to PTP time.

Parameters
pHandlePointer to XRAN layer handle for given CC
Cbpointer to callback function
cbParampointer to Callback Function parameters
skipTtiNumnumber of calls to be skipped before first call
callback_to_phy_idcall back time identification (see enum callback_to_phy_id)
Returns
0 - in case of success -1 - in case of failure

Definition at line 2900 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_reg_sym_cb()

int32_t xran_reg_sym_cb ( void *  pHandle,
xran_callback_sym_fn  symCb,
void *  symCbParam,
uint8_t  symb,
uint8_t  ant 
)

Function registers callback to XRAN layer. Function support callbacks aligned on packet arrival.

Parameters
pHandlePointer to XRAN layer handle for given CC
symCbpointer to callback function
symCbpointer to Callback Function parameters
symbsymbol to be register for
antAntenna number to trigger callback for packet arrival
Returns
0 - in case of success -1 - in case of failure

Definition at line 2888 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_register_cb_mbuf2ring()

int xran_register_cb_mbuf2ring ( xran_ethdi_mbuf_send_fn  mbuf_send_cp,
xran_ethdi_mbuf_send_fn  mbuf_send_up 
)

Definition at line 2918 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_sector_get_instances()

int32_t xran_sector_get_instances ( void *  pHandle,
uint16_t  nNumInstances,
xran_cc_handle_t pSectorInstanceHandles 
)

Function returns handles for number of sectors supported by XRAN layer. Currently function supports one handle XRAN layer where it supports only one CC

Parameters
pHandlePointer to XRAN layer handle
nNumInstancestotal number of instances of CC
pSectorInstanceHandlesPointer to xran_cc_handle_t where to store Handle pointer
Returns
0 - on success

Definition at line 2408 of file xran_main.c.

Here is the caller graph for this function:

◆ xran_start()

int32_t xran_start ( void *  pHandle)

Function starts XRAN layer with given handle

Parameters
pHandlePointer to XRAN layer handle for given CC
Returns
0 - on success

Definition at line 2841 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_stop()

int32_t xran_stop ( void *  pHandle)

Function stops XRAN layer with given handle

Parameters
pHandlePointer to XRAN layer handle for given CC
Returns
0 - on success

Definition at line 2852 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_timer_arm()

void xran_timer_arm ( struct rte_timer *  tim,
void *  arg 
)

Definition at line 711 of file xran_main.c.

Here is the call graph for this function:

◆ xran_timer_arm_ex()

void xran_timer_arm_ex ( struct rte_timer *  tim,
void *  CbFct,
void *  CbArg,
unsigned  tim_lcore 
)

Definition at line 724 of file xran_main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xran_timing_source_thread()

int xran_timing_source_thread ( void *  args)

Definition at line 1165 of file xran_main.c.

Here is the call graph for this function:

◆ xran_updateSfnSecStart()

void xran_updateSfnSecStart ( void  )

Definition at line 201 of file xran_main.c.

Here is the call graph for this function:

Variable Documentation

◆ interval_us

uint64_t interval_us = 1000

Definition at line 109 of file xran_main.c.

◆ timer_ctx

Definition at line 103 of file xran_main.c.

◆ xran_lib_ota_sym

uint32_t xran_lib_ota_sym = 0

Symbol index in a slot [0:13]

Definition at line 112 of file xran_main.c.

◆ xran_lib_ota_sym_idx

uint32_t xran_lib_ota_sym_idx = 0

Symbol index in a second [0 : 14*(1000000/TTI)-1] where TTI is TTI interval in microseconds

Definition at line 113 of file xran_main.c.

◆ xran_lib_ota_tti

uint32_t xran_lib_ota_tti = 0

Slot index in a second [0:(1000000/TTI-1)]

Definition at line 111 of file xran_main.c.

◆ xran_max_frame

uint16_t xran_max_frame = 1023

value of max frame used. expected to be 99 (old compatibility mode) and 1023 as per section 9.7.2 System Frame Number Calculation

Definition at line 116 of file xran_main.c.

◆ xran_SFN_at_Sec_Start

uint16_t xran_SFN_at_Sec_Start = 0

SFN at current second start

Definition at line 115 of file xran_main.c.