Merge branch 'episys/master-nsa' into episys/mel/merge_bw_testing_abs
This commit is contained in:
+36
-15
@@ -612,7 +612,32 @@ 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 {
|
||||
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);
|
||||
}
|
||||
} 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 +648,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 +714,22 @@ int main( int argc, char **argv ) {
|
||||
init_opt();
|
||||
|
||||
#ifdef PDCP_USE_NETLINK
|
||||
if(!IS_SOFTMODEM_NOS1)
|
||||
netlink_init();
|
||||
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
netlink_init();
|
||||
if (get_softmodem_params()->nsa) {
|
||||
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();
|
||||
|
||||
|
||||
+3
-3
@@ -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"
|
||||
#include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h"
|
||||
|
||||
@@ -191,7 +191,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)
|
||||
@@ -447,7 +447,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;
|
||||
|
||||
@@ -159,7 +159,6 @@ char uecap_xer[1024];
|
||||
*/
|
||||
uint8_t abstraction_flag=0;
|
||||
|
||||
uint16_t ue_id_g;
|
||||
uint16_t ue_idx_standalone = 0xFFFF;
|
||||
|
||||
/*---------------------BMC: timespec helpers -----------------------------*/
|
||||
@@ -398,13 +397,11 @@ void init_pdcp(int ue_id) {
|
||||
if (IS_SOFTMODEM_NOKRNMOD) {
|
||||
pdcp_initmask = pdcp_initmask | UE_NAS_USE_TUN_BIT;
|
||||
}
|
||||
if (rlc_module_init(0) != 0) {
|
||||
if (get_softmodem_params()->nsa && rlc_module_init(0) != 0) {
|
||||
LOG_I(RLC, "Problem at RLC initiation \n");
|
||||
}
|
||||
pdcp_layer_init();
|
||||
nr_pdcp_module_init(pdcp_initmask, ue_id);
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
@@ -416,6 +413,13 @@ void *rrc_enb_process_msg(void *notUsed) {
|
||||
|
||||
|
||||
int main( int argc, char **argv ) {
|
||||
set_priority(79);
|
||||
if (mlockall(MCL_CURRENT | MCL_FUTURE) == -1)
|
||||
{
|
||||
fprintf(stderr, "mlockall: %s\n", strerror(errno));
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
//uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2;
|
||||
PHY_VARS_NR_UE *UE[MAX_NUM_CCs];
|
||||
start_background_system();
|
||||
@@ -463,14 +467,13 @@ int main( int argc, char **argv ) {
|
||||
uint16_t node_number = get_softmodem_params()->node_number;
|
||||
ue_id_g = (node_number == 0) ? 0 : node_number - 2;
|
||||
AssertFatal(ue_id_g >= 0, "UE id is expected to be nonnegative.\n");
|
||||
|
||||
if(node_number == 0)
|
||||
{
|
||||
init_pdcp(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
init_pdcp(mode_offset + ue_id_g);
|
||||
if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa || get_softmodem_params()->nsa) {
|
||||
if(node_number == 0) {
|
||||
init_pdcp(0);
|
||||
}
|
||||
else {
|
||||
init_pdcp(mode_offset + ue_id_g);
|
||||
}
|
||||
}
|
||||
|
||||
NB_UE_INST=1;
|
||||
@@ -541,13 +544,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);
|
||||
|
||||
@@ -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