Further cleanup: define oai_exit for 4G
The parent commit cleans up and groups oai_exit in one place, nr-softmodem-common.h. Therefore, this 5G file is included in the 4G defs_common.h (at least it's mostly 4G), which is not nice. Instead, define oai_exit also in 4G softmodem-common.h, and include this in defs_common.h. Remove the cyclic inclusion of defs_common.h in softmodem-common.h, and resolve all subsequent errors around unknown types and extern definition mismatches.
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "common/utils/threadPool/notified_fifo.h"
|
||||
#include <readline/history.h>
|
||||
#include "common/oai_version.h"
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ void *UE_thread(void *arg);
|
||||
int init_timer_thread(void);
|
||||
|
||||
int tx_req_num_elems;
|
||||
extern uint16_t sf_ahead;
|
||||
extern int sf_ahead;
|
||||
//extern int tx_req_UE_MAC1();
|
||||
|
||||
void ue_stub_rx_handler(unsigned int, char *);
|
||||
|
||||
@@ -73,8 +73,7 @@ pthread_cond_t nfapi_sync_cond;
|
||||
pthread_mutex_t nfapi_sync_mutex;
|
||||
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
|
||||
|
||||
|
||||
uint16_t sf_ahead=4;
|
||||
int sf_ahead = 4;
|
||||
int tddflag;
|
||||
char *emul_iface;
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ int sync_var=-1; //!< protected by mutex \ref sync_mutex.
|
||||
int config_sync_var=-1;
|
||||
|
||||
int oai_exit = 0;
|
||||
uint16_t sf_ahead = 4;
|
||||
int sf_ahead = 4;
|
||||
RU_t ru_m;
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ static int DEFRUTPCORES[] = {-1,-1,-1,-1};
|
||||
#include <nfapi/oai_integration/vendor_ext.h>
|
||||
#include "executables/nr-softmodem-common.h"
|
||||
|
||||
uint16_t sl_ahead;
|
||||
int sl_ahead;
|
||||
static void NRRCconfig_RU(configmodule_interface_t *cfg);
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
@@ -98,7 +98,7 @@ nrUE_params_t nrUE_params = {0};
|
||||
pthread_cond_t nfapi_sync_cond;
|
||||
pthread_mutex_t nfapi_sync_mutex;
|
||||
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
|
||||
uint16_t sf_ahead=6; //??? value ???
|
||||
int sf_ahead = 6; //??? value ???
|
||||
pthread_cond_t sync_cond;
|
||||
pthread_mutex_t sync_mutex;
|
||||
int sync_var=-1; //!< protected by mutex \ref sync_mutex.
|
||||
|
||||
@@ -31,11 +31,14 @@
|
||||
*/
|
||||
#ifndef SOFTMODEM_COMMON_H
|
||||
#define SOFTMODEM_COMMON_H
|
||||
#include "openair1/PHY/defs_common.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "common/config/config_load_configmodule.h"
|
||||
|
||||
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
|
||||
#define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n"
|
||||
#define CONFIG_HLP_SPLIT73 "Split 7.3 (below rate matching) option: <cu|du>:<remote ip address>:<remote port>\n"
|
||||
@@ -349,8 +352,9 @@ void set_softmodem_sighandler(void);
|
||||
extern uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
extern int usrp_tx_thread;
|
||||
extern uint16_t sl_ahead;
|
||||
extern uint16_t sf_ahead;
|
||||
extern int sl_ahead;
|
||||
extern int sf_ahead;
|
||||
extern int oai_exit;
|
||||
|
||||
void ru_tx_func(void *param);
|
||||
void configure_ru(void *, void *arg);
|
||||
|
||||
@@ -38,9 +38,8 @@
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
extern UL_RCC_IND_t UL_RCC_INFO;
|
||||
extern uint16_t sf_ahead;
|
||||
extern uint16_t slot_ahead;
|
||||
|
||||
extern int sf_ahead;
|
||||
extern int slot_ahead;
|
||||
|
||||
void *aerial_vnf_nr_p7_config_init(void *ptr)
|
||||
{
|
||||
|
||||
@@ -2435,7 +2435,7 @@ void handle_nr_slot_ind(uint16_t sfn, uint16_t slot) {
|
||||
//send VNF slot indication, which is aligned with TX thread, so that it can call the scheduler
|
||||
nfapi_nr_slot_indication_scf_t *ind;
|
||||
ind = (nfapi_nr_slot_indication_scf_t *) malloc(sizeof(nfapi_nr_slot_indication_scf_t));
|
||||
uint8_t slot_ahead = 6;
|
||||
int slot_ahead = 6;
|
||||
uint32_t sfn_slot_tx = sfnslot_add_slot(sfn, slot, slot_ahead);
|
||||
uint16_t sfn_tx = NFAPI_SFNSLOT2SFN(sfn_slot_tx);
|
||||
uint8_t slot_tx = NFAPI_SFNSLOT2SLOT(sfn_slot_tx);
|
||||
|
||||
@@ -230,7 +230,7 @@ int vnf_nr_unpack_vendor_extension_tlv(nfapi_tl_t *tl,
|
||||
}
|
||||
void install_nr_schedule_handlers(NR_IF_Module_t *if_inst);
|
||||
void install_schedule_handlers(IF_Module_t *if_inst);
|
||||
extern uint16_t sf_ahead;
|
||||
extern int sf_ahead;
|
||||
|
||||
void oai_create_enb(void) {
|
||||
int bodge_counter=0;
|
||||
|
||||
@@ -31,9 +31,7 @@
|
||||
|
||||
#define FAPI2_IP_DSCP 0
|
||||
|
||||
extern uint16_t sf_ahead;
|
||||
|
||||
//uint16_t sf_ahead=4;
|
||||
extern int sf_ahead;
|
||||
|
||||
void add_slot(uint16_t *frameP, uint16_t *slotP, int offset)
|
||||
{
|
||||
|
||||
@@ -60,8 +60,7 @@
|
||||
//#include <complex.h>
|
||||
#include "time_meas.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "nr-softmodem-common.h"
|
||||
#include "softmodem-common.h"
|
||||
#define MAX_NUM_RU_PER_eNB 64
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
@@ -22,7 +22,7 @@ void handle_nfapi_nr_csirs_pdu(processingData_L1tx_t *msgTx,
|
||||
}
|
||||
int l1_north_init_gNB(void){return 0;}
|
||||
|
||||
uint8_t slot_ahead=6;
|
||||
int slot_ahead = 6;
|
||||
//uint8_t nfapi_mode=0;
|
||||
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {return NULL;}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ void handle_nfapi_nr_csirs_pdu(processingData_L1tx_t *msgTx,
|
||||
}
|
||||
int l1_north_init_gNB(void){return 0;}
|
||||
|
||||
uint8_t slot_ahead=6;
|
||||
int slot_ahead = 6;
|
||||
//uint8_t nfapi_mode=0;
|
||||
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {return NULL;}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
double cpuf;
|
||||
char *uecap_file;
|
||||
|
||||
uint16_t sl_ahead=0;
|
||||
int sl_ahead = 0;
|
||||
//uint8_t nfapi_mode = 0;
|
||||
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
THREAD_STRUCT thread_struct;
|
||||
|
||||
@@ -83,7 +83,7 @@ openair0_config_t openair0_cfg[MAX_CARDS];
|
||||
//uint8_t nfapi_mode=0;
|
||||
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
uint16_t sl_ahead = 0;
|
||||
int sl_ahead = 0;
|
||||
uint32_t N_RB_DL = 106;
|
||||
|
||||
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { return (NULL); }
|
||||
|
||||
@@ -106,9 +106,9 @@ RAN_CONTEXT_t RC;
|
||||
char *uecap_file;
|
||||
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
|
||||
uint16_t sf_ahead=4 ;
|
||||
int sf_ahead = 4;
|
||||
int slot_ahead=6 ;
|
||||
uint16_t sl_ahead=0;
|
||||
int sl_ahead = 0;
|
||||
double cpuf;
|
||||
//uint8_t nfapi_mode = 0;
|
||||
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
|
||||
#ifdef PHY_TX_THREAD
|
||||
extern volatile int16_t phy_tx_txdataF_end;
|
||||
extern int oai_exit;
|
||||
#endif
|
||||
extern uint16_t sfnsf_add_subframe(uint16_t frameP, uint16_t subframeP, int offset);
|
||||
extern void add_subframe(uint16_t *frameP, uint16_t *subframeP, int offset);
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
#include <executables/softmodem-common.h>
|
||||
extern RAN_CONTEXT_t RC;
|
||||
extern const uint8_t nr_slots_per_frame[5];
|
||||
extern uint16_t sl_ahead;
|
||||
|
||||
// forward declaration of functions used in this file
|
||||
static void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu,
|
||||
|
||||
@@ -3021,7 +3021,7 @@ int nr_mac_get_reconfig_delay_slots(NR_SubcarrierSpacing_t scs)
|
||||
/* we previously assumed a specific "slot ahead" value for the PHY processing
|
||||
* time. However, we cannot always know it (e.g., third-party PHY), so simply
|
||||
* assume a tentative worst-case slot processing time */
|
||||
const uint16_t sl_ahead = 10;
|
||||
const int sl_ahead = 10;
|
||||
/* 16ms seems to be the most common: See 38.331 Tab 12.1-1 */
|
||||
int delay_ms = NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS;
|
||||
return (delay_ms << scs) + sl_ahead;
|
||||
|
||||
@@ -74,7 +74,7 @@ extern nfapi_tx_request_pdu_t* tx_request_pdu[1023][NUM_NFAPI_SUBFRAME][10]; //T
|
||||
//extern int timer_frame;
|
||||
|
||||
extern UE_RRC_INST *UE_rrc_inst;
|
||||
extern uint16_t sf_ahead;
|
||||
extern int sf_ahead;
|
||||
|
||||
static eth_params_t stub_eth_params;
|
||||
void Msg1_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id);
|
||||
|
||||
@@ -243,7 +243,7 @@ next:
|
||||
//printf("BENETEL: %s (f.sf %d.%d)\n", __FUNCTION__, *frame, *subframe);
|
||||
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
extern uint16_t sf_ahead;
|
||||
extern int sf_ahead;
|
||||
int f = *frame;
|
||||
int sf = *subframe;
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ printf("rxdata in benetel_fh_if4p5_south_in %p\n", &ru->common.rxdataF[antenna][
|
||||
//printf("BENETEL: %s (f.sf %d.%d)\n", __FUNCTION__, *frame, *slot);
|
||||
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
extern uint16_t sl_ahead;
|
||||
extern int sl_ahead;
|
||||
int f = *frame;
|
||||
int sl = *slot;
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ void oran_fh_if4p5_south_in(RU_t *ru, int *frame, int *slot)
|
||||
ru_info.prach_buf = ru->prach_rxsigF[0]; // index: [prach_oca][ant_id]
|
||||
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
extern uint16_t sl_ahead;
|
||||
extern int sl_ahead;
|
||||
int f, sl;
|
||||
LOG_D(PHY, "Read rxdataF %p,%p\n", ru_info.rxdataF[0], ru_info.rxdataF[1]);
|
||||
start_meas(&ru->rx_fhaul);
|
||||
|
||||
Reference in New Issue
Block a user