o-du/phy
Intel O-RAN/X-RAN Generated Doxygen Documentation
Functions
xran_transport.c File Reference

This file provides the implementation for Transport lyaer (eCPRI) API. More...

#include <stdint.h>
#include <endian.h>
#include <rte_common.h>
#include <rte_config.h>
#include "xran_fh_o_du.h"
#include "xran_common.h"
#include "xran_transport.h"
#include "xran_pkt_cp.h"
#include "xran_cp_api.h"
#include "xran_up_api.h"
#include "xran_printf.h"
Include dependency graph for xran_transport.c:

Go to the source code of this file.

Functions

int xran_get_ecpri_hdr_size (void)
 return eCPRI header size without eCPRI common header More...
 
uint16_t xran_compose_cid (uint8_t CU_Port_ID, uint8_t BandSector_ID, uint8_t CC_ID, uint8_t Ant_ID)
 Compose ecpriRtcid/ecpriPcid. More...
 
void xran_decompose_cid (uint16_t cid, struct xran_eaxc_info *result)
 Decompose ecpriRtcid/ecpriPcid. More...
 
void xran_update_ecpri_payload_size (struct rte_mbuf *mbuf, int size)
 modify the payload size of eCPRI header in xRAN packet More...
 
int xran_build_ecpri_hdr (struct rte_mbuf *mbuf, uint8_t CC_ID, uint8_t Ant_ID, uint8_t seq_id, struct xran_ecpri_hdr **ecpri_hdr)
 Build ECPRI header and returns added length. More...
 
int xran_parse_ecpri_hdr (struct rte_mbuf *mbuf, struct xran_ecpri_hdr **ecpri_hdr, struct xran_recv_packet_info *pkt_info)
 Parse ECPRI header. More...
 

Detailed Description

This file provides the implementation for Transport lyaer (eCPRI) API.

Author
Intel Corporation

Definition in file xran_transport.c.

Function Documentation

◆ xran_build_ecpri_hdr()

int xran_build_ecpri_hdr ( struct rte_mbuf *  mbuf,
uint8_t  CC_ID,
uint8_t  Ant_ID,
uint8_t  seq_id,
struct xran_ecpri_hdr **  ecpri_hdr 
)

Build ECPRI header and returns added length.

Parameters
mbufThe pointer of the packet buffer to be parsed
CC_IDComponent Carrier ID for this C-Plane message
Ant_IDAntenna ID(RU Port ID) for this C-Plane message
seq_idSequence ID for this C-Plane message
ecpri_hdrThe pointer to ECPRI header
Returns
added payload size on success XRAN_STATUS_RESOURCE if failed to allocate the space to packet buffer

Definition at line 142 of file xran_transport.c.

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

◆ xran_compose_cid()

uint16_t xran_compose_cid ( uint8_t  CU_Port_ID,
uint8_t  BandSector_ID,
uint8_t  CC_ID,
uint8_t  Ant_ID 
)

Compose ecpriRtcid/ecpriPcid.

Parameters
CU_Port_IDCU Port ID
BanbSector_IDBand Sector ID
CC_IDComponent Carrier ID
Ant_IDRU Port ID (antenna ID)
Returns
uint16_t composed ecpriRtcid/ecpriPcid (network byte order)

Definition at line 65 of file xran_transport.c.

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

◆ xran_decompose_cid()

void xran_decompose_cid ( uint16_t  cid,
struct xran_eaxc_info result 
)

Decompose ecpriRtcid/ecpriPcid.

Parameters
cidcomposed ecpriRtcid/ecpriPcid (network byte order)
resultthe pointer of the structure to store decomposed values
Returns
none

Definition at line 89 of file xran_transport.c.

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

◆ xran_get_ecpri_hdr_size()

int xran_get_ecpri_hdr_size ( void  )

return eCPRI header size without eCPRI common header

Returns
the size of eCPRI header without common header

Definition at line 49 of file xran_transport.c.

Here is the caller graph for this function:

◆ xran_parse_ecpri_hdr()

int xran_parse_ecpri_hdr ( struct rte_mbuf *  mbuf,
struct xran_ecpri_hdr **  ecpri_hdr,
struct xran_recv_packet_info pkt_info 
)

Parse ECPRI header.

Parameters
mbufThe pointer of the packet buffer to be parsed
ecpri_hdrThe pointer to ECPRI header
pkt_infoThe pointer of sturcture to store the information from header
Returns
XRAN_STATUS_SUCCESS on success XRAN_STATUS_INVALID_PACKET if failed to parse the packet

Definition at line 192 of file xran_transport.c.

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

◆ xran_update_ecpri_payload_size()

void xran_update_ecpri_payload_size ( struct rte_mbuf *  mbuf,
int  size 
)
inline

modify the payload size of eCPRI header in xRAN packet

Parameters
mbufInitialized rte_mbuf packet which has eCPRI header already
sizepayload size to be updated
Returns
none

Definition at line 113 of file xran_transport.c.