Commit 3cb68929 authored by Raymond Knopp's avatar Raymond Knopp

CU/DU tested with phoenix + B38 RRU (CU and DU via lo)

parent 849c5e0c
...@@ -56,10 +56,10 @@ ...@@ -56,10 +56,10 @@
#define CONFIG_STRING_MACRLC_LOCAL_S_PORTD "local_s_portd" #define CONFIG_STRING_MACRLC_LOCAL_S_PORTD "local_s_portd"
#define CONFIG_STRING_MACRLC_REMOTE_S_PORTD "remote_s_portd" #define CONFIG_STRING_MACRLC_REMOTE_S_PORTD "remote_s_portd"
#define CONFIG_STRING_MACRLC_SCHED_MODE "scheduler_mode" #define CONFIG_STRING_MACRLC_SCHED_MODE "scheduler_mode"
#define CONFIG_MACRLC_PUSCH10xSNR "puSch10xSnr" #define CONFIG_STRING_MACRLC_PUSCH10xSNR "puSch10xSnr"
#define CONFIG_MACRLC_PUCCH10xSNR "puCch10xSnr" #define CONFIG_STRING_MACRLC_PUCCH10xSNR "puCch10xSnr"
#define CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO "default_sched_dl_algo" #define CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO "default_sched_dl_algo"
#define CONFIG_STRING_MACRLC_UE_MULTIPLE_MAX "ue_multiple_max"
/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* MacRLC configuration parameters */ /* MacRLC configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */ /* optname helpstr paramflags XXXptr defXXXval type numelt */
...@@ -83,10 +83,11 @@ ...@@ -83,10 +83,11 @@
{CONFIG_STRING_MACRLC_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \
{CONFIG_STRING_MACRLC_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \
{CONFIG_STRING_MACRLC_SCHED_MODE, NULL, 0, strptr:NULL, defstrval:"default", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_SCHED_MODE, NULL, 0, strptr:NULL, defstrval:"default", TYPE_STRING, 0}, \
{CONFIG_MACRLC_PUSCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ {CONFIG_STRING_MACRLC_PUSCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
{CONFIG_MACRLC_PUCCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ {CONFIG_STRING_MACRLC_PUCCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
{CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO, NULL, 0, strptr:NULL, defstrval:"round_robin_dl", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO, NULL, 0, strptr:NULL, defstrval:"round_robin_dl", TYPE_STRING, 0}, \
} {CONFIG_STRING_MACRLC_UE_MULTIPLE_MAX, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}}
#define MACRLC_CC_IDX 0 #define MACRLC_CC_IDX 0
#define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1 #define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1
#define MACRLC_LOCAL_N_IF_NAME_IDX 2 #define MACRLC_LOCAL_N_IF_NAME_IDX 2
...@@ -108,6 +109,7 @@ ...@@ -108,6 +109,7 @@
#define MACRLC_PUSCH10xSNR_IDX 18 #define MACRLC_PUSCH10xSNR_IDX 18
#define MACRLC_PUCCH10xSNR_IDX 19 #define MACRLC_PUCCH10xSNR_IDX 19
#define MACRLC_DEFAULT_SCHED_DL_ALGO_IDX 20 #define MACRLC_DEFAULT_SCHED_DL_ALGO_IDX 20
#define MACRLC_UE_MULTIPLE_MAX_IDX 21
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
#endif #endif
...@@ -216,6 +216,7 @@ void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]) { ...@@ -216,6 +216,7 @@ void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]) {
for (j = 0; j < RC.nb_macrlc_inst; j++) { for (j = 0; j < RC.nb_macrlc_inst; j++) {
RC.mac[j]->puSch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCH10xSNR_IDX ].iptr); RC.mac[j]->puSch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCH10xSNR_IDX ].iptr);
RC.mac[j]->puCch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCH10xSNR_IDX ].iptr); RC.mac[j]->puCch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCH10xSNR_IDX ].iptr);
RC.mac[j]->ue_multiple_max = *(MacRLC_ParamList.paramarray[j][MACRLC_UE_MULTIPLE_MAX_IDX ].iptr);
RC.nb_mac_CC[j] = *(MacRLC_ParamList.paramarray[j][MACRLC_CC_IDX].iptr); RC.nb_mac_CC[j] = *(MacRLC_ParamList.paramarray[j][MACRLC_CC_IDX].iptr);
if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_RRC") == 0) { if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_RRC") == 0) {
......
...@@ -86,7 +86,7 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat ...@@ -86,7 +86,7 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
DevAssert(sctp_new_association_resp != NULL); DevAssert(sctp_new_association_resp != NULL);
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) { if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n", LOG_E(F1AP, "Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
sctp_new_association_resp->sctp_state, sctp_new_association_resp->sctp_state,
instance, instance,
sctp_new_association_resp->ulp_cnx_id); sctp_new_association_resp->ulp_cnx_id);
......
...@@ -908,7 +908,7 @@ generate_Msg4(module_id_t module_idP, ...@@ -908,7 +908,7 @@ generate_Msg4(module_id_t module_idP,
} // rach_resource_type > 0 } // rach_resource_type > 0
else { else {
// This is normal LTE case // This is normal LTE case
LOG_I(MAC, "generate_Msg4 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP); LOG_D(MAC, "generate_Msg4 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP);
if ((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP)) { if ((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP)) {
// Get RRCConnectionSetup for Piggyback // Get RRCConnectionSetup for Piggyback
...@@ -925,7 +925,7 @@ generate_Msg4(module_id_t module_idP, ...@@ -925,7 +925,7 @@ generate_Msg4(module_id_t module_idP,
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length); module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);
// AssertFatal(rrc_sdu_length > 0, // AssertFatal(rrc_sdu_length > 0,
// "[MAC][eNB Scheduler] CCCH not allocated, rrc_sdu_length: %d\n", rrc_sdu_length); // "[MAC][eNB Scheduler] CCCH not allocated, rrc_sdu_length: %d\n", rrc_sdu_length);
LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)\n", LOG_D(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti); module_idP, CC_idP, frameP, subframeP, ra->rnti);
/// Choose first 4 RBs for Msg4, should really check that these are free! /// Choose first 4 RBs for Msg4, should really check that these are free!
first_rb = 0; first_rb = 0;
...@@ -1093,7 +1093,7 @@ generate_Msg4(module_id_t module_idP, ...@@ -1093,7 +1093,7 @@ generate_Msg4(module_id_t module_idP,
} }
} // CCE Allocation feasible } // CCE Allocation feasible
} else { } else {
LOG_I(MAC, LOG_D(MAC,
"eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Delaying Msg4 for RRC Piggyback (RNTI %x)\n", "eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Delaying Msg4 for RRC Piggyback (RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti); module_idP, CC_idP, frameP, subframeP, ra->rnti);
ra->Msg4_subframe ++; ra->Msg4_subframe ++;
......
...@@ -193,7 +193,7 @@ void dlsch_scheduler_pre_ue_select_fairRR( ...@@ -193,7 +193,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
// Initialization // Initialization
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
dlsch_ue_max_num[CC_id] = (uint16_t)RC.rrc[module_idP]->configuration.radioresourceconfig[CC_id].ue_multiple_max; dlsch_ue_max_num[CC_id] = eNB->ue_multiple_max;
// save origin DL PDU number // save origin DL PDU number
DL_req = &eNB->DL_req[CC_id].dl_config_request_body; DL_req = &eNB->DL_req[CC_id].dl_config_request_body;
saved_dlsch_dci[CC_id] = DL_req->number_pdu; saved_dlsch_dci[CC_id] = DL_req->number_pdu;
...@@ -2216,7 +2216,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( ...@@ -2216,7 +2216,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
//save ulsch dci number //save ulsch dci number
saved_ulsch_dci[CC_id] = eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body.number_of_dci; saved_ulsch_dci[CC_id] = eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body.number_of_dci;
// maximum multiplicity number // maximum multiplicity number
ulsch_ue_max_num[CC_id] =RC.rrc[module_idP]->configuration.radioresourceconfig[CC_id].ue_multiple_max; ulsch_ue_max_num[CC_id] =eNB->ue_multiple_max;
cc_id_flag[CC_id] = 0; cc_id_flag[CC_id] = 0;
ue_first_num[CC_id] = 0; ue_first_num[CC_id] = 0;
ul_inactivity_num[CC_id] = 0; ul_inactivity_num[CC_id] = 0;
...@@ -2243,6 +2243,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( ...@@ -2243,6 +2243,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
// UL DCI // UL DCI
HI_DCI0_req = &eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body; HI_DCI0_req = &eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body;
if ( (ulsch_ue_select[CC_id].ue_num >= ulsch_ue_max_num[CC_id]) || (cc_id_flag[CC_id] == 1) ) { if ( (ulsch_ue_select[CC_id].ue_num >= ulsch_ue_max_num[CC_id]) || (cc_id_flag[CC_id] == 1) ) {
cc_id_flag[CC_id] = 1; cc_id_flag[CC_id] = 1;
HI_DCI0_req->number_of_dci = saved_ulsch_dci[CC_id]; HI_DCI0_req->number_of_dci = saved_ulsch_dci[CC_id];
...@@ -2257,12 +2258,14 @@ void ulsch_scheduler_pre_ue_select_fairRR( ...@@ -2257,12 +2258,14 @@ void ulsch_scheduler_pre_ue_select_fairRR(
} }
} }
cc = &eNB->common_channels[CC_id]; cc = &eNB->common_channels[CC_id];
//harq_pid //harq_pid
harq_pid = subframe2harqpid(cc,(frameP+(sched_subframeP<subframeP ? 1 : 0)),sched_subframeP); harq_pid = subframe2harqpid(cc,(frameP+(sched_subframeP<subframeP ? 1 : 0)),sched_subframeP);
//round //round
round = UE_info->UE_sched_ctrl[UE_id].round_UL[CC_id][harq_pid]; round = UE_info->UE_sched_ctrl[UE_id].round_UL[CC_id][harq_pid];
if ( round > 0 ) { if ( round > 0 ) {
hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi]; hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
format_flag = 2; format_flag = 2;
...@@ -2290,6 +2293,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( ...@@ -2290,6 +2293,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
if (bytes_to_schedule < 0) bytes_to_schedule = 0; if (bytes_to_schedule < 0) bytes_to_schedule = 0;
if ( UE_id > last_ulsch_ue_id[CC_id] && ((ulsch_ue_select[CC_id].ue_num+ue_first_num[CC_id]) < ulsch_ue_max_num[CC_id]) ) { if ( UE_id > last_ulsch_ue_id[CC_id] && ((ulsch_ue_select[CC_id].ue_num+ue_first_num[CC_id]) < ulsch_ue_max_num[CC_id]) ) {
if ( bytes_to_schedule > 0 ) { if ( bytes_to_schedule > 0 ) {
first_ue_id[CC_id][ue_first_num[CC_id]]= UE_id; first_ue_id[CC_id][ue_first_num[CC_id]]= UE_id;
...@@ -2307,7 +2311,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( ...@@ -2307,7 +2311,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
UE_sched_ctl = &UE_info->UE_sched_ctrl[UE_id]; UE_sched_ctl = &UE_info->UE_sched_ctrl[UE_id];
rrc_status = mac_eNB_get_rrc_status(module_idP, rnti); rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
LOG_D(MAC,"%d.%d : rnti %x rrc_status %d, ul_inactivity %d, ul_scheduled %d\n", frameP,subframeP,rnti,rrc_status,UE_sched_ctl->ul_inactivity_timer,UE_sched_ctl->ul_scheduled);
if ( ((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) || if ( ((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) ||
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) || ((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) ||
((UE_sched_ctl->cqi_req_timer>300)&&((rrc_status >= RRC_CONNECTED))) ) { ((UE_sched_ctl->cqi_req_timer>300)&&((rrc_status >= RRC_CONNECTED))) ) {
...@@ -2417,6 +2421,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( ...@@ -2417,6 +2421,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
if (bytes_to_schedule < 0) bytes_to_schedule = 0; if (bytes_to_schedule < 0) bytes_to_schedule = 0;
rrc_status = mac_eNB_get_rrc_status(module_idP, rnti); rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
if ( (bytes_to_schedule > 0) || (UE_info->UE_template[CC_id][UE_id].ul_SR > 0) || if ( (bytes_to_schedule > 0) || (UE_info->UE_template[CC_id][UE_id].ul_SR > 0) ||
((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) || ((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) ||
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) || ((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) ||
...@@ -2892,7 +2897,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, ...@@ -2892,7 +2897,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu; nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu;
nfapi_ul_config_request_body_t *ul_req_tmp; nfapi_ul_config_request_body_t *ul_req_tmp;
nfapi_ul_config_ulsch_harq_information *ulsch_harq_information; nfapi_ul_config_ulsch_harq_information *ulsch_harq_information;
LOG_D(MAC,"entering ulsch preprocesor\n"); LOG_D(MAC,"entering ulsch preprocesor for %d.%d\n",sched_frame,sched_subframeP);
ulsch_scheduler_pre_processor_fairRR(module_idP, ulsch_scheduler_pre_processor_fairRR(module_idP,
frameP, frameP,
subframeP, subframeP,
...@@ -3103,7 +3108,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, ...@@ -3103,7 +3108,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
T_INT(UE_template->TBS_UL[harq_pid]), T_INT(ndi)); T_INT(UE_template->TBS_UL[harq_pid]), T_INT(ndi));
if (mac_eNB_get_rrc_status(module_idP,rnti) < RRC_CONNECTED) if (mac_eNB_get_rrc_status(module_idP,rnti) < RRC_CONNECTED)
LOG_D(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)\n", LOG_I(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)\n",
module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,UE_template->mcs_UL[harq_pid], module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,UE_template->mcs_UL[harq_pid],
first_rb[CC_id],rb_table[rb_table_index], first_rb[CC_id],rb_table[rb_table_index],
rb_table_index,UE_template->TBS_UL[harq_pid],harq_pid); rb_table_index,UE_template->TBS_UL[harq_pid],harq_pid);
......
...@@ -410,7 +410,7 @@ rx_sdu(const module_id_t enb_mod_idP, ...@@ -410,7 +410,7 @@ rx_sdu(const module_id_t enb_mod_idP,
/* Receiving CRNTI means that the current rnti has to go away */ /* Receiving CRNTI means that the current rnti has to go away */
if (old_UE_id != -1) { if (old_UE_id != -1) {
if (mac_eNB_get_rrc_status(enb_mod_idP,old_rnti) == RRC_HO_EXECUTION) { if (mac_eNB_get_rrc_status(enb_mod_idP,old_rnti) == RRC_HO_EXECUTION) {
LOG_I(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Handover case\n", LOG_D(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Handover case\n",
enb_mod_idP, enb_mod_idP,
frameP, frameP,
subframeP, subframeP,
...@@ -474,7 +474,7 @@ rx_sdu(const module_id_t enb_mod_idP, ...@@ -474,7 +474,7 @@ rx_sdu(const module_id_t enb_mod_idP,
/* Received a new rnti */ /* Received a new rnti */
if (ret == 0) { if (ret == 0) {
ra->state = MSGCRNTI; ra->state = MSGCRNTI;
LOG_I(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Received rnti(Msg4)\n", LOG_D(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Received rnti(Msg4)\n",
enb_mod_idP, enb_mod_idP,
frameP, frameP,
subframeP, subframeP,
......
...@@ -1434,6 +1434,7 @@ typedef struct eNB_MAC_INST_s { ...@@ -1434,6 +1434,7 @@ typedef struct eNB_MAC_INST_s {
int32_t puSch10xSnr; int32_t puSch10xSnr;
int32_t puCch10xSnr; int32_t puCch10xSnr;
int ue_multiple_max;
pthread_t mac_stats_thread; pthread_t mac_stats_thread;
} eNB_MAC_INST; } eNB_MAC_INST;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment