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