1 /******************************************************************************
3 * Copyright (c) 2020 Intel.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 *******************************************************************************/
20 * @brief This file provides the definitions for User Plane Messages APIs.
23 * @ingroup group_lte_source_xran
24 * @author Intel Corporation
28 #ifndef _XRAN_UP_API_H_
29 #define _XRAN_UP_API_H_
35 #include <rte_common.h>
39 #include "xran_pkt_up.h"
42 * structure used for storing packet parameters needed for generating
45 struct xran_up_pkt_gen_params
47 struct radio_app_common_hdr app_params;
48 struct data_section_hdr sec_hdr;
49 struct data_section_compression_hdr compr_hdr_param;
50 union compression_params compr_param;
54 * structure used for storing packet parameters needed for generating
55 * a data packet without compression
56 * Next fields are omitted:
57 * udCompHdr (not always present)
58 * reserved (not always present)
59 * udCompParam (not always present)
61 struct xran_up_pkt_gen_no_compression_params
63 struct radio_app_common_hdr app_params;
64 struct data_section_hdr sec_hdr;
68 * @brief Function extracts IQ samples from received mbuf packet.
70 * @param mbuf Packet with received data.
71 * @param iq_data_start Address of the first IQ sample in mbuf will be returned
73 * @return int Bytes of IQ samples that have been extracted from mbuf.
75 int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
83 union ecpri_seq_id *seq_id,
90 enum xran_comp_hdr_type staticComp,
94 int xran_prepare_iq_symbol_portion(
95 struct rte_mbuf *mbuf,
96 const void *iq_data_start,
97 const enum xran_input_byte_order iq_buf_byte_order,
98 const uint32_t iq_data_num_bytes,
99 struct xran_up_pkt_gen_params *params,
103 enum xran_comp_hdr_type staticEn,
105 uint16_t num_sections,
106 uint16_t section_id_start,
113 #endif /* _XRAN_UP_API_H_ */