Syncing our OAI merge branch with our internal NSA master branch
This commit is contained in:
+31
-15
@@ -612,7 +612,29 @@ static void wait_nfapi_init(char *thread_name) {
|
||||
}
|
||||
|
||||
void init_pdcp(void) {
|
||||
//if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
|
||||
if (!get_softmodem_params()->nsa) {
|
||||
if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
|
||||
//pdcp_layer_init();
|
||||
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
|
||||
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
||||
|
||||
if (IS_SOFTMODEM_NOS1) {
|
||||
printf("IS_SOFTMODEM_NOS1 option enabled \n");
|
||||
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT;
|
||||
}
|
||||
|
||||
nr_pdcp_module_init(pdcp_initmask, 0);
|
||||
|
||||
if (NODE_IS_CU(RC.nrrrc[0]->node_type)) {
|
||||
LOG_I(PDCP, "node is CU, pdcp send rlc_data_req by proto_agent \n");
|
||||
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
|
||||
} else {
|
||||
LOG_I(PDCP, "node is gNB \n");
|
||||
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
|
||||
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
|
||||
}
|
||||
}
|
||||
} else if (get_softmodem_params()->nsa) {
|
||||
pdcp_layer_init();
|
||||
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
|
||||
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
||||
@@ -623,17 +645,12 @@ void init_pdcp(void) {
|
||||
}
|
||||
|
||||
nr_pdcp_module_init(pdcp_initmask, 0);
|
||||
|
||||
/*if (NODE_IS_CU(RC.rrc[0]->node_type)) {
|
||||
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
|
||||
} else {*/
|
||||
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
|
||||
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
|
||||
//}
|
||||
/*} else {
|
||||
} else {
|
||||
LOG_I(PDCP, "node is DU, rlc send pdcp_data_ind by proto_agent \n");
|
||||
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) proto_agent_send_pdcp_data_ind);
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -694,21 +711,20 @@ int main( int argc, char **argv ) {
|
||||
init_opt();
|
||||
|
||||
#ifdef PDCP_USE_NETLINK
|
||||
if(!IS_SOFTMODEM_NOS1)
|
||||
netlink_init();
|
||||
|
||||
if(!IS_SOFTMODEM_NOS1) {
|
||||
netlink_init();
|
||||
init_pdcp();
|
||||
}
|
||||
#if defined(PDCP_USE_NETLINK_QUEUES)
|
||||
pdcp_netlink_init();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef PACKAGE_VERSION
|
||||
# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
|
||||
#endif
|
||||
LOG_I(HW, "Version: %s\n", PACKAGE_VERSION);
|
||||
|
||||
if(!IS_SOFTMODEM_NOS1)
|
||||
init_pdcp();
|
||||
|
||||
if (RC.nb_nr_L1_inst > 0)
|
||||
RCconfig_NR_L1();
|
||||
|
||||
|
||||
+4
-12
@@ -27,8 +27,8 @@
|
||||
#include "SCHED_NR_UE/phy_frame_config_nr.h"
|
||||
#include "SCHED_NR_UE/defs.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "LAYER2/nr_pdcp/nr_pdcp_entity.h"
|
||||
//#include "executables/softmodem-common.h"
|
||||
#include "SCHED_NR_UE/pucch_uci_ue_nr.h"
|
||||
|
||||
/*
|
||||
@@ -190,7 +190,7 @@ static void L1_nsa_prach_procedures(frame_t frame, int slot, fapi_nr_ul_config_p
|
||||
free(rach_ind->pdu_list);
|
||||
free(rach_ind);
|
||||
}
|
||||
LOG_I(NR_MAC, "Melissa, We have successfully filled the rach_ind queue with the recently filled rach ind\n");
|
||||
LOG_D(NR_MAC, "We have successfully filled the rach_ind queue with the recently filled rach ind\n");
|
||||
}
|
||||
|
||||
static bool sfn_slot_matcher(void *wanted, void *candidate)
|
||||
@@ -286,7 +286,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
int slot = NFAPI_SFNSLOT2SLOT(sfn_slot);
|
||||
nr_uplink_indication_t ul_info;
|
||||
int slots_per_frame = 20; //30 kHZ subcarrier spacing
|
||||
int slot_ahead = 2; // Melissa lets make this dynamic
|
||||
int slot_ahead = 2; // TODO: Make this dynamic
|
||||
ul_info.cc_id = CC_id;
|
||||
ul_info.gNB_index = gNB_id;
|
||||
ul_info.module_id = mod_id;
|
||||
@@ -407,14 +407,6 @@ static void UE_synch(void *arg) {
|
||||
|
||||
if (UE->UE_scan == 0) {
|
||||
|
||||
#ifdef FR2_TEST
|
||||
// Overwrite DL frequency (for FR2 testing)
|
||||
if (downlink_frequency[0][0]!=0){
|
||||
UE->frame_parms.dl_CarrierFreq = downlink_frequency[0][0];
|
||||
UE->frame_parms.ul_CarrierFreq = downlink_frequency[0][0];
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i=0; i<openair0_cfg[UE->rf_map.card].rx_num_channels; i++) {
|
||||
|
||||
LOG_I( PHY, "[SCHED][UE] Check absolute frequency DL %f, UL %f (RF card %d, oai_exit %d, channel %d, rx_num_channels %d)\n",
|
||||
@@ -480,7 +472,7 @@ static void UE_synch(void *arg) {
|
||||
LOG_I(PHY, "[UE thread Synch] Running Initial Synch (mode %d)\n",UE->mode);
|
||||
|
||||
uint64_t dl_carrier, ul_carrier;
|
||||
nr_get_carrier_frequencies(&UE->frame_parms, &dl_carrier, &ul_carrier);
|
||||
nr_get_carrier_frequencies(UE, &dl_carrier, &ul_carrier);
|
||||
|
||||
if (nr_initial_sync(&syncD->proc, UE, 2, get_softmodem_params()->sa, get_nrUE_params()->nr_dlsch_parallel) == 0) {
|
||||
freq_offset = UE->common_vars.freq_offset; // frequency offset computed with pss in initial sync
|
||||
|
||||
@@ -376,7 +376,7 @@ void init_openair0(void) {
|
||||
openair0_cfg[card].rx_num_channels,
|
||||
duplex_mode[openair0_cfg[card].duplex_mode]);
|
||||
|
||||
nr_get_carrier_frequencies(frame_parms, &dl_carrier, &ul_carrier);
|
||||
nr_get_carrier_frequencies(PHY_vars_UE_g[0][0], &dl_carrier, &ul_carrier);
|
||||
|
||||
nr_rf_card_config_freq(&openair0_cfg[card], ul_carrier, dl_carrier, freq_off);
|
||||
nr_rf_card_config_gain(&openair0_cfg[card], rx_gain_off);
|
||||
@@ -433,7 +433,7 @@ int main( int argc, char **argv ) {
|
||||
|
||||
get_options (); //Command-line options specific for NRUE
|
||||
|
||||
get_common_options(SOFTMODEM_5GUE_BIT );
|
||||
get_common_options(SOFTMODEM_5GUE_BIT);
|
||||
init_tpools(nrUE_params.nr_dlsch_parallel);
|
||||
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
|
||||
#if T_TRACER
|
||||
@@ -541,13 +541,6 @@ int main( int argc, char **argv ) {
|
||||
// wait for end of program
|
||||
printf("TYPE <CTRL-C> TO TERMINATE\n");
|
||||
|
||||
#if 0
|
||||
if (create_tasks_nrue(1) < 0) {
|
||||
printf("cannot create ITTI tasks\n");
|
||||
exit(-1); // need a softer mode
|
||||
}
|
||||
#endif
|
||||
|
||||
// Sleep a while before checking all parameters have been used
|
||||
// Some are used directly in external threads, asynchronously
|
||||
sleep(20);
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
#define CONFIG_HLP_IF_FREQ "IF frequency for RF, if needed"
|
||||
#define CONFIG_HLP_IF_FREQ_OFF "UL IF frequency offset for RF, if needed"
|
||||
#define CONFIG_HLP_DLSCH_PARA "number of threads for dlsch processing 0 for no parallelization\n"
|
||||
#define CONFIG_HLP_OFFSET_DIV "Divisor for computing OFDM symbol offset in Rx chain (num samples in CP/<the value>). Default value is 8. To set the sample offset to 0, set this value ~ 10e6\n"
|
||||
/***************************************************************************************************************************************/
|
||||
@@ -63,6 +64,8 @@
|
||||
{"r" , CONFIG_HLP_PRB_SA, 0, iptr:&(fp->N_RB_DL), defintval:106, TYPE_UINT, 0}, \
|
||||
{"s" , CONFIG_HLP_SSC, 0, u16ptr:&(fp->ssb_start_subcarrier), defintval:516, TYPE_UINT16,0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
|
||||
{"if_freq" , CONFIG_HLP_IF_FREQ, 0, u64ptr:&(UE->if_freq), defuintval:0, TYPE_UINT64,0}, \
|
||||
{"if_freq_off" , CONFIG_HLP_IF_FREQ_OFF, 0, iptr:&(UE->if_freq_off), defuintval:0, TYPE_INT, 0}, \
|
||||
{"do-prb-interpolation", CONFIG_HLP_PRBINTER, PARAMFLAG_BOOL, iptr:&(UE->prb_interpolation), defintval:0, TYPE_INT, 0}, \
|
||||
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&(UE->no_timing_correction), defintval:0, TYPE_INT, 0}, \
|
||||
}
|
||||
|
||||
@@ -209,10 +209,12 @@ void set_softmodem_sighandler(void) {
|
||||
act.sa_handler=signal_handler;
|
||||
sigaction(SOFTMODEM_RTSIGNAL,&act,&oldact);
|
||||
// Disabled in order generate a core dump for analysis with gdb
|
||||
// printf("Send signal %d to display resource usage...\n",SIGRTMIN+1);
|
||||
// signal(SIGSEGV, signal_handler);
|
||||
// signal(SIGINT, signal_handler);
|
||||
// signal(SIGTERM, signal_handler);
|
||||
// signal(SIGABRT, signal_handler);
|
||||
# if 0
|
||||
printf("Send signal %d to display resource usage...\n",SIGRTMIN+1);
|
||||
signal(SIGSEGV, signal_handler);
|
||||
signal(SIGINT, signal_handler);
|
||||
signal(SIGTERM, signal_handler);
|
||||
signal(SIGABRT, signal_handler);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user