Merge remote-tracking branch 'origin/config_sa_mode' into integration_2024_w45 (!3024)

Set SA mode as default

- Set standalone (SA) mode as the default.
- Adjust commands in Docker Compose files by removing --sa flags and
  adding --nsa flags where applicable.
- Add a function to verify that only one mode is being used at a time.
- Update all relevant documentation.
This commit is contained in:
Jaroslava Fiedlerova
2024-11-13 09:57:07 +01:00
committed by Robert Schmidt
89 changed files with 195 additions and 214 deletions
+6 -12
View File
@@ -261,15 +261,14 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
init_pdcp();
}
if (is_x2ap_enabled() ) { //&& !NODE_IS_DU(node_type)
if (get_softmodem_params()->nsa) { //&& !NODE_IS_DU(node_type)
LOG_I(X2AP, "X2AP enabled \n");
__attribute__((unused)) uint32_t x2_register_gnb_pending = gNB_app_register_x2 (gnb_id_start, gnb_id_end);
}
/* For the CU case the gNB registration with the AMF might have to take place after the F1 setup, as the PLMN info
* can originate from the DU. Add check on whether x2ap is enabled to account for ENDC NSA scenario.*/
if ((get_softmodem_params()->sa || is_x2ap_enabled()) &&
!NODE_IS_DU(node_type)) {
if (IS_SA_MODE(get_softmodem_params()) && !NODE_IS_DU(node_type)) {
/* Try to register each gNB */
//registered_gnb = 0;
__attribute__((unused)) uint32_t register_gnb_pending = gNB_app_register (gnb_id_start, gnb_id_end);
@@ -281,7 +280,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
return -1;
}
if (is_x2ap_enabled()) {
if (get_softmodem_params()->nsa) {
if(itti_create_task(TASK_X2AP, x2ap_task, NULL) < 0) {
LOG_E(X2AP, "Create task for X2AP failed\n");
}
@@ -290,8 +289,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
}
}
if (get_softmodem_params()->sa &&
!NODE_IS_DU(node_type)) {
if (IS_SA_MODE(get_softmodem_params()) && !NODE_IS_DU(node_type)) {
char* gnb_ipv4_address_for_NGU = NULL;
uint32_t gnb_port_for_NGU = 0;
@@ -340,7 +338,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
}
//Use check on x2ap to consider the NSA scenario
if((is_x2ap_enabled() || get_softmodem_params()->sa) && (node_type != ngran_gNB_CUCP)) {
if((is_x2ap_enabled() || IS_SA_MODE(get_softmodem_params())) && (node_type != ngran_gNB_CUCP)) {
if (itti_create_task (TASK_GTPV1_U, &gtpv1uTask, NULL) < 0) {
LOG_E(GTPU, "Create task for GTPV1U failed\n");
return -1;
@@ -506,11 +504,7 @@ int main( int argc, char **argv ) {
LOG_W(UTIL,
"no SYS_NICE capability: cannot set thread priority and affinity, consider running with sudo for optimum performance\n");
if (get_softmodem_params()->do_ra)
AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n");
if (get_softmodem_params()->sa)
AssertFatal(get_softmodem_params()->phy_test == 0,"Standalone mode and phy_test are mutually exclusive\n");
softmodem_verify_mode(get_softmodem_params());
#if T_TRACER
T_Config_Init();
+4 -4
View File
@@ -286,7 +286,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
LOG_D(NR_MAC, "The received sfn/slot [%d %d] from proxy\n",
frame, slot);
if (get_softmodem_params()->sa && mac->mib == NULL) {
if (IS_SA_MODE(get_softmodem_params()) && mac->mib == NULL) {
LOG_D(NR_MAC, "We haven't gotten MIB. Lets see if we received it\n");
nr_ue_dl_indication(&mac->dl_info);
process_queued_nr_nfapi_msgs(mac, sfn_slot);
@@ -392,7 +392,7 @@ static void UE_synch(void *arg) {
ret = sl_nr_slss_search(UE, &syncD->proc, SL_NR_SSB_REPETITION_IN_FRAMES);
} else {
nr_get_carrier_frequencies(UE, &dl_carrier, &ul_carrier);
ret = nr_initial_sync(&syncD->proc, UE, 2, get_softmodem_params()->sa, syncD->gscnInfo, syncD->numGscn);
ret = nr_initial_sync(&syncD->proc, UE, 2, IS_SA_MODE(get_softmodem_params()), syncD->gscnInfo, syncD->numGscn);
}
if (ret.cell_detected) {
@@ -601,7 +601,7 @@ static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE, const UE_nr_rxtx_proc_t *proc
if (UE->sl_mode == 2)
fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params;
if (IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa) {
if (IS_SOFTMODEM_NOS1 || IS_SA_MODE(get_softmodem_params())) {
// Start synchronization with a target gNB
if (UE->synch_request.received_synch_request == 1) {
@@ -1056,7 +1056,7 @@ void init_NR_UE(int nb_inst, char *uecap_file, char *reconfig_file, char *rbconf
NR_UE_MAC_INST_t *mac = get_mac_inst(i);
mac->if_module = nr_ue_if_module_init(i);
AssertFatal(mac->if_module, "can not initialize IF module\n");
if (!get_softmodem_params()->sa || !get_softmodem_params()->sl_mode) {
if (!IS_SA_MODE(get_softmodem_params()) || !get_softmodem_params()->sl_mode) {
init_nsa_message(&rrc_inst[i], reconfig_file, rbconfig_file);
nr_rlc_activate_srb0(mac_inst[i].crnti, NULL, send_srb0_rrc);
}
+4 -7
View File
@@ -407,6 +407,9 @@ int main(int argc, char **argv)
get_common_options(uniqCfg, SOFTMODEM_5GUE_BIT);
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
softmodem_verify_mode(get_softmodem_params());
#if T_TRACER
T_Config_Init();
#endif
@@ -462,12 +465,6 @@ int main(int argc, char **argv)
get_channel_model_mode(uniqCfg);
}
if (get_softmodem_params()->do_ra)
AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n");
if (get_softmodem_params()->sa)
AssertFatal(get_softmodem_params()->phy_test == 0,"Standalone mode and phy_test are mutually exclusive\n");
if (!get_softmodem_params()->nsa && get_softmodem_params()->emulate_l1)
start_oai_nrue_threads();
@@ -481,7 +478,7 @@ int main(int argc, char **argv)
NR_UE_MAC_INST_t *mac = get_mac_inst(inst);
init_nr_ue_phy_cpu_stats(&UE[CC_id]->phy_cpu_stats);
if (get_softmodem_params()->sa || get_softmodem_params()->sl_mode) { // set frame config to initial values from command line
if (IS_SA_MODE(get_softmodem_params()) || get_softmodem_params()->sl_mode) { // set frame config to initial values from command line
// and assume that the SSB is centered on the grid
uint16_t nr_band = get_softmodem_params()->band;
mac->nr_band = nr_band;
+18
View File
@@ -174,6 +174,24 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask)
if (stats_disabled)
set_softmodem_optmask(SOFTMODEM_NOSTATS_BIT);
}
void softmodem_verify_mode(const softmodem_params_t *p)
{
if (IS_SA_MODE(p)) {
LOG_I(UTIL, "running in SA mode (no --phy-test, --do-ra, --nsa option present)\n");
return;
}
if (p->phy_test)
LOG_I(UTIL, "running in phy-test mode (--phy-test)\n");
if (p->do_ra)
LOG_I(UTIL, "running in do-ra mode (--do-ra)\n");
if (p->nsa)
LOG_I(UTIL, "running in NSA mode (--nsa)\n");
int num_modes = p->phy_test + p->do_ra + p->nsa;
AssertFatal(num_modes == 1, "--phy-test, --do-ra, and --nsa are mutually exclusive\n");
}
void softmodem_printresources(int sig, telnet_printfunc_t pf) {
struct rusage usage;
struct timespec stop;
+3 -4
View File
@@ -123,7 +123,6 @@ extern "C"
#define CONTINUOUS_TX softmodem_params.continuous_tx
#define PHY_TEST softmodem_params.phy_test
#define DO_RA softmodem_params.do_ra
#define SA softmodem_params.sa
#define SL_MODE softmodem_params.sl_mode
#define CHAIN_OFFSET softmodem_params.chain_offset
#define NUMEROLOGY softmodem_params.numerology
@@ -154,7 +153,6 @@ extern int usrp_tx_thread;
{"thread-pool", CONFIG_HLP_TPOOL, 0, .strptr=&TP_CONFIG, .defstrval="-1,-1,-1,-1,-1,-1,-1,-1", TYPE_STRING, 0}, \
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, .iptr=&PHY_TEST, .defintval=0, TYPE_INT, 0}, \
{"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, .iptr=&DO_RA, .defintval=0, TYPE_INT, 0}, \
{"sa", CONFIG_HLP_SA, PARAMFLAG_BOOL, .iptr=&SA, .defintval=0, TYPE_INT, 0}, \
{"sl-mode", CONFIG_HLP_SL_MODE, 0, .u8ptr=&SL_MODE, .defintval=0, TYPE_UINT8, 0}, \
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, .u8ptr=&USIM_TEST, .defintval=0, TYPE_UINT8, 0}, \
{"clock-source", CONFIG_HLP_CLK, 0, .uptr=&CLOCK_SOURCE, .defintval=0, TYPE_UINT, 0}, \
@@ -221,7 +219,6 @@ extern int usrp_tx_thread;
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s3a = { config_checkstr_assign_integer, \
{"MONOLITHIC", "PNF", "VNF", "AERIAL","UE_STUB_PNF","UE_STUB_OFFNET","STANDALONE_PNF"}, \
{NFAPI_MONOLITHIC, NFAPI_MODE_PNF, NFAPI_MODE_VNF, NFAPI_MODE_AERIAL,NFAPI_UE_STUB_PNF,NFAPI_UE_STUB_OFFNET,NFAPI_MODE_STANDALONE_PNF}, \
@@ -302,7 +299,6 @@ typedef struct {
char *threadPoolConfig;
int phy_test;
int do_ra;
int sa;
uint8_t sl_mode;
uint8_t usim_test;
int emulate_rf;
@@ -329,6 +325,9 @@ typedef struct {
int threequarter_fs;
} softmodem_params_t;
#define IS_SA_MODE(sM_params) (!(sM_params)->phy_test && !(sM_params)->do_ra && !(sM_params)->nsa)
void softmodem_verify_mode(const softmodem_params_t *p);
uint64_t get_softmodem_optmask(void);
uint64_t set_softmodem_optmask(uint64_t bitmask);
uint64_t clear_softmodem_optmask(uint64_t bitmask);