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 XRAN TX header file
21 * @file xran_tx_proc.h
22 * @ingroup group_source_xran
23 * @author Intel Corporation
26 #ifndef _XRAN_TX_PROC_H_
27 #define _XRAN_TX_PROC_H_
35 #include <sys/param.h>
36 #include <sys/queue.h>
38 #include <rte_common.h>
40 #include <rte_timer.h>
42 #include "xran_fh_o_du.h"
43 #include "xran_prach_cfg.h"
44 #include "xran_up_api.h"
45 #include "xran_cp_api.h"
47 struct cp_up_tx_desc {
60 uint16_t xran_port_id;
64 int32_t xran_process_tx_sym(void *arg);
66 struct cp_up_tx_desc * xran_pkt_gen_desc_alloc(void);
67 int32_t xran_pkt_gen_desc_free(struct cp_up_tx_desc *p_desc);
68 uint16_t xran_getSfnSecStart(void);
70 int32_t xran_process_tx_sym_cp_on_dispatch(void *pHandle, uint8_t ctx_id, uint32_t tti, int32_t cc_id, int32_t ant_id, uint32_t frame_id, uint32_t subframe_id,
71 uint32_t slot_id, uint32_t sym_id);
72 int32_t xran_process_tx_sym_cp_on(void *pHandle, uint8_t ctx_id, uint32_t tti, int32_t cc_id, int32_t ant_id, uint32_t frame_id, uint32_t subframe_id,
73 uint32_t slot_id, uint32_t sym_id);
74 int32_t xran_process_tx_sym_cp_on_dispatch(void *pHandle, uint8_t ctx_id, uint32_t tti, int32_t cc_id, int32_t ant_id, uint32_t frame_id, uint32_t subframe_id,
75 uint32_t slot_id, uint32_t sym_id);
76 int32_t xran_process_tx_sym_cp_on_dispatch_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32_t num_cc, int32_t num_ant, uint32_t frame_id,
77 uint32_t subframe_id, uint32_t slot_id, uint32_t sym_id, enum xran_comp_hdr_type compType, enum xran_pkt_dir direction,
78 uint16_t xran_port_id, PSECTION_DB_TYPE p_sec_db);
80 int32_t xran_process_tx_sym_cp_on_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32_t num_cc, int32_t num_ant, uint32_t frame_id, uint32_t subframe_id,
81 uint32_t slot_id, uint32_t sym_id, enum xran_comp_hdr_type compType, enum xran_pkt_dir direction, uint16_t xran_port_id, PSECTION_DB_TYPE p_sec_db);
82 extern int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr* mac_addr);
84 extern PSECTION_DB_TYPE p_sectiondb[XRAN_PORTS_NUM];
90 #endif /* _XRAN_TX_PROC_H_ */