Commit f20125f7 authored by Laurent THOMAS's avatar Laurent THOMAS

fix 4GF1 regressions

parent 970acbe9
...@@ -65,10 +65,13 @@ uint8_t F1AP_get_next_transaction_identifier(instance_t enb_mod_idP, instance_t ...@@ -65,10 +65,13 @@ uint8_t F1AP_get_next_transaction_identifier(instance_t enb_mod_idP, instance_t
} }
f1ap_cudu_inst_t *getCxt(F1_t isCU, instance_t instanceP) { f1ap_cudu_inst_t *getCxt(F1_t isCU, instance_t instanceP) {
static pid_t t=-1; //Fixme: 4G F1 has race condtions, someone may debug it, using this test
pid_t tNew=gettid(); /*
AssertFatal ( t==-1 || t==tNew, "This is not thread safe\n"); static pid_t t=-1;
t=tNew; pid_t tNew=gettid();
AssertFatal ( t==-1 || t==tNew, "This is not thread safe\n");
t=tNew;
*/
AssertFatal( instanceP < sizeofArray(f1_cu_inst), ""); AssertFatal( instanceP < sizeofArray(f1_cu_inst), "");
return isCU == CUtype ? f1_cu_inst[ instanceP]: f1_du_inst[ instanceP]; return isCU == CUtype ? f1_cu_inst[ instanceP]: f1_du_inst[ instanceP];
} }
......
...@@ -100,16 +100,11 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -100,16 +100,11 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
ccch_sdu_len); ccch_sdu_len);
} }
LOG_I(F1AP, "%s() RRCContainer (CCCH) size %ld: ", __func__, LOG_I(F1AP, "%s() RRCContainer (CCCH) size %ld: ", __func__, ie->value.choice.RRCContainer.size);
ie->value.choice.RRCContainer.size);
for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
printf("%02x ", RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
printf("\n");
/* DUtoCURRCContainer */ /* DUtoCURRCContainer */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_DUtoCURRCContainer, true); F1AP_ProtocolIE_ID_id_DUtoCURRCContainer, false);
if (ie) { if (ie) {
NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container = malloc(sizeof(OCTET_STRING_t)); NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container = malloc(sizeof(OCTET_STRING_t));
......
...@@ -430,11 +430,12 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, ...@@ -430,11 +430,12 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si]; F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si];
size_t size = sib_item->sIBmessage.size; size_t size = sib_item->sIBmessage.size;
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[si] = size; F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[si] = size;
LOG_D(F1AP, "F1AP: SI_container_length[%d][%d] %ld bytes\n", i, (int)sib_item->sIBtype, size); LOG_D(F1AP, "F1AP: SI_container_length[%d][%ld] %ld bytes\n", i, sib_item->sIBtype, size);
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[si] = malloc(F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[si]); F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[si] = malloc(F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[si]);
memcpy((void *)F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[si], memcpy((void *)F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[si],
(void *)sib_item->sIBmessage.buf, (void *)sib_item->sIBmessage.buf,
size); size);
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_type[si]=sib_item->sIBtype;
} }
break; break;
...@@ -863,7 +864,7 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -863,7 +864,7 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si]; F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si];
size_t size = sib_item->sIBmessage.size; size_t size = sib_item->sIBmessage.size;
F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[si] = size; F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[si] = size;
LOG_D(F1AP, "F1AP: SI_container_length[%d][%d] %ld bytes\n", i, (int)sib_item->sIBtype, size); LOG_D(F1AP, "F1AP: SI_container_length[%d][%ld] %ld bytes\n", i, sib_item->sIBtype, size);
F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[si] = malloc(F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[si]); F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[si] = malloc(F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[si]);
memcpy((void *)F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[si], memcpy((void *)F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[si],
(void *)sib_item->sIBmessage.buf, (void *)sib_item->sIBmessage.buf,
......
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