Commit 5be3dcf3 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/int-f1-ue-ctxt-release' into integration_2023_w21

parents 3af208c8 bef1a28d
...@@ -31,7 +31,6 @@ rx_func_implem[rx_func] ...@@ -31,7 +31,6 @@ rx_func_implem[rx_func]
--> handle_nr_ulsch --> handle_nr_ulsch
subgraph gNB_dlsch_ulsch_scheduler subgraph gNB_dlsch_ulsch_scheduler
run_pdcp run_pdcp
--> nr_rrc_trigger
--> schedule_xxxx --> schedule_xxxx
end end
handle_nr_ulsch --> gNB_dlsch_ulsch_scheduler handle_nr_ulsch --> gNB_dlsch_ulsch_scheduler
......
...@@ -39,6 +39,7 @@ MESSAGE_DEF(F1AP_UL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_ul_r ...@@ -39,6 +39,7 @@ MESSAGE_DEF(F1AP_UL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_ul_r
//MESSAGE_DEF(F1AP_INITIAL_CONTEXT_SETUP_FAILURE, MESSAGE_PRIORITY_MED, f1ap_initial_context_setup_failure_t, f1ap_initial_context_setup_failure) //MESSAGE_DEF(F1AP_INITIAL_CONTEXT_SETUP_FAILURE, MESSAGE_PRIORITY_MED, f1ap_initial_context_setup_failure_t, f1ap_initial_context_setup_failure)
MESSAGE_DEF(F1AP_UE_CONTEXT_RELEASE_REQ, MESSAGE_PRIORITY_MED, f1ap_ue_context_release_req_t, f1ap_ue_context_release_req) MESSAGE_DEF(F1AP_UE_CONTEXT_RELEASE_REQ, MESSAGE_PRIORITY_MED, f1ap_ue_context_release_req_t, f1ap_ue_context_release_req)
MESSAGE_DEF(F1AP_UE_CONTEXT_RELEASE_CMD, MESSAGE_PRIORITY_MED, f1ap_ue_context_release_cmd_t, f1ap_ue_context_release_cmd) MESSAGE_DEF(F1AP_UE_CONTEXT_RELEASE_CMD, MESSAGE_PRIORITY_MED, f1ap_ue_context_release_cmd_t, f1ap_ue_context_release_cmd)
MESSAGE_DEF(F1AP_UE_CONTEXT_RELEASE_COMPLETE, MESSAGE_PRIORITY_MED, f1ap_ue_context_release_complete_t, f1ap_ue_context_release_complete)
/* RRC -> F1AP messages */ /* RRC -> F1AP messages */
MESSAGE_DEF(F1AP_DL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_dl_rrc_message_t , f1ap_dl_rrc_message ) MESSAGE_DEF(F1AP_DL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_dl_rrc_message_t , f1ap_dl_rrc_message )
......
...@@ -41,14 +41,14 @@ ...@@ -41,14 +41,14 @@
#define F1AP_UL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ul_rrc_message #define F1AP_UL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ul_rrc_message
#define F1AP_UE_CONTEXT_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_setup_req #define F1AP_UE_CONTEXT_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_setup_req
#define F1AP_UE_CONTEXT_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_setup_resp #define F1AP_UE_CONTEXT_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_setup_resp
#define F1AP_UE_CONTEXT_RELEASE_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_release_resp
#define F1AP_UE_CONTEXT_MODIFICATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_modification_req #define F1AP_UE_CONTEXT_MODIFICATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_modification_req
#define F1AP_UE_CONTEXT_MODIFICATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_modification_resp #define F1AP_UE_CONTEXT_MODIFICATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_modification_resp
#define F1AP_UE_CONTEXT_MODIFICATION_FAIL(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_modification_fail #define F1AP_UE_CONTEXT_MODIFICATION_FAIL(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_modification_fail
#define F1AP_DL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_dl_rrc_message #define F1AP_DL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_dl_rrc_message
#define F1AP_UE_CONTEXT_RELEASE_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_release_req #define F1AP_UE_CONTEXT_RELEASE_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_release_req
#define F1AP_UE_CONTEXT_RELEASE_CMD(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_release_req #define F1AP_UE_CONTEXT_RELEASE_CMD(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_release_cmd
#define F1AP_UE_CONTEXT_RELEASE_COMPLETE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_release_complete
#define F1AP_PAGING_IND(mSGpTR) (mSGpTR)->ittiMsg.f1ap_paging_ind #define F1AP_PAGING_IND(mSGpTR) (mSGpTR)->ittiMsg.f1ap_paging_ind
...@@ -425,8 +425,8 @@ typedef struct f1ap_ue_context_release_s { ...@@ -425,8 +425,8 @@ typedef struct f1ap_ue_context_release_s {
long cause_value; long cause_value;
uint8_t *rrc_container; uint8_t *rrc_container;
int rrc_container_length; int rrc_container_length;
} f1ap_ue_context_release_req_t, f1ap_ue_context_release_cmd_t, int srb_id;
f1ap_ue_context_release_cplt_t; } f1ap_ue_context_release_req_t, f1ap_ue_context_release_cmd_t, f1ap_ue_context_release_complete_t;
typedef struct f1ap_paging_ind_s { typedef struct f1ap_paging_ind_s {
uint16_t ueidentityindexvalue; uint16_t ueidentityindexvalue;
......
...@@ -180,7 +180,7 @@ int f1ap_du_add_cu_ue_id(instance_t instanceP, ...@@ -180,7 +180,7 @@ int f1ap_du_add_cu_ue_id(instance_t instanceP,
return -1; return -1;
f1_inst->f1ap_ue[f1ap_uid].cu_ue_f1ap_id = cu_ue_f1ap_id; f1_inst->f1ap_ue[f1ap_uid].cu_ue_f1ap_id = cu_ue_f1ap_id;
LOG_I(F1AP, "Adding cu_ue_f1ap_id %ld for UE with RNTI %x\n", cu_ue_f1ap_id, f1_inst->f1ap_ue[f1ap_uid].rnti); LOG_D(F1AP, "Adding cu_ue_f1ap_id %ld for UE with RNTI %x\n", cu_ue_f1ap_id, f1_inst->f1ap_ue[f1ap_uid].rnti);
return 0; return 0;
} }
......
...@@ -776,10 +776,10 @@ int CU_handle_UE_CONTEXT_SETUP_FAILURE(instance_t instance, ...@@ -776,10 +776,10 @@ int CU_handle_UE_CONTEXT_SETUP_FAILURE(instance_t instance,
AssertFatal(1==0,"Not implemented yet\n"); AssertFatal(1==0,"Not implemented yet\n");
} }
int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, uint32_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream, MessageDef *msg = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_UE_CONTEXT_RELEASE_REQ);
F1AP_F1AP_PDU_t *pdu) { f1ap_ue_context_release_req_t *req = &F1AP_UE_CONTEXT_RELEASE_REQ(msg);
F1AP_UEContextReleaseRequest_t *container; F1AP_UEContextReleaseRequest_t *container;
F1AP_UEContextReleaseRequestIEs_t *ie; F1AP_UEContextReleaseRequestIEs_t *ie;
DevAssert(pdu); DevAssert(pdu);
...@@ -789,6 +789,8 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, ...@@ -789,6 +789,8 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true); F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
const rnti_t rnti = f1ap_get_rnti_by_cu_id(true, instance, const rnti_t rnti = f1ap_get_rnti_by_cu_id(true, instance,
ie->value.choice.GNB_CU_UE_F1AP_ID); ie->value.choice.GNB_CU_UE_F1AP_ID);
req->rnti = rnti;
/* GNB_DU_UE_F1AP_ID */ /* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true); F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
...@@ -796,35 +798,42 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, ...@@ -796,35 +798,42 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
ie->value.choice.GNB_DU_UE_F1AP_ID); ie->value.choice.GNB_DU_UE_F1AP_ID);
AssertFatal(rnti == rnti2, "RNTI obtained through DU ID (%x) is different from CU ID (%x)\n", AssertFatal(rnti == rnti2, "RNTI obtained through DU ID (%x) is different from CU ID (%x)\n",
rnti2, rnti); rnti2, rnti);
/* Cause */ /* Cause */
/* We don't care for the moment
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_Cause, true); F1AP_ProtocolIE_ID_id_Cause, true);
switch(ie->value.choice.Cause.present) switch(ie->value.choice.Cause.present)
{ {
case F1AP_Cause_PR_radioNetwork: case F1AP_Cause_PR_radioNetwork:
//ie->value.choice.Cause.choice.radioNetwork req->cause = F1AP_CAUSE_RADIO_NETWORK;
req->cause_value = ie->value.choice.Cause.choice.radioNetwork;
break; break;
case F1AP_Cause_PR_transport: case F1AP_Cause_PR_transport:
//ie->value.choice.Cause.choice.transport req->cause = F1AP_CAUSE_TRANSPORT;
req->cause_value = ie->value.choice.Cause.choice.transport;
break; break;
case F1AP_Cause_PR_protocol: case F1AP_Cause_PR_protocol:
//ie->value.choice.Cause.choice.protocol req->cause = F1AP_CAUSE_PROTOCOL;
req->cause_value = ie->value.choice.Cause.choice.protocol;
break; break;
case F1AP_Cause_PR_misc: case F1AP_Cause_PR_misc:
//ie->value.choice.Cause.choice.misc req->cause = F1AP_CAUSE_MISC;
req->cause_value = ie->value.choice.Cause.choice.misc;
break; break;
case F1AP_Cause_PR_NOTHING: case F1AP_Cause_PR_NOTHING:
default: default:
req->cause = F1AP_CAUSE_NOTHING;
break; break;
} }
*/
LOG_I(F1AP, "Received UE CONTEXT RELEASE REQUEST: Trigger RRC for RNTI %x\n", rnti);
if (f1ap_req(true, instance)->cell_type==CELL_MACRO_GNB) { F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container, F1AP_ProtocolIE_ID_id_targetCellsToCancel, false);
AssertFatal(false,"must be devlopped\n"); if (ie != NULL) {
} LOG_W(F1AP, "ignoring list of target cells to cancel in UE Context Release Request: implementation missing\n");
}
itti_send_msg_to_task(TASK_RRC_GNB, instance, msg);
return 0; return 0;
} }
...@@ -900,6 +909,13 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, ...@@ -900,6 +909,13 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
ie4->value.present = F1AP_UEContextReleaseCommandIEs__value_PR_RRCContainer; ie4->value.present = F1AP_UEContextReleaseCommandIEs__value_PR_RRCContainer;
OCTET_STRING_fromBuf(&ie4->value.choice.RRCContainer, (const char *)cmd->rrc_container, OCTET_STRING_fromBuf(&ie4->value.choice.RRCContainer, (const char *)cmd->rrc_container,
cmd->rrc_container_length); cmd->rrc_container_length);
// conditionally have SRBID if RRC Container
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextReleaseCommandIEs_t, ie5);
ie5->id = F1AP_ProtocolIE_ID_id_SRBID;
ie5->criticality = F1AP_Criticality_ignore;
ie5->value.present = F1AP_UEContextReleaseCommandIEs__value_PR_SRBID;
ie5->value.choice.SRBID = cmd->srb_id;
} }
/* encode */ /* encode */
......
...@@ -165,6 +165,10 @@ void *F1AP_DU_task(void *arg) { ...@@ -165,6 +165,10 @@ void *F1AP_DU_task(void *arg) {
&F1AP_UE_CONTEXT_RELEASE_REQ(msg)); &F1AP_UE_CONTEXT_RELEASE_REQ(msg));
break; break;
case F1AP_UE_CONTEXT_RELEASE_COMPLETE:
DU_send_UE_CONTEXT_RELEASE_COMPLETE(myInstance, &F1AP_UE_CONTEXT_RELEASE_COMPLETE(msg));
break;
case TERMINATE_MESSAGE: case TERMINATE_MESSAGE:
LOG_W(F1AP, " *** Exiting F1AP thread\n"); LOG_W(F1AP, " *** Exiting F1AP thread\n");
itti_exit_task(); itti_exit_task();
......
...@@ -98,8 +98,6 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -98,8 +98,6 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
if(f1ap_ue_context_setup_req->rnti<0) if(f1ap_ue_context_setup_req->rnti<0)
LOG_E(F1AP, "Could not retrieve UE rnti based on the CU/DU UE id \n"); LOG_E(F1AP, "Could not retrieve UE rnti based on the CU/DU UE id \n");
else
LOG_I(F1AP, "Retrieved rnti is: %d \n", f1ap_ue_context_setup_req->rnti);
/* SpCell_ID */ /* SpCell_ID */
F1AP_UEContextSetupRequestIEs_t *ieNet; F1AP_UEContextSetupRequestIEs_t *ieNet;
...@@ -649,18 +647,13 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, ...@@ -649,18 +647,13 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
return 0; return 0;
} }
int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, uint32_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
F1AP_UEContextReleaseCommand_t *container; F1AP_UEContextReleaseCommand_t *container;
F1AP_UEContextReleaseCommandIEs_t *ie; F1AP_UEContextReleaseCommandIEs_t *ie;
/* ITTI message to NR-RRC for the case of gNB-DU */ f1ap_ue_context_release_req_t ue_context_release = {0};
MessageDef *msg_p; // message to NR-RRC f1ap_ue_context_release_req_t *f1ap_ue_context_release_cmd = &ue_context_release;
msg_p = itti_alloc_new_message(TASK_DU_F1, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
f1ap_ue_context_release_req_t *f1ap_ue_context_release_cmd = &F1AP_UE_CONTEXT_RELEASE_CMD(msg_p);
DevAssert(pdu); DevAssert(pdu);
container = &pdu->choice.initiatingMessage->value.choice.UEContextReleaseCommand; container = &pdu->choice.initiatingMessage->value.choice.UEContextReleaseCommand;
...@@ -680,26 +673,30 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, ...@@ -680,26 +673,30 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_RRCContainer, false); F1AP_ProtocolIE_ID_id_RRCContainer, false);
f1ap_ue_context_release_cmd->rrc_container = malloc(ie->value.choice.RRCContainer.size); if (ie != NULL) {
memcpy(f1ap_ue_context_release_cmd->rrc_container, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size); f1ap_ue_context_release_cmd->rrc_container = malloc(ie->value.choice.RRCContainer.size);
AssertFatal(f1ap_ue_context_release_cmd->rrc_container != NULL, "out of memory\n");
memcpy(f1ap_ue_context_release_cmd->rrc_container, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
f1ap_ue_context_release_cmd->rrc_container_length = ie->value.choice.RRCContainer.size;
// conditionally have SRB ID if there is RRC container
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container, F1AP_ProtocolIE_ID_id_SRBID, true);
f1ap_ue_context_release_cmd->srb_id = ie->value.choice.SRBID;
}
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_Cause, true); F1AP_ProtocolIE_ID_id_Cause, true);
switch (ie->value.choice.Cause.present){ switch (ie->value.choice.Cause.present){
case F1AP_Cause_PR_radioNetwork: case F1AP_Cause_PR_radioNetwork:
LOG_W (F1AP, "UE context release command cause is due to radioNetwork with specific code: %ld\n",ie->value.choice.Cause.choice.radioNetwork);
f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_RADIO_NETWORK; f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_RADIO_NETWORK;
break; break;
case F1AP_Cause_PR_transport: case F1AP_Cause_PR_transport:
LOG_W (F1AP, "UE context release command cause is due to transport with specific code: %ld\n",ie->value.choice.Cause.choice.transport);
f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_TRANSPORT; f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_TRANSPORT;
break; break;
case F1AP_Cause_PR_protocol: case F1AP_Cause_PR_protocol:
LOG_W (F1AP, "UE context release command cause is due to protocol with specific code: %ld\n",ie->value.choice.Cause.choice.protocol);
f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_PROTOCOL; f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_PROTOCOL;
break; break;
case F1AP_Cause_PR_misc: case F1AP_Cause_PR_misc:
LOG_W (F1AP, "UE context release command cause is misc with specific code: %ld \n",ie->value.choice.Cause.choice.misc);
f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_MISC; f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_MISC;
break; break;
default: default:
...@@ -707,12 +704,13 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, ...@@ -707,12 +704,13 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
break; break;
} }
itti_send_msg_to_task(TASK_RRC_GNB, instance, msg_p);
ue_context_release_command(f1ap_ue_context_release_cmd);
return 0; return 0;
} }
int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, f1ap_ue_context_release_complete_t *complete)
f1ap_ue_context_release_cplt_t *cplt) { {
F1AP_F1AP_PDU_t pdu= {0}; F1AP_F1AP_PDU_t pdu= {0};
F1AP_UEContextReleaseComplete_t *out; F1AP_UEContextReleaseComplete_t *out;
/* Create */ /* Create */
...@@ -729,14 +727,14 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, ...@@ -729,14 +727,14 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
ie1->id = F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID; ie1->id = F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
ie1->criticality = F1AP_Criticality_reject; ie1->criticality = F1AP_Criticality_reject;
ie1->value.present = F1AP_UEContextReleaseCompleteIEs__value_PR_GNB_CU_UE_F1AP_ID; ie1->value.present = F1AP_UEContextReleaseCompleteIEs__value_PR_GNB_CU_UE_F1AP_ID;
ie1->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(DUtype, instance, cplt->rnti); ie1->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(DUtype, instance, complete->rnti);
/* mandatory */ /* mandatory */
/* c2. GNB_DU_UE_F1AP_ID */ /* c2. GNB_DU_UE_F1AP_ID */
asn1cSequenceAdd(out->protocolIEs.list,F1AP_UEContextReleaseCompleteIEs_t, ie2); asn1cSequenceAdd(out->protocolIEs.list,F1AP_UEContextReleaseCompleteIEs_t, ie2);
ie2->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID; ie2->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
ie2->criticality = F1AP_Criticality_reject; ie2->criticality = F1AP_Criticality_reject;
ie2->value.present = F1AP_UEContextReleaseCompleteIEs__value_PR_GNB_DU_UE_F1AP_ID; ie2->value.present = F1AP_UEContextReleaseCompleteIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie2->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(DUtype, instance, cplt->rnti); ie2->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(DUtype, instance, complete->rnti);
/* optional -> currently not used */ /* optional -> currently not used */
/* c3. CriticalityDiagnostics */ /* c3. CriticalityDiagnostics */
//if (0) { //if (0) {
...@@ -798,7 +796,7 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, ...@@ -798,7 +796,7 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
buffer, buffer,
len, len,
getCxt(false, instance)->default_sctp_stream_id); getCxt(false, instance)->default_sctp_stream_id);
f1ap_remove_ue(DUtype, instance, cplt->rnti); f1ap_remove_ue(DUtype, instance, complete->rnti);
return 0; return 0;
} }
......
...@@ -63,9 +63,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, ...@@ -63,9 +63,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
/* /*
* UE Context Release Complete (gNB-DU initiated) * UE Context Release Complete (gNB-DU initiated)
*/ */
int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, f1ap_ue_context_release_complete_t *complete);
f1ap_ue_context_release_cplt_t *cplt);
/* /*
* UE Context Modification (gNB-CU initiated) * UE Context Modification (gNB-CU initiated)
......
...@@ -271,17 +271,6 @@ bool set_ul_ptrs_values(NR_PTRS_UplinkConfig_t *ul_ptrs_config, ...@@ -271,17 +271,6 @@ bool set_ul_ptrs_values(NR_PTRS_UplinkConfig_t *ul_ptrs_config,
@returns transformPrecoding value */ @returns transformPrecoding value */
long get_transformPrecoding(const NR_UE_UL_BWP_t *current_UL_BWP, nr_dci_format_t dci_format, uint8_t configuredGrant); long get_transformPrecoding(const NR_UE_UL_BWP_t *current_UL_BWP, nr_dci_format_t dci_format, uint8_t configuredGrant);
void nr_mac_gNB_rrc_ul_failure(const module_id_t Mod_instP,
const int CC_idP,
const frame_t frameP,
const sub_frame_t subframeP,
const rnti_t rntiP);
void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP,
const frame_t frameP,
const sub_frame_t subframeP,
const rnti_t rntiP);
uint8_t number_of_bits_set(uint8_t buf); uint8_t number_of_bits_set(uint8_t buf);
void compute_rsrp_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig, void compute_rsrp_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h" #include "UTIL/OPT/opt.h"
#include "RRC/NR/nr_rrc_extern.h" #include "openair2/X2AP/x2ap_eNB.h"
#include "nr_pdcp/nr_pdcp_oai_api.h" #include "nr_pdcp/nr_pdcp_oai_api.h"
...@@ -174,7 +174,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_ ...@@ -174,7 +174,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_
void nr_pdcp_tick(int frame, int subframe); void nr_pdcp_tick(int frame, int subframe);
nr_rlc_tick(frame, slot >> *scc->ssbSubcarrierSpacing); nr_rlc_tick(frame, slot >> *scc->ssbSubcarrierSpacing);
nr_pdcp_tick(frame, slot >> *scc->ssbSubcarrierSpacing); nr_pdcp_tick(frame, slot >> *scc->ssbSubcarrierSpacing);
nr_rrc_trigger(&ctxt, 0 /*CC_id*/, frame, slot >> *scc->ssbSubcarrierSpacing); if (is_x2ap_enabled())
x2ap_trigger();
} }
for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
......
...@@ -1796,8 +1796,7 @@ static void nr_generate_Msg3_dcch_dtch_response(module_id_t module_idP, ...@@ -1796,8 +1796,7 @@ static void nr_generate_Msg3_dcch_dtch_response(module_id_t module_idP,
configure_UE_BWP(nr_mac, scc, sched_ctrl, NULL, UE, 0, 0); configure_UE_BWP(nr_mac, scc, sched_ctrl, NULL, UE, 0, 0);
// Reset uplink failure flags/counters/timers at MAC so gNB will resume again scheduling resources for this UE // Reset uplink failure flags/counters/timers at MAC so gNB will resume again scheduling resources for this UE
sched_ctrl->pusch_consecutive_dtx_cnt = 0; nr_mac_reset_ul_failure(sched_ctrl);
sched_ctrl->ul_failure = 0;
} }
static void nr_generate_Msg4(module_id_t module_idP, static void nr_generate_Msg4(module_id_t module_idP,
......
...@@ -577,7 +577,7 @@ static void pf_dl(module_id_t module_id, ...@@ -577,7 +577,7 @@ static void pf_dl(module_id_t module_id,
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
NR_UE_DL_BWP_t *current_BWP = &UE->current_DL_BWP; NR_UE_DL_BWP_t *current_BWP = &UE->current_DL_BWP;
if (sched_ctrl->ul_failure==1) if (sched_ctrl->ul_failure)
continue; continue;
const NR_mac_dir_stats_t *stats = &UE->mac_stats.dl; const NR_mac_dir_stats_t *stats = &UE->mac_stats.dl;
...@@ -898,7 +898,8 @@ void nr_schedule_ue_spec(module_id_t module_id, ...@@ -898,7 +898,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
NR_UE_DL_BWP_t *current_BWP = &UE->current_DL_BWP; NR_UE_DL_BWP_t *current_BWP = &UE->current_DL_BWP;
if (sched_ctrl->ul_failure==1 && get_softmodem_params()->phy_test==0) continue; if (sched_ctrl->ul_failure && !get_softmodem_params()->phy_test)
continue;
NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch; NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
UE->mac_stats.dl.current_bytes = 0; UE->mac_stats.dl.current_bytes = 0;
......
...@@ -2785,6 +2785,19 @@ void nr_mac_update_timers(module_id_t module_id, ...@@ -2785,6 +2785,19 @@ void nr_mac_update_timers(module_id_t module_id,
NR_UEs_t *UE_info = &RC.nrmac[module_id]->UE_info; NR_UEs_t *UE_info = &RC.nrmac[module_id]->UE_info;
UE_iterator(UE_info->list, UE) { UE_iterator(UE_info->list, UE) {
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
if (nr_mac_check_release(sched_ctrl, UE->rnti)) {
nr_rlc_remove_ue(UE->rnti);
mac_remove_nr_ue(RC.nrmac[module_id], UE->rnti);
// go back to examine the next UE, which is at the position the
// current UE was
UE--;
continue;
}
/* check if UL failure and trigger release request if necessary */
nr_mac_check_ul_failure(RC.nrmac[module_id], UE->rnti, sched_ctrl);
if (sched_ctrl->rrc_processing_timer > 0) { if (sched_ctrl->rrc_processing_timer > 0) {
sched_ctrl->rrc_processing_timer--; sched_ctrl->rrc_processing_timer--;
if (sched_ctrl->rrc_processing_timer == 0) { if (sched_ctrl->rrc_processing_timer == 0) {
...@@ -2946,3 +2959,53 @@ void prepare_initial_ul_rrc_message(gNB_MAC_INST *mac, NR_UE_info_t *UE) ...@@ -2946,3 +2959,53 @@ void prepare_initial_ul_rrc_message(gNB_MAC_INST *mac, NR_UE_info_t *UE)
DevAssert(bearer->servedRadioBearer->choice.srb_Identity == 1); DevAssert(bearer->servedRadioBearer->choice.srb_Identity == 1);
nr_rlc_add_srb(UE->rnti, DCCH, bearer); nr_rlc_add_srb(UE->rnti, DCCH, bearer);
} }
void nr_mac_trigger_release_timer(NR_UE_sched_ctrl_t *sched_ctrl, NR_SubcarrierSpacing_t subcarrier_spacing)
{
// trigger 60ms
sched_ctrl->release_timer = 60 << subcarrier_spacing;
}
bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl, int rnti)
{
if (sched_ctrl->release_timer == 0)
return false;
sched_ctrl->release_timer--;
return sched_ctrl->release_timer == 0;
}
void nr_mac_trigger_ul_failure(NR_UE_sched_ctrl_t *sched_ctrl, NR_SubcarrierSpacing_t subcarrier_spacing)
{
if (sched_ctrl->ul_failure) {
/* already running */
return;
}
sched_ctrl->ul_failure = true;
// 30 seconds till triggering release request
sched_ctrl->ul_failure_timer = 30000 << subcarrier_spacing;
}
void nr_mac_reset_ul_failure(NR_UE_sched_ctrl_t *sched_ctrl)
{
sched_ctrl->ul_failure = false;
sched_ctrl->ul_failure_timer = 0;
sched_ctrl->pusch_consecutive_dtx_cnt = 0;
}
void nr_mac_check_ul_failure(const gNB_MAC_INST *nrmac, int rnti, NR_UE_sched_ctrl_t *sched_ctrl)
{
if (!sched_ctrl->ul_failure)
return;
if (sched_ctrl->ul_failure_timer > 0)
sched_ctrl->ul_failure_timer--;
/* to trigger only once: trigger when ul_failure_timer == 1, but timer will
* stop at 0 and we wait for a UE release command from upper layers */
if (sched_ctrl->ul_failure_timer == 1) {
f1ap_ue_context_release_complete_t complete = {
.rnti = rnti,
.cause = F1AP_CAUSE_RADIO_NETWORK,
.cause_value = 12, // F1AP_CauseRadioNetwork_rl_failure_others
};
nrmac->mac_rrc.ue_context_release_request(&complete);
}
}
...@@ -260,8 +260,7 @@ void nr_schedule_srs(int module_id, frame_t frame, int slot) ...@@ -260,8 +260,7 @@ void nr_schedule_srs(int module_id, frame_t frame, int slot)
sched_ctrl->sched_srs.srs_scheduled = false; sched_ctrl->sched_srs.srs_scheduled = false;
} }
if((sched_ctrl->ul_failure == 1 && get_softmodem_params()->phy_test==0) || if ((sched_ctrl->ul_failure && !get_softmodem_params()->phy_test) || sched_ctrl->rrc_processing_timer > 0) {
sched_ctrl->rrc_processing_timer > 0) {
continue; continue;
} }
......
...@@ -209,7 +209,7 @@ void nr_csi_meas_reporting(int Mod_idP, ...@@ -209,7 +209,7 @@ void nr_csi_meas_reporting(int Mod_idP,
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP; NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP;
const int n_slots_frame = nr_slots_per_frame[ul_bwp->scs]; const int n_slots_frame = nr_slots_per_frame[ul_bwp->scs];
if ((sched_ctrl->rrc_processing_timer > 0) || (sched_ctrl->ul_failure==1 && get_softmodem_params()->phy_test==0)) { if ((sched_ctrl->rrc_processing_timer > 0) || (sched_ctrl->ul_failure && !get_softmodem_params()->phy_test)) {
continue; continue;
} }
const NR_CSI_MeasConfig_t *csi_measconfig = ul_bwp->csi_MeasConfig; const NR_CSI_MeasConfig_t *csi_measconfig = ul_bwp->csi_MeasConfig;
...@@ -1216,7 +1216,8 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot) ...@@ -1216,7 +1216,8 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot)
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP; NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP;
const int n_slots_frame = nr_slots_per_frame[ul_bwp->scs]; const int n_slots_frame = nr_slots_per_frame[ul_bwp->scs];
if (sched_ctrl->ul_failure==1 || sched_ctrl->rrc_processing_timer>0) continue; if (sched_ctrl->ul_failure || sched_ctrl->rrc_processing_timer > 0)
continue;
NR_PUCCH_Config_t *pucch_Config = ul_bwp->pucch_Config; NR_PUCCH_Config_t *pucch_Config = ul_bwp->pucch_Config;
if (!pucch_Config || !pucch_Config->schedulingRequestResourceToAddModList) if (!pucch_Config || !pucch_Config->schedulingRequestResourceToAddModList)
......
...@@ -671,9 +671,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP, ...@@ -671,9 +671,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
if (!get_softmodem_params()->phy_test && UE->UE_sched_ctrl.pusch_consecutive_dtx_cnt >= pusch_failure_thres) { if (!get_softmodem_params()->phy_test && UE->UE_sched_ctrl.pusch_consecutive_dtx_cnt >= pusch_failure_thres) {
LOG_W(NR_MAC,"Detected UL Failure on PUSCH after %d PUSCH DTX, stopping scheduling\n", LOG_W(NR_MAC,"Detected UL Failure on PUSCH after %d PUSCH DTX, stopping scheduling\n",
UE->UE_sched_ctrl.pusch_consecutive_dtx_cnt); UE->UE_sched_ctrl.pusch_consecutive_dtx_cnt);
UE->UE_sched_ctrl.ul_failure = 1; nr_mac_trigger_ul_failure(&UE->UE_sched_ctrl, UE->current_UL_BWP.scs);
nr_mac_gNB_rrc_ul_failure(gnb_mod_idP,CC_idP,frameP,slotP,rntiP);
} }
} }
} else if(sduP) { } else if(sduP) {
...@@ -757,11 +755,9 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP, ...@@ -757,11 +755,9 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
LOG_D(NR_MAC, "[UE %04x] PUSCH TPC %d and TA %d\n", UE_msg3_stage->rnti, UE_scheduling_control->tpc0, UE_scheduling_control->ta_update); LOG_D(NR_MAC, "[UE %04x] PUSCH TPC %d and TA %d\n", UE_msg3_stage->rnti, UE_scheduling_control->tpc0, UE_scheduling_control->ta_update);
if (ra->cfra) { if (ra->cfra) {
LOG_A(NR_MAC, "(rnti 0x%04x) CFRA procedure succeeded!\n", ra->rnti); LOG_A(NR_MAC, "(rnti 0x%04x) CFRA procedure succeeded!\n", ra->rnti);
nr_mac_gNB_rrc_ul_failure_reset(gnb_mod_idP, frameP, slotP, ra->rnti); nr_mac_reset_ul_failure(UE_scheduling_control);
reset_dl_harq_list(UE_scheduling_control); reset_dl_harq_list(UE_scheduling_control);
reset_ul_harq_list(UE_scheduling_control); reset_ul_harq_list(UE_scheduling_control);
UE_scheduling_control->pusch_consecutive_dtx_cnt = 0;
UE_scheduling_control->ul_failure = 0;
UE_msg3_stage->ra_timer = 0; UE_msg3_stage->ra_timer = 0;
nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra);
process_CellGroup(ra->CellGroup, UE_scheduling_control); process_CellGroup(ra->CellGroup, UE_scheduling_control);
...@@ -793,8 +789,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP, ...@@ -793,8 +789,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
return; return;
} else { } else {
// The UE identified by C-RNTI still exists at the gNB // The UE identified by C-RNTI still exists at the gNB
// Reset uplink failure flags/counters/timers at RRC nr_mac_reset_ul_failure(&UE_C->UE_sched_ctrl);
nr_mac_gNB_rrc_ul_failure_reset(gnb_mod_idP, frameP, slotP, ra->crnti);
// Reset HARQ processes // Reset HARQ processes
reset_dl_harq_list(&UE_C->UE_sched_ctrl); reset_dl_harq_list(&UE_C->UE_sched_ctrl);
...@@ -1638,7 +1633,7 @@ static void pf_ul(module_id_t module_id, ...@@ -1638,7 +1633,7 @@ static void pf_ul(module_id_t module_id,
UE_iterator(UE_list, UE) { UE_iterator(UE_list, UE) {
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
if (UE->Msg4_ACKed != true || sched_ctrl->ul_failure == 1) if (UE->Msg4_ACKed != true || sched_ctrl->ul_failure)
continue; continue;
LOG_D(NR_MAC,"pf_ul: preparing UL scheduling for UE %04x\n",UE->rnti); LOG_D(NR_MAC,"pf_ul: preparing UL scheduling for UE %04x\n",UE->rnti);
...@@ -2067,7 +2062,8 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot, n ...@@ -2067,7 +2062,8 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot, n
const NR_SIB1_t *sib1 = nr_mac->common_channels[0].sib1 ? nr_mac->common_channels[0].sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL; const NR_SIB1_t *sib1 = nr_mac->common_channels[0].sib1 ? nr_mac->common_channels[0].sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL;
UE_iterator( UE_info->list, UE) { UE_iterator( UE_info->list, UE) {
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
if (sched_ctrl->ul_failure == 1 && get_softmodem_params()->phy_test==0) continue; if (sched_ctrl->ul_failure && !get_softmodem_params()->phy_test)
continue;
NR_CellGroupConfig_t *cg = UE->CellGroup; NR_CellGroupConfig_t *cg = UE->CellGroup;
NR_UE_UL_BWP_t *current_BWP = &UE->current_UL_BWP; NR_UE_UL_BWP_t *current_BWP = &UE->current_UL_BWP;
......
...@@ -440,4 +440,11 @@ void send_initial_ul_rrc_message(gNB_MAC_INST *mac, int rnti, const uint8_t *sdu ...@@ -440,4 +440,11 @@ void send_initial_ul_rrc_message(gNB_MAC_INST *mac, int rnti, const uint8_t *sdu
void abort_nr_dl_harq(NR_UE_info_t* UE, int8_t harq_pid); void abort_nr_dl_harq(NR_UE_info_t* UE, int8_t harq_pid);
void nr_mac_trigger_release_timer(NR_UE_sched_ctrl_t *sched_ctrl, NR_SubcarrierSpacing_t subcarrier_spacing);
bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl, int rnti);
void nr_mac_trigger_ul_failure(NR_UE_sched_ctrl_t *sched_ctrl, NR_SubcarrierSpacing_t subcarrier_spacing);
void nr_mac_reset_ul_failure(NR_UE_sched_ctrl_t *sched_ctrl);
void nr_mac_check_ul_failure(const gNB_MAC_INST *nrmac, int rnti, NR_UE_sched_ctrl_t *sched_ctrl);
#endif /*__LAYER2_NR_MAC_PROTO_H__*/ #endif /*__LAYER2_NR_MAC_PROTO_H__*/
...@@ -147,9 +147,36 @@ void ue_context_setup_request(const f1ap_ue_context_setup_t *req) ...@@ -147,9 +147,36 @@ void ue_context_setup_request(const f1ap_ue_context_setup_t *req)
free(resp.du_to_cu_rrc_information); free(resp.du_to_cu_rrc_information);
} }
void ue_context_release_command(const f1ap_ue_context_release_cmd_t *cmd)
{
/* mark UE as to be deleted after PUSCH failure */
gNB_MAC_INST *mac = RC.nrmac[0];
pthread_mutex_lock(&mac->sched_lock);
NR_UE_info_t *UE = find_nr_UE(&mac->UE_info, cmd->rnti);
if (UE->UE_sched_ctrl.ul_failure || cmd->rrc_container_length == 0) {
/* The UE is already not connected anymore or we have nothing to forward*/
nr_rlc_remove_ue(cmd->rnti);
mac_remove_nr_ue(mac, cmd->rnti);
} else {
/* UE is in sync: forward release message and mark to be deleted
* after UL failure */
nr_rlc_srb_recv_sdu(cmd->rnti, cmd->srb_id, cmd->rrc_container, cmd->rrc_container_length);
nr_mac_trigger_release_timer(&UE->UE_sched_ctrl, UE->current_UL_BWP.scs);
}
pthread_mutex_unlock(&mac->sched_lock);
f1ap_ue_context_release_complete_t complete = {
.rnti = cmd->rnti,
};
mac->mac_rrc.ue_context_release_complete(&complete);
if (cmd->rrc_container)
free(cmd->rrc_container);
}
int dl_rrc_message(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc) int dl_rrc_message(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc)
{ {
LOG_I(NR_MAC, "DL RRC Message Transfer with %d bytes for RNTI %04x SRB %d\n", dl_rrc->rrc_container_length, dl_rrc->rnti, dl_rrc->srb_id); LOG_D(NR_MAC, "DL RRC Message Transfer with %d bytes for RNTI %04x SRB %d\n", dl_rrc->rrc_container_length, dl_rrc->rnti, dl_rrc->srb_id);
nr_rlc_srb_recv_sdu(dl_rrc->rnti, dl_rrc->srb_id, dl_rrc->rrc_container, dl_rrc->rrc_container_length); nr_rlc_srb_recv_sdu(dl_rrc->rnti, dl_rrc->srb_id, dl_rrc->rrc_container, dl_rrc->rrc_container_length);
return 0; return 0;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "f1ap_messages_types.h" #include "f1ap_messages_types.h"
void ue_context_setup_request(const f1ap_ue_context_setup_t *req); void ue_context_setup_request(const f1ap_ue_context_setup_t *req);
void ue_context_release_command(const f1ap_ue_context_release_cmd_t *cmd);
int dl_rrc_message(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc); int dl_rrc_message(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc);
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include "f1ap_messages_types.h" #include "f1ap_messages_types.h"
typedef void (*ue_context_setup_response_func_t)(const f1ap_ue_context_setup_t* req, const f1ap_ue_context_setup_t *resp); typedef void (*ue_context_setup_response_func_t)(const f1ap_ue_context_setup_t* req, const f1ap_ue_context_setup_t *resp);
typedef void (*ue_context_release_request_func_t)(const f1ap_ue_context_release_req_t* req);
typedef void (*ue_context_release_complete_func_t)(const f1ap_ue_context_release_complete_t *complete);
typedef void (*initial_ul_rrc_message_transfer_func_t)(module_id_t module_id, const f1ap_initial_ul_rrc_message_t *ul_rrc); typedef void (*initial_ul_rrc_message_transfer_func_t)(module_id_t module_id, const f1ap_initial_ul_rrc_message_t *ul_rrc);
......
...@@ -55,6 +55,22 @@ static void ue_context_setup_response_direct(const f1ap_ue_context_setup_t *req, ...@@ -55,6 +55,22 @@ static void ue_context_setup_response_direct(const f1ap_ue_context_setup_t *req,
itti_send_msg_to_task(TASK_RRC_GNB, 0, msg); itti_send_msg_to_task(TASK_RRC_GNB, 0, msg);
} }
static void ue_context_release_request_direct(const f1ap_ue_context_release_req_t* req)
{
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_UE_CONTEXT_RELEASE_REQ);
f1ap_ue_context_release_req_t *f1ap_msg = &F1AP_UE_CONTEXT_RELEASE_REQ(msg);
*f1ap_msg = *req;
itti_send_msg_to_task(TASK_RRC_GNB, 0, msg);
}
static void ue_context_release_complete_direct(const f1ap_ue_context_release_complete_t *complete)
{
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_UE_CONTEXT_RELEASE_COMPLETE);
f1ap_ue_context_release_complete_t *f1ap_msg = &F1AP_UE_CONTEXT_RELEASE_COMPLETE(msg);
*f1ap_msg = *complete;
itti_send_msg_to_task(TASK_RRC_GNB, 0, msg);
}
static void initial_ul_rrc_message_transfer_direct(module_id_t module_id, const f1ap_initial_ul_rrc_message_t *ul_rrc) static void initial_ul_rrc_message_transfer_direct(module_id_t module_id, const f1ap_initial_ul_rrc_message_t *ul_rrc)
{ {
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_INITIAL_UL_RRC_MESSAGE); MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_INITIAL_UL_RRC_MESSAGE);
...@@ -78,5 +94,7 @@ static void initial_ul_rrc_message_transfer_direct(module_id_t module_id, const ...@@ -78,5 +94,7 @@ static void initial_ul_rrc_message_transfer_direct(module_id_t module_id, const
void mac_rrc_ul_direct_init(struct nr_mac_rrc_ul_if_s *mac_rrc) void mac_rrc_ul_direct_init(struct nr_mac_rrc_ul_if_s *mac_rrc)
{ {
mac_rrc->ue_context_setup_response = ue_context_setup_response_direct; mac_rrc->ue_context_setup_response = ue_context_setup_response_direct;
mac_rrc->ue_context_release_request = ue_context_release_request_direct;
mac_rrc->ue_context_release_complete = ue_context_release_complete_direct;
mac_rrc->initial_ul_rrc_message_transfer = initial_ul_rrc_message_transfer_direct; mac_rrc->initial_ul_rrc_message_transfer = initial_ul_rrc_message_transfer_direct;
} }
...@@ -60,6 +60,24 @@ static void ue_context_setup_response_f1ap(const f1ap_ue_context_setup_t *req, c ...@@ -60,6 +60,24 @@ static void ue_context_setup_response_f1ap(const f1ap_ue_context_setup_t *req, c
itti_send_msg_to_task(TASK_DU_F1, 0, msg); itti_send_msg_to_task(TASK_DU_F1, 0, msg);
} }
static void ue_context_release_request_f1ap(const f1ap_ue_context_release_req_t* req)
{
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_UE_CONTEXT_RELEASE_REQ);
f1ap_ue_context_release_req_t *f1ap_msg = &F1AP_UE_CONTEXT_RELEASE_REQ(msg);
*f1ap_msg = *req;
itti_send_msg_to_task(TASK_DU_F1, 0, msg);
}
static void ue_context_release_complete_f1ap(const f1ap_ue_context_release_complete_t *complete)
{
newGtpuDeleteAllTunnels(0, complete->rnti);
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_UE_CONTEXT_RELEASE_COMPLETE);
f1ap_ue_context_release_complete_t *f1ap_msg = &F1AP_UE_CONTEXT_RELEASE_COMPLETE(msg);
*f1ap_msg = *complete;
itti_send_msg_to_task(TASK_DU_F1, 0, msg);
}
static void initial_ul_rrc_message_transfer_f1ap(module_id_t module_id, const f1ap_initial_ul_rrc_message_t *ul_rrc) static void initial_ul_rrc_message_transfer_f1ap(module_id_t module_id, const f1ap_initial_ul_rrc_message_t *ul_rrc)
{ {
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_INITIAL_UL_RRC_MESSAGE); MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_INITIAL_UL_RRC_MESSAGE);
...@@ -83,6 +101,8 @@ static void initial_ul_rrc_message_transfer_f1ap(module_id_t module_id, const f1 ...@@ -83,6 +101,8 @@ static void initial_ul_rrc_message_transfer_f1ap(module_id_t module_id, const f1
void mac_rrc_ul_f1ap_init(struct nr_mac_rrc_ul_if_s *mac_rrc) void mac_rrc_ul_f1ap_init(struct nr_mac_rrc_ul_if_s *mac_rrc)
{ {
mac_rrc->ue_context_setup_response = ue_context_setup_response_f1ap; mac_rrc->ue_context_setup_response = ue_context_setup_response_f1ap;
mac_rrc->ue_context_release_request = ue_context_release_request_f1ap;
mac_rrc->ue_context_release_complete = ue_context_release_complete_f1ap;
mac_rrc->initial_ul_rrc_message_transfer = initial_ul_rrc_message_transfer_f1ap; mac_rrc->initial_ul_rrc_message_transfer = initial_ul_rrc_message_transfer_f1ap;
} }
...@@ -591,7 +591,9 @@ typedef struct { ...@@ -591,7 +591,9 @@ typedef struct {
uint8_t current_harq_pid; uint8_t current_harq_pid;
int pusch_consecutive_dtx_cnt; int pusch_consecutive_dtx_cnt;
int pucch_consecutive_dtx_cnt; int pucch_consecutive_dtx_cnt;
int ul_failure; bool ul_failure;
int ul_failure_timer;
int release_timer;
struct CSI_Report CSI_report; struct CSI_Report CSI_report;
bool SR; bool SR;
/// information about every HARQ process /// information about every HARQ process
...@@ -659,8 +661,9 @@ typedef struct NR_bler_options { ...@@ -659,8 +661,9 @@ typedef struct NR_bler_options {
} NR_bler_options_t; } NR_bler_options_t;
typedef struct nr_mac_rrc_ul_if_s { typedef struct nr_mac_rrc_ul_if_s {
/* TODO add other message types as necessary */
ue_context_setup_response_func_t ue_context_setup_response; ue_context_setup_response_func_t ue_context_setup_response;
ue_context_release_request_func_t ue_context_release_request;
ue_context_release_complete_func_t ue_context_release_complete;
initial_ul_rrc_message_transfer_func_t initial_ul_rrc_message_transfer; initial_ul_rrc_message_transfer_func_t initial_ul_rrc_message_transfer;
} nr_mac_rrc_ul_if_t; } nr_mac_rrc_ul_if_t;
......
...@@ -675,8 +675,7 @@ static void deliver_pdu_drb(void *deliver_pdu_data, ue_id_t ue_id, int rb_id, ...@@ -675,8 +675,7 @@ static void deliver_pdu_drb(void *deliver_pdu_data, ue_id_t ue_id, int rb_id,
req->offset = GTPU_HEADER_OVERHEAD_MAX; req->offset = GTPU_HEADER_OVERHEAD_MAX;
req->ue_id = ue_id; req->ue_id = ue_id;
req->bearer_id = rb_id; req->bearer_id = rb_id;
LOG_I(PDCP, "%s() (drb %d) sending message to gtp size %d\n", LOG_D(PDCP, "%s() (drb %d) sending message to gtp size %d\n", __func__, rb_id, size);
__func__, rb_id, size);
extern instance_t CUuniqInstance; extern instance_t CUuniqInstance;
itti_send_msg_to_task(TASK_GTPV1_U, CUuniqInstance, message_p); itti_send_msg_to_task(TASK_GTPV1_U, CUuniqInstance, message_p);
} else { } else {
......
...@@ -118,32 +118,3 @@ int8_t nr_mac_rrc_bwp_switch_req(const module_id_t module_idP, ...@@ -118,32 +118,3 @@ int8_t nr_mac_rrc_bwp_switch_req(const module_id_t module_idP,
return 0; return 0;
} }
void nr_mac_gNB_rrc_ul_failure(const module_id_t Mod_instP,
const int CC_idP,
const frame_t frameP,
const sub_frame_t subframeP,
const rnti_t rntiP) {
rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[Mod_instP], rntiP);
if (ue_context_p != NULL) {
LOG_D(RRC,"Frame %d, Subframe %d: UE %x UL failure, activating timer\n",frameP,subframeP,rntiP);
if(ue_context_p->ue_context.ul_failure_timer == 0)
ue_context_p->ue_context.ul_failure_timer=1;
} else {
LOG_D(RRC,"Frame %d, Subframe %d: UL failure: UE %x unknown \n",frameP,subframeP,rntiP);
}
}
void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP,
const frame_t frameP,
const sub_frame_t subframeP,
const rnti_t rntiP) {
rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[Mod_instP], rntiP);
if (ue_context_p != NULL) {
LOG_W(RRC,"Frame %d, Subframe %d: UE %x UL failure reset, deactivating timer\n",frameP,subframeP,rntiP);
ue_context_p->ue_context.ul_failure_timer=0;
} else {
LOG_W(RRC,"Frame %d, Subframe %d: UL failure reset: UE %x unknown \n",frameP,subframeP,rntiP);
}
}
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "f1ap_messages_types.h" #include "f1ap_messages_types.h"
typedef void (*ue_context_setup_request_func_t)(const f1ap_ue_context_setup_t *req); typedef void (*ue_context_setup_request_func_t)(const f1ap_ue_context_setup_t *req);
typedef void (*ue_context_release_command_func_t)(const f1ap_ue_context_release_cmd_t *cmd);
typedef void (*dl_rrc_message_transfer_func_t)(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc); typedef void (*dl_rrc_message_transfer_func_t)(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc);
......
...@@ -34,5 +34,6 @@ static void dl_rrc_message_transfer_direct(module_id_t module_id, const f1ap_dl_ ...@@ -34,5 +34,6 @@ static void dl_rrc_message_transfer_direct(module_id_t module_id, const f1ap_dl_
void mac_rrc_dl_direct_init(nr_mac_rrc_dl_if_t *mac_rrc) void mac_rrc_dl_direct_init(nr_mac_rrc_dl_if_t *mac_rrc)
{ {
mac_rrc->ue_context_setup_request = ue_context_setup_request; mac_rrc->ue_context_setup_request = ue_context_setup_request;
mac_rrc->ue_context_release_command = ue_context_release_command;
mac_rrc->dl_rrc_message_transfer = dl_rrc_message_transfer_direct; mac_rrc->dl_rrc_message_transfer = dl_rrc_message_transfer_direct;
} }
...@@ -39,6 +39,14 @@ static void ue_context_setup_request_f1ap(const f1ap_ue_context_setup_t *req) ...@@ -39,6 +39,14 @@ static void ue_context_setup_request_f1ap(const f1ap_ue_context_setup_t *req)
itti_send_msg_to_task(TASK_CU_F1, 0, msg); itti_send_msg_to_task(TASK_CU_F1, 0, msg);
} }
static void ue_context_release_command_f1ap(const f1ap_ue_context_release_cmd_t *cmd)
{
MessageDef *message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
f1ap_ue_context_release_cmd_t *msg = &F1AP_UE_CONTEXT_RELEASE_CMD(message_p);
*msg = *cmd;
itti_send_msg_to_task (TASK_CU_F1, 0, message_p);
}
static void dl_rrc_message_transfer_f1ap(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc) static void dl_rrc_message_transfer_f1ap(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc)
{ {
/* TODO call F1AP function directly? no real-time constraint here */ /* TODO call F1AP function directly? no real-time constraint here */
...@@ -58,5 +66,6 @@ static void dl_rrc_message_transfer_f1ap(module_id_t module_id, const f1ap_dl_rr ...@@ -58,5 +66,6 @@ static void dl_rrc_message_transfer_f1ap(module_id_t module_id, const f1ap_dl_rr
void mac_rrc_dl_f1ap_init(nr_mac_rrc_dl_if_t *mac_rrc) void mac_rrc_dl_f1ap_init(nr_mac_rrc_dl_if_t *mac_rrc)
{ {
mac_rrc->ue_context_setup_request = ue_context_setup_request_f1ap; mac_rrc->ue_context_setup_request = ue_context_setup_request_f1ap;
mac_rrc->ue_context_release_command = ue_context_release_command_f1ap;
mac_rrc->dl_rrc_message_transfer = dl_rrc_message_transfer_f1ap; mac_rrc->dl_rrc_message_transfer = dl_rrc_message_transfer_f1ap;
} }
...@@ -313,17 +313,6 @@ typedef struct gNB_RRC_UE_s { ...@@ -313,17 +313,6 @@ typedef struct gNB_RRC_UE_s {
int nb_of_pdusessions; int nb_of_pdusessions;
rrc_pdu_session_param_t pduSession[NGAP_MAX_PDU_SESSION]; rrc_pdu_session_param_t pduSession[NGAP_MAX_PDU_SESSION];
rrc_action_t xids[NR_RRC_TRANSACTION_IDENTIFIER_NUMBER]; rrc_action_t xids[NR_RRC_TRANSACTION_IDENTIFIER_NUMBER];
uint32_t ul_failure_timer;
uint32_t ue_release_timer;
uint32_t ue_release_timer_thres;
uint32_t ue_release_timer_s1;
uint32_t ue_release_timer_thres_s1;
uint32_t ue_release_timer_ng;
uint32_t ue_release_timer_thres_ng;
uint32_t ue_release_timer_rrc;
uint32_t ue_release_timer_thres_rrc;
uint32_t ue_reestablishment_timer;
uint32_t ue_reestablishment_timer_thres;
uint8_t e_rab_release_command_flag; uint8_t e_rab_release_command_flag;
uint32_t ue_rrc_inactivity_timer; uint32_t ue_rrc_inactivity_timer;
uint32_t ue_reestablishment_counter; uint32_t ue_reestablishment_counter;
...@@ -389,8 +378,8 @@ typedef struct { ...@@ -389,8 +378,8 @@ typedef struct {
} nr_security_configuration_t; } nr_security_configuration_t;
typedef struct nr_mac_rrc_dl_if_s { typedef struct nr_mac_rrc_dl_if_s {
/* TODO add other message types as necessary */
ue_context_setup_request_func_t ue_context_setup_request; ue_context_setup_request_func_t ue_context_setup_request;
ue_context_release_command_func_t ue_context_release_command;
dl_rrc_message_transfer_func_t dl_rrc_message_transfer; dl_rrc_message_transfer_func_t dl_rrc_message_transfer;
} nr_mac_rrc_dl_if_t; } nr_mac_rrc_dl_if_t;
......
...@@ -111,9 +111,6 @@ rrc_gNB_generate_RRCRelease( ...@@ -111,9 +111,6 @@ rrc_gNB_generate_RRCRelease(
\param void *args_p Pointer on arguments to start the task. */ \param void *args_p Pointer on arguments to start the task. */
void *rrc_gnb_task(void *args_p); void *rrc_gnb_task(void *args_p);
/* Trigger RRC periodic processing. To be called once per ms. */
void nr_rrc_trigger(protocol_ctxt_t *ctxt, int CC_id, int frame, int subframe);
/**\ Function to set or overwrite PTRS DL RRC parameters. /**\ Function to set or overwrite PTRS DL RRC parameters.
\ *bwp Pointer to dedicated RC config structure \ *bwp Pointer to dedicated RC config structure
\ *ptrsNrb Pointer to K_ptrs N_RB related parameters \ *ptrsNrb Pointer to K_ptrs N_RB related parameters
......
This diff is collapsed.
...@@ -398,12 +398,7 @@ int rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, instance_t ...@@ -398,12 +398,7 @@ int rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, instance_t
int ret = gtpv1u_create_ngu_tunnel(instance, &create_tunnel_req, &create_tunnel_resp, nr_pdcp_data_req_drb, sdap_data_req); int ret = gtpv1u_create_ngu_tunnel(instance, &create_tunnel_req, &create_tunnel_resp, nr_pdcp_data_req_drb, sdap_data_req);
if (ret != 0) { if (ret != 0) {
LOG_E(NR_RRC, "rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ : gtpv1u_create_ngu_tunnel failed,start to release UE %x\n", UE->rnti); LOG_E(NR_RRC, "rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ : gtpv1u_create_ngu_tunnel failed,start to release UE %x\n", UE->rnti);
UE->ue_release_timer_ng = 1; AssertFatal(false, "release timer not implemented\n");
UE->ue_release_timer_thres_ng = 100;
UE->ue_release_timer = 0;
UE->ue_reestablishment_timer = 0;
UE->ul_failure_timer = 20000;
UE->ul_failure_timer = 0;
return (0); return (0);
} }
...@@ -655,7 +650,7 @@ rrc_gNB_send_NGAP_UPLINK_NAS( ...@@ -655,7 +650,7 @@ rrc_gNB_send_NGAP_UPLINK_NAS(
// NGAP_UPLINK_NAS (msg_p).nas_pdu.length, // NGAP_UPLINK_NAS (msg_p).nas_pdu.length,
// ue_context_pP); // ue_context_pP);
itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, msg_p); itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, msg_p);
LOG_I(NR_RRC,"Send RRC GNB UL Information Transfer \n"); LOG_D(NR_RRC,"Send RRC GNB UL Information Transfer \n");
} }
} }
...@@ -1159,8 +1154,6 @@ int rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(MessageDef *msg_p, instance_ ...@@ -1159,8 +1154,6 @@ int rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(MessageDef *msg_p, instance_
} }
gNB_RRC_UE_t *UE = &ue_context_p->ue_context; gNB_RRC_UE_t *UE = &ue_context_p->ue_context;
UE->ue_release_timer_ng = 0;
UE->ue_release_timer_thres_rrc = 1000;
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, UE->rnti, 0, 0); PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, UE->rnti, 0, 0);
ctxt.eNB_index = 0; ctxt.eNB_index = 0;
rrc_gNB_generate_RRCRelease(&ctxt, ue_context_p); rrc_gNB_generate_RRCRelease(&ctxt, ue_context_p);
......
...@@ -767,3 +767,9 @@ mutex_error: ...@@ -767,3 +767,9 @@ mutex_error:
LOG_E(X2AP, "mutex error\n"); LOG_E(X2AP, "mutex error\n");
exit(1); exit(1);
} }
void x2ap_trigger(void)
{
MessageDef *msg = itti_alloc_new_message(TASK_X2AP, 0, X2AP_SUBFRAME_PROCESS);
itti_send_msg_to_task(TASK_X2AP, 0, msg);
}
...@@ -47,6 +47,7 @@ int x2ap_eNB_init_sctp (x2ap_eNB_instance_t *instance_p, ...@@ -47,6 +47,7 @@ int x2ap_eNB_init_sctp (x2ap_eNB_instance_t *instance_p,
void *x2ap_task(void *arg); void *x2ap_task(void *arg);
int is_x2ap_enabled(void); int is_x2ap_enabled(void);
void x2ap_trigger(void);
#endif /* X2AP_H_ */ #endif /* X2AP_H_ */
......
...@@ -999,6 +999,11 @@ void *nas_nrue_task(void *args_p) ...@@ -999,6 +999,11 @@ void *nas_nrue_task(void *args_p)
case NAS_CONN_RELEASE_IND: case NAS_CONN_RELEASE_IND:
LOG_I(NAS, "[UE %ld] Received %s: cause %u\n", instance, ITTI_MSG_NAME (msg_p), LOG_I(NAS, "[UE %ld] Received %s: cause %u\n", instance, ITTI_MSG_NAME (msg_p),
NAS_CONN_RELEASE_IND (msg_p).cause); NAS_CONN_RELEASE_IND (msg_p).cause);
/* the following is not clean, but probably necessary: we need to give
* time to RLC to Ack the SRB1 PDU which contained the RRC release
* message. Hence, we just below wait some time, before finally
* unblocking the nr-uesoftmodem, which will terminate the process. */
usleep(100000);
itti_wait_tasks_unblock(); /* will unblock ITTI to stop nr-uesoftmodem */ itti_wait_tasks_unblock(); /* will unblock ITTI to stop nr-uesoftmodem */
break; break;
......
...@@ -138,6 +138,11 @@ int ngap_ue_context_release_req(instance_t instance, ...@@ -138,6 +138,11 @@ int ngap_ue_context_release_req(instance_t instance,
/* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */ /* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */
NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: %u\n", NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: %u\n",
ue_release_req_p->gNB_ue_ngap_id); ue_release_req_p->gNB_ue_ngap_id);
/* send response to free the UE: we don't know it, but it should be
* released since RRC seems to know it (e.g., there is no AMF) */
MessageDef *msg = itti_alloc_new_message(TASK_NGAP, 0, NGAP_UE_CONTEXT_RELEASE_COMMAND);
NGAP_UE_CONTEXT_RELEASE_COMMAND(msg).gNB_ue_ngap_id = ue_release_req_p->gNB_ue_ngap_id;
itti_send_msg_to_task(TASK_RRC_GNB, ngap_gNB_instance_p->instance, msg);
return -1; return -1;
} }
......
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