Remove --usim-test command line option

Remove the --usim-test option: to my knowledge, it's not used by users,
and is misleadingly placed in various places where there should not be a
difference w.r.t. USIM configuration.

When making the changes, I assumed that --usim-test would be 0 (the
default), which is the case in all executables when not specified in
options except for the nr_dlsim, nr_pbchsmi, nr_ulsim simulators.

The only exception is the initialization of PDCP from the MAC, which is
not correct (the PDCP is in the CU, so it does not make sense to call it
from the MAC which is in the DU). Instead, always initialize from main,
even in the NSA case (NSA was covered by the incorrect initialization
from MAC).

This in turn let to some more cleanup around function du_rlc_data_req().
After receiving GTP packets at the DU, they were given to the PDCP to
enqueue the packet at RLC. This does not work anymore, since the PDCP is
not initialized; it also does not seem necessary, as this enqueue
functionality is necessary to decouple PDCP and RLC to avoid deadlocks
in monolithic, but in split-mode, this cannot happen. Instead, call
directly into the RLC when receiving GTP packets.
This commit is contained in:
Robert Schmidt
2025-07-23 12:12:59 +02:00
parent fc1c762cf2
commit 465d7de5a9
17 changed files with 14 additions and 100 deletions
+6 -18
View File
@@ -1237,15 +1237,9 @@ static NR_ServingCellConfigCommon_t *get_scc_config(configmodule_interface_t *cf
// TODO: Make CSS aggregation levels configurable
int css_num_agg_level_candidates[NUM_PDCCH_AGG_LEVELS];
css_num_agg_level_candidates[PDCCH_AGG_LEVEL1] = NR_SearchSpace__nrofCandidates__aggregationLevel1_n0;
if (get_softmodem_params()->usim_test) {
css_num_agg_level_candidates[PDCCH_AGG_LEVEL2] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n0;
css_num_agg_level_candidates[PDCCH_AGG_LEVEL4] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n1;
css_num_agg_level_candidates[PDCCH_AGG_LEVEL8] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n1;
} else {
css_num_agg_level_candidates[PDCCH_AGG_LEVEL2] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n0;
css_num_agg_level_candidates[PDCCH_AGG_LEVEL4] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n2;
css_num_agg_level_candidates[PDCCH_AGG_LEVEL8] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n0;
}
css_num_agg_level_candidates[PDCCH_AGG_LEVEL2] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n0;
css_num_agg_level_candidates[PDCCH_AGG_LEVEL4] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n2;
css_num_agg_level_candidates[PDCCH_AGG_LEVEL8] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n0;
css_num_agg_level_candidates[PDCCH_AGG_LEVEL16] = NR_SearchSpace__nrofCandidates__aggregationLevel16_n0;
NR_SearchSpace_t *ss1 = rrc_searchspace_config(true, 1, 0, css_num_agg_level_candidates);
@@ -1674,15 +1668,9 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
// Construct default aggragation level list or read from config
int uess_num_agg_level_candidates[NUM_PDCCH_AGG_LEVELS];
uess_num_agg_level_candidates[PDCCH_AGG_LEVEL1] = NR_SearchSpace__nrofCandidates__aggregationLevel1_n0;
if (get_softmodem_params()->usim_test) {
uess_num_agg_level_candidates[PDCCH_AGG_LEVEL2] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n0;
uess_num_agg_level_candidates[PDCCH_AGG_LEVEL4] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n1;
uess_num_agg_level_candidates[PDCCH_AGG_LEVEL8] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n1;
} else {
uess_num_agg_level_candidates[PDCCH_AGG_LEVEL2] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n2;
uess_num_agg_level_candidates[PDCCH_AGG_LEVEL4] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n0;
uess_num_agg_level_candidates[PDCCH_AGG_LEVEL8] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n0;
}
uess_num_agg_level_candidates[PDCCH_AGG_LEVEL2] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n2;
uess_num_agg_level_candidates[PDCCH_AGG_LEVEL4] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n0;
uess_num_agg_level_candidates[PDCCH_AGG_LEVEL8] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n0;
uess_num_agg_level_candidates[PDCCH_AGG_LEVEL16] = NR_SearchSpace__nrofCandidates__aggregationLevel16_n0;
int* agg_level_list = uess_num_agg_level_candidates;
int num_agg_levels = 5;
+1 -2
View File
@@ -2460,8 +2460,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
&& (bsr_len + phr_len + total_rlc_pdu_header_len +
sdu_length_total + MIN_MAC_HDR_RLC_SIZE <= buflen)) {
// Workaround for issue in OAI eNB or EPC which are not able to process SRB2 message multiplexed with SRB1 on the same MAC PDU
if (( get_softmodem_params()->usim_test == 0) && (lcid == DCCH1)
&& (lcid_rlc_pdu_count == 0) && (num_sdus)) {
if ((lcid == DCCH1) && (lcid_rlc_pdu_count == 0) && (num_sdus)) {
// Skip SRB2 multiplex if at least one SRB1 SDU is already multiplexed
break;
}
@@ -94,7 +94,7 @@ bool DURecvCb(protocol_ctxt_t *ctxt_pP,
// The buffer comes from the stack in gtp-u thread, we have a make a separate buffer to enqueue in a inter-thread message queue
uint8_t *sdu = malloc16(sdu_buffer_sizeP);
memcpy(sdu, sdu_buffer_pP, sdu_buffer_sizeP);
du_rlc_data_req(ctxt_pP, srb_flagP, rb_idP, muiP, confirmP, sdu_buffer_sizeP, sdu);
nr_rlc_data_req(ctxt_pP, srb_flagP, rb_idP, muiP, sdu_buffer_sizeP, sdu);
return true;
}
-3
View File
@@ -310,9 +310,6 @@ void mac_top_init_gNB(ngran_node_t node_type,
nr_rlc_op_mode_t mode = NODE_IS_MONOLITHIC(node_type) ? NR_RLC_OP_MODE_MONO_GNB : NR_RLC_OP_MODE_SPLIT_GNB;
int success = nr_rlc_module_init(mode);
AssertFatal(success == 0,"Could not initialize RLC layer\n");
// These should be out of here later
if (get_softmodem_params()->usim_test == 0 ) nr_pdcp_layer_init();
} else {
RC.nrmac = NULL;
}
-16
View File
@@ -218,22 +218,6 @@ static void enqueue_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
if (pthread_mutex_unlock(&q.m) != 0) abort();
}
void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const mui_t muiP,
confirm_t confirmP,
sdu_size_t sdu_sizeP,
uint8_t *sdu_pP)
{
enqueue_rlc_data_req(ctxt_pP,
srb_flagP,
rb_idP, muiP,
confirmP,
sdu_sizeP,
sdu_pP);
}
/****************************************************************************/
/* rlc_data_req queue - end */
/****************************************************************************/
@@ -36,14 +36,6 @@ struct NR_SRB_ToAddMod;
void nr_pdcp_layer_init(void);
void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const mui_t muiP,
confirm_t confirmP,
sdu_size_t sdu_sizeP,
uint8_t *sdu_pP);
bool nr_pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
-12
View File
@@ -4717,18 +4717,6 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname, bool
// UE_EUTRA_Capability->measParameters.bandListEUTRA.list.count = 0; // no measurements on other bands
// UE_EUTRA_Capability->featureGroupIndicators // null
if (get_softmodem_params()->usim_test == 1) {
// featureGroup is mandatory for CMW tests
// featureGroup is filled only for usim-test mode
BIT_STRING_t *bit_string = CALLOC(1, sizeof(*bit_string));
char featrG[4] = { 0x00, 0x08, 0x00, 0x04 };
bit_string->buf = CALLOC(1, 4);
memcpy(bit_string->buf, featrG, 4);
bit_string->size = 4;
bit_string->bits_unused = 0;
UE_EUTRA_Capability->featureGroupIndicators = bit_string;
}
if (get_softmodem_params()->nsa && received_nr_msg)
{
allocate_en_DC_r15(UE_EUTRA_Capability);