Code clean up part one.

This commit includes about 1/3 of the code clean up
in preparation for the merge to the OAI develop
branch. Several of the changes are white space changes,
removing of logs, comment removals, and updating any
changed code for our use-case to be clear for NSA mode.
This commit is contained in:
Melissa Elkadi
2021-09-23 12:53:38 -07:00
parent 30065ef014
commit 82ba5a3531
30 changed files with 102 additions and 203 deletions
+31 -15
View File
@@ -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();
+1 -1
View File
@@ -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"
/*
-7
View File
@@ -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 -5
View File
@@ -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
}