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

XRAN layer common functionality for both O-DU and O-RU as well as C-plane and U-plane. More...

#include <assert.h>
#include <err.h>
#include <arpa/inet.h>
#include <sys/time.h>
#include <time.h>
#include "xran_common.h"
#include "ethdi.h"
#include "xran_pkt.h"
#include "xran_pkt_up.h"
#include "xran_up_api.h"
#include "xran_lib_mlog_tasks_id.h"
#include "../src/xran_printf.h"
#include <rte_mbuf.h>
#include "xran_mlog_lnx.h"
Include dependency graph for xran_common.c:

Go to the source code of this file.

Macros

#define MBUFS_CNT   16
 

Functions

int 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)
 
int 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)
 
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)
 
struct cb_elem_entryxran_create_cb (XranSymCallbackFn cb_fn, void *cb_data)
 
int xran_destroy_cb (struct cb_elem_entry *cb_elm)
 
int process_mbuf (struct rte_mbuf *pkt)
 
int32_t prepare_symbol_ex (enum xran_pkt_dir direction, uint16_t section_id, struct rte_mbuf *mb, struct rb_map *data, uint8_t compMeth, uint8_t iqWidth, const enum xran_input_byte_order iq_buf_byte_order, uint8_t frame_id, uint8_t subframe_id, uint8_t slot_id, uint8_t symbol_no, int prb_start, int prb_num, uint8_t CC_ID, uint8_t RU_Port_ID, uint8_t seq_id, uint32_t do_copy)
 
int send_symbol_ex (enum xran_pkt_dir direction, uint16_t section_id, struct rte_mbuf *mb, struct rb_map *data, const enum xran_input_byte_order iq_buf_byte_order, uint8_t frame_id, uint8_t subframe_id, uint8_t slot_id, uint8_t symbol_no, int prb_start, int prb_num, uint8_t CC_ID, uint8_t RU_Port_ID, uint8_t seq_id)
 
int send_cpmsg (void *pHandle, struct rte_mbuf *mbuf, struct xran_cp_gen_params *params, struct xran_section_gen_info *sect_geninfo, uint8_t cc_id, uint8_t ru_port_id, uint8_t seq_id)
 
int generate_cpmsg_dlul (void *pHandle, struct xran_cp_gen_params *params, struct xran_section_gen_info *sect_geninfo, struct rte_mbuf *mbuf, enum xran_pkt_dir dir, uint8_t frame_id, uint8_t subframe_id, uint8_t slot_id, uint8_t startsym, uint8_t numsym, uint16_t prb_start, uint16_t prb_num, int16_t iq_buffer_offset, int16_t iq_buffer_len, uint16_t beam_id, uint8_t cc_id, uint8_t ru_port_id, uint8_t comp_method, uint8_t iqWidth, uint8_t seq_id, uint8_t symInc)
 
int generate_cpmsg_prach (void *pHandle, struct xran_cp_gen_params *params, struct xran_section_gen_info *sect_geninfo, struct rte_mbuf *mbuf, struct xran_device_ctx *pxran_lib_ctx, uint8_t frame_id, uint8_t subframe_id, uint8_t slot_id, uint16_t beam_id, uint8_t cc_id, uint8_t prach_port_id, uint8_t seq_id)
 
int process_ring (struct rte_ring *r)
 
int32_t ring_processing_func (void)
 
int ring_processing_thread (void *args)
 

Variables

long interval_us
 
long rx_counter = 0
 
long tx_counter = 0
 
long tx_bytes_counter = 0
 
long rx_bytes_counter = 0
 
long tx_bytes_per_sec = 0
 
long rx_bytes_per_sec = 0
 

Detailed Description

XRAN layer common functionality for both O-DU and O-RU as well as C-plane and U-plane.

XRAN layer common functionality for both lls-CU and RU as well as C-plane and U-plane.

Author
Intel Corporation

Definition in file xran_common.c.

Macro Definition Documentation

◆ MBUFS_CNT

#define MBUFS_CNT   16

Definition at line 44 of file xran_common.c.

Function Documentation

◆ generate_cpmsg_dlul()

int generate_cpmsg_dlul ( void *  pHandle,
struct xran_cp_gen_params params,
struct xran_section_gen_info sect_geninfo,
struct rte_mbuf *  mbuf,
enum xran_pkt_dir  dir,
uint8_t  frame_id,
uint8_t  subframe_id,
uint8_t  slot_id,
uint8_t  startsym,
uint8_t  numsym,
uint16_t  prb_start,
uint16_t  prb_num,
int16_t  iq_buffer_offset,
int16_t  iq_buffer_len,
uint16_t  beam_id,
uint8_t  cc_id,
uint8_t  ru_port_id,
uint8_t  comp_method,
uint8_t  iqWidth,
uint8_t  seq_id,
uint8_t  symInc 
)

Definition at line 535 of file xran_common.c.

Here is the call graph for this function:

◆ generate_cpmsg_prach()

int generate_cpmsg_prach ( void *  pHandle,
struct xran_cp_gen_params params,
struct xran_section_gen_info sect_geninfo,
struct rte_mbuf *  mbuf,
struct xran_device_ctx pxran_lib_ctx,
uint8_t  frame_id,
uint8_t  subframe_id,
uint8_t  slot_id,
uint16_t  beam_id,
uint8_t  cc_id,
uint8_t  prach_port_id,
uint8_t  seq_id 
)

Definition at line 595 of file xran_common.c.

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

◆ prepare_symbol_ex()

int32_t prepare_symbol_ex ( enum xran_pkt_dir  direction,
uint16_t  section_id,
struct rte_mbuf *  mb,
struct rb_map data,
uint8_t  compMeth,
uint8_t  iqWidth,
const enum xran_input_byte_order  iq_buf_byte_order,
uint8_t  frame_id,
uint8_t  subframe_id,
uint8_t  slot_id,
uint8_t  symbol_no,
int  prb_start,
int  prb_num,
uint8_t  CC_ID,
uint8_t  RU_Port_ID,
uint8_t  seq_id,
uint32_t  do_copy 
)

Definition at line 348 of file xran_common.c.

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

◆ process_mbuf()

int process_mbuf ( struct rte_mbuf *  pkt)

Definition at line 143 of file xran_common.c.

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

◆ process_ring()

int process_ring ( struct rte_ring *  r)

Definition at line 676 of file xran_common.c.

Here is the call graph for this function:

◆ ring_processing_func()

int32_t ring_processing_func ( void  )

Definition at line 700 of file xran_common.c.

Here is the caller graph for this function:

◆ ring_processing_thread()

int ring_processing_thread ( void *  args)

Definition at line 742 of file xran_common.c.

Here is the call graph for this function:

◆ send_cpmsg()

int send_cpmsg ( void *  pHandle,
struct rte_mbuf *  mbuf,
struct xran_cp_gen_params params,
struct xran_section_gen_info sect_geninfo,
uint8_t  cc_id,
uint8_t  ru_port_id,
uint8_t  seq_id 
)

Definition at line 510 of file xran_common.c.

Here is the call graph for this function:

◆ send_symbol_ex()

int send_symbol_ex ( enum xran_pkt_dir  direction,
uint16_t  section_id,
struct rte_mbuf *  mb,
struct rb_map data,
const enum xran_input_byte_order  iq_buf_byte_order,
uint8_t  frame_id,
uint8_t  subframe_id,
uint8_t  slot_id,
uint8_t  symbol_no,
int  prb_start,
int  prb_num,
uint8_t  CC_ID,
uint8_t  RU_Port_ID,
uint8_t  seq_id 
)

Definition at line 436 of file xran_common.c.

Here is the call graph for this function:

◆ xran_create_cb()

struct cb_elem_entry* xran_create_cb ( XranSymCallbackFn  cb_fn,
void *  cb_data 
)

Definition at line 125 of file xran_common.c.

◆ xran_destroy_cb()

int xran_destroy_cb ( struct cb_elem_entry cb_elm)

Definition at line 136 of file xran_common.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()

int 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:

Variable Documentation

◆ interval_us

long interval_us

Definition at line 109 of file xran_main.c.

◆ rx_bytes_counter

long rx_bytes_counter = 0

Definition at line 120 of file xran_common.c.

◆ rx_bytes_per_sec

long rx_bytes_per_sec = 0

Definition at line 122 of file xran_common.c.

◆ rx_counter

long rx_counter = 0

Definition at line 117 of file xran_common.c.

◆ tx_bytes_counter

long tx_bytes_counter = 0

Definition at line 119 of file xran_common.c.

◆ tx_bytes_per_sec

long tx_bytes_per_sec = 0

Definition at line 121 of file xran_common.c.

◆ tx_counter

long tx_counter = 0

Definition at line 118 of file xran_common.c.