30 #include <rte_common.h> 31 #include <rte_config.h> 65 uint16_t
xran_compose_cid(uint8_t CU_Port_ID, uint8_t BandSector_ID, uint8_t CC_ID, uint8_t Ant_ID)
77 return (rte_cpu_to_be_16(cid));
94 cid = rte_be_to_cpu_16(cid);
143 uint8_t CC_ID, uint8_t Ant_ID,
152 if(unlikely(tmp == NULL)) {
153 print_err(
"Fail to allocate the space for eCPRI hedaer!");
199 *ecpri_hdr = rte_pktmbuf_mtod(mbuf,
void *);
200 if(*ecpri_hdr == NULL) {
201 print_err(
"Invalid packet - eCPRI hedaer!");
208 print_err(
"Invalid eCPRI version - %d", (*ecpri_hdr)->cmnhdr.ecpri_ver);
211 if((*ecpri_hdr)->cmnhdr.ecpri_resv != 0) {
212 print_err(
"Invalid reserved field - %d", (*ecpri_hdr)->cmnhdr.ecpri_resv);
216 if(pkt_info != NULL) {
220 pkt_info->
payload_len = rte_be_to_cpu_16((*ecpri_hdr)->cmnhdr.ecpri_payl_size);
222 pkt_info->
seq_id = (*ecpri_hdr)->ecpri_seq_id.seq_id;
223 pkt_info->
subseq_id = (*ecpri_hdr)->ecpri_seq_id.sub_seq_id;
224 pkt_info->
ebit = (*ecpri_hdr)->ecpri_seq_id.e_bit;
This file provides the definition of Control Plane Messages for XRAN Front Haul layer as defined in X...
enum ecpri_msg_type msg_type
#define XRAN_STATUS_SUCCESS
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.
uint16_t mask_bandSectorId
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.
void xran_decompose_cid(uint16_t cid, struct xran_eaxc_info *result)
Decompose ecpriRtcid/ecpriPcid.
struct xran_eaxcid_config * xran_get_conf_eAxC(void *pHandle)
Get the configuration of eAxC ID.
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.
#define print_err(fmt, args...)
void xran_update_ecpri_payload_size(struct rte_mbuf *mbuf, int size)
modify the payload size of eCPRI header in xRAN packet
Modules provide debug prints and utility functions.
struct xran_ecpri_cmn_hdr cmnhdr
This file provides the definitions for User Plane Messages APIs.
XRAN layer common functionality for both lls-CU and RU as well as C-plane and U-plane.
This file provides public interface to xRAN Front Haul layer implementation as defined in the ORAN-WG...
struct ecpri_seq_id ecpri_seq_id
int xran_get_ecpri_hdr_size(void)
return eCPRI header size without eCPRI common header
#define XRAN_STATUS_RESOURCE
This file provides the definitions for Control Plane Messages APIs.
#define XRAN_STATUS_INVALID_PACKET
struct xran_eaxc_info eaxc
This file provides the definitions for Transport layer (eCPRI) API.