Commit e9421938 authored by Laurent THOMAS's avatar Laurent THOMAS

add partial coding ue context resp

parents 14775c9d 7fab0147
......@@ -317,22 +317,28 @@ typedef struct f1ap_ul_rrc_message_s {
typedef struct f1ap_up_tnl_s {
in_addr_t tl_address; // currently only IPv4 supported
teid_t outgoingTeid;
teid_t incomingTeid;
teid_t teid;
} f1ap_up_tnl_t;
typedef struct f1ap_drb_to_be_setup_s {
long drb_id;
f1ap_up_tnl_t tnl[2];
uint8_t tnl_length;
f1ap_up_tnl_t up_ul_tnl[2];
uint8_t up_ul_tnl_length;
f1ap_up_tnl_t up_dl_tnl[2];
uint8_t up_dl_tnl_length;
rlc_mode_t rlc_mode;
} f1ap_drb_to_be_setup_t;
typedef struct f1ap_srb_to_be_setup_s {
long srb_id;
rlc_mode_t rlc_mode;
uint8_t lcid;
} f1ap_srb_to_be_setup_t;
typedef struct f1ap_rb_failed_to_be_setup_s {
long rb_id;
} f1ap_rb_failed_to_be_setup_t;
typedef struct f1ap_ue_context_setup_req_s {
uint32_t gNB_CU_ue_id; // BK: need to replace by use from rnti
uint32_t gNB_DU_ue_id;
......@@ -367,6 +373,10 @@ typedef struct f1ap_ue_context_setup_resp_s {
uint8_t drbs_setup_length; // BK: need to replace by s1ap_initial_context_setup_req
f1ap_srb_to_be_setup_t *srbs_setup;
uint8_t srbs_setup_length;
uint8_t srbs_failed_to_be_setup_length;
f1ap_rb_failed_to_be_setup_t *srbs_failed_to_be_setup;
uint8_t drbs_failed_to_be_setup_length;
f1ap_rb_failed_to_be_setup_t *drbs_failed_to_be_setup;
} f1ap_ue_context_setup_resp_t;
typedef enum F1ap_Cause_e {
......
......@@ -509,7 +509,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
} // if some_decide_qos
/* 12.1.3 uLUPTNLInformation_ToBeSetup_List */
for (int j = 0; j < f1ap_ue_context_setup_req->drbs_to_be_setup[i].tnl_length; j++) {
for (int j = 0; j < f1ap_ue_context_setup_req->drbs_to_be_setup[i].up_ul_tnl_length; j++) {
/* 12.3.1 ULTunnels_ToBeSetup_Item */
asn1cSequenceAdd(drbs_toBeSetup_item->uLUPTNLInformation_ToBeSetup_List.list,
F1AP_ULUPTNLInformation_ToBeSetup_Item_t, uLUPTNLInformation_ToBeSetup_Item);
......@@ -517,10 +517,10 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
asn1cCalloc( uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.choice.gTPTunnel,
F1AP_GTPTunnel_t, gTPTunnel);
/* 12.3.1.1.1 transportLayerAddress */
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(f1ap_ue_context_setup_req->drbs_to_be_setup[i].tnl[j].tl_address,
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(f1ap_ue_context_setup_req->drbs_to_be_setup[i].up_ul_tnl[j].tl_address,
&gTPTunnel->transportLayerAddress);
/* 12.3.1.1.2 gTP_TEID */
INT32_TO_OCTET_STRING(f1ap_ue_context_setup_req->drbs_to_be_setup[i].tnl[j].outgoingTeid,
INT32_TO_OCTET_STRING(f1ap_ue_context_setup_req->drbs_to_be_setup[i].up_ul_tnl[j].teid,
&gTPTunnel->gTP_TEID);
}
......@@ -626,31 +626,117 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
MessageDef *msg_p;
F1AP_UEContextSetupResponse_t *container;
F1AP_UEContextSetupResponseIEs_t *ie;
DevAssert(pdu);
msg_p = itti_alloc_new_message(TASK_DU_F1, 0, F1AP_UE_CONTEXT_SETUP_RESP);
f1ap_ue_context_setup_resp_t *f1ap_ue_context_setup_resp = &F1AP_UE_CONTEXT_SETUP_RESP(msg_p);
container = &pdu->choice.successfulOutcome->value.choice.UEContextSetupResponse;
int i;
/* GNB_CU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupResponseIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
f1ap_ue_context_setup_resp->gNB_CU_ue_id = ie->value.choice.GNB_CU_UE_F1AP_ID;
/* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupResponseIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
f1ap_ue_context_setup_resp->gNB_DU_ue_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
/* DUtoCURRCInformation */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupResponseIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_DUtoCURRCInformation, true);
if (ie == NULL){
LOG_E(F1AP,"%s %d: ie is a NULL pointer \n",__FILE__,__LINE__);
return -1;
}
memcpy(f1ap_ue_context_setup_resp->du_to_cu_rrc_information, ie->value.choice.DUtoCURRCInformation.cellGroupConfig.buf, ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size);
f1ap_ue_context_setup_resp->du_to_cu_rrc_information_length = ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size;
/* DRBs_Setup_List */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupResponseIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_DRBs_Setup_List, true);
if(ie!=NULL){
f1ap_ue_context_setup_resp->drbs_setup_length = ie->value.choice.DRBs_Setup_List.list.count;
f1ap_ue_context_setup_resp->drbs_setup = calloc(f1ap_ue_context_setup_resp->drbs_setup_length,
sizeof(f1ap_drb_to_be_setup_t));
AssertFatal(f1ap_ue_context_setup_resp->drbs_setup,
"could not allocate memory for f1ap_ue_context_setup_resp->drbs_setup\n");
for (i = 0; i < f1ap_ue_context_setup_resp->drbs_setup_length; ++i) {
f1ap_drb_to_be_setup_t *drb_p = &f1ap_ue_context_setup_resp->drbs_setup[i];
F1AP_DRBs_Setup_Item_t *drbs_setup_item_p;
drbs_setup_item_p = &((F1AP_DRBs_Setup_ItemIEs_t *)ie->value.choice.DRBs_Setup_List.list.array[i])->value.choice.DRBs_Setup_Item;
drb_p->drb_id = drbs_setup_item_p->dRBID;
/* TODO in the following, assume only one UP UL TNL is present.
* this matches/assumes OAI CU/DU implementation, can be up to 2! */
drb_p->up_dl_tnl_length = 1;
AssertFatal(drbs_setup_item_p->dLUPTNLInformation_ToBeSetup_List.list.count > 0,
"no DL UP TNL Information in DRBs to be Setup list\n");
F1AP_DLUPTNLInformation_ToBeSetup_Item_t *dl_up_tnl_info_p = (F1AP_DLUPTNLInformation_ToBeSetup_Item_t *)drbs_setup_item_p->dLUPTNLInformation_ToBeSetup_List.list.array[0];
F1AP_GTPTunnel_t *dl_up_tnl0 = dl_up_tnl_info_p->dLUPTNLInformation.choice.gTPTunnel;
BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4(&dl_up_tnl0->transportLayerAddress, drb_p->up_dl_tnl[0].tl_address);
OCTET_STRING_TO_INT32(&dl_up_tnl0->gTP_TEID, drb_p->up_dl_tnl[0].teid);
}
}
/* SRBs_FailedToBeSetup_List */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupResponseIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_SRBs_FailedToBeSetup_List, true);
if(ie!=NULL){
f1ap_ue_context_setup_resp->srbs_failed_to_be_setup_length = ie->value.choice.SRBs_FailedToBeSetup_List.list.count;
f1ap_ue_context_setup_resp->srbs_failed_to_be_setup = calloc(f1ap_ue_context_setup_resp->srbs_failed_to_be_setup_length,
sizeof(f1ap_rb_failed_to_be_setup_t));
AssertFatal(f1ap_ue_context_setup_resp->srbs_failed_to_be_setup,
"could not allocate memory for f1ap_ue_context_setup_resp->srbs_failed_to_be_setup\n");
for (i = 0; i < f1ap_ue_context_setup_resp->srbs_failed_to_be_setup_length; ++i) {
f1ap_rb_failed_to_be_setup_t *srb_p = &f1ap_ue_context_setup_resp->srbs_failed_to_be_setup[i];
srb_p->rb_id = ((F1AP_SRBs_FailedToBeSetup_Item_t *)ie->value.choice.SRBs_FailedToBeSetup_List.list.array[i])->sRBID;
}
}
/* DRBs_FailedToBeSetup_List */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupResponseIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_DRBs_FailedToBeSetup_List, true);
if(ie!=NULL){
f1ap_ue_context_setup_resp->drbs_failed_to_be_setup_length = ie->value.choice.DRBs_FailedToBeSetup_List.list.count;
f1ap_ue_context_setup_resp->drbs_failed_to_be_setup = calloc(f1ap_ue_context_setup_resp->drbs_failed_to_be_setup_length,
sizeof(f1ap_rb_failed_to_be_setup_t));
AssertFatal(f1ap_ue_context_setup_resp->drbs_failed_to_be_setup,
"could not allocate memory for f1ap_ue_context_setup_resp->drbs_failed_to_be_setup\n");
for (i = 0; i < f1ap_ue_context_setup_resp->drbs_failed_to_be_setup_length; ++i) {
f1ap_rb_failed_to_be_setup_t *drb_p = &f1ap_ue_context_setup_resp->drbs_failed_to_be_setup[i];
drb_p->rb_id = ((F1AP_DRBs_FailedToBeSetup_Item_t *)ie->value.choice.DRBs_FailedToBeSetup_List.list.array[i])->dRBID;
}
}
/* SCell_FailedtoSetup_List */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupResponseIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_SCell_FailedtoSetup_List, true);
if(ie!=NULL){
LOG_E (F1AP, "Not supporting handling of SCell_FailedtoSetup_List \n");
}
/* SRBs_Setup_List */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupResponseIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_SRBs_Setup_List, true);
if(ie!=NULL){
f1ap_ue_context_setup_resp->srbs_setup_length = ie->value.choice.SRBs_Setup_List.list.count;
f1ap_ue_context_setup_resp->srbs_setup = calloc(f1ap_ue_context_setup_resp->srbs_setup_length,
sizeof(f1ap_srb_to_be_setup_t));
AssertFatal(f1ap_ue_context_setup_resp->drbs_setup,
"could not allocate memory for f1ap_ue_context_setup_resp->drbs_setup\n");
for (i = 0; i < f1ap_ue_context_setup_resp->srbs_setup_length; ++i) {
f1ap_srb_to_be_setup_t *srb_p = &f1ap_ue_context_setup_resp->srbs_setup[i];
F1AP_SRBs_Setup_Item_t *srbs_setup_item_p;
srbs_setup_item_p = &((F1AP_SRBs_Setup_ItemIEs_t *)ie->value.choice.SRBs_Setup_List.list.array[i])->value.choice.SRBs_Setup_Item;
srb_p->srb_id = srbs_setup_item_p->sRBID;
srb_p->lcid = srbs_setup_item_p->lCID;
}
}
itti_send_msg_to_task(TASK_RRC_GNB, instance, msg_p);
return 0;
}
......
......@@ -55,7 +55,7 @@ boolean_t DURecvCb( protocol_ctxt_t *ctxt_pP,
return true;
}
int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup_req_t * req);
int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup_req_t *req);
int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
......@@ -129,6 +129,8 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
F1AP_UEContextSetupRequestIEs_t *ieDrb;
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ieDrb, container,
F1AP_ProtocolIE_ID_id_DRBs_ToBeSetup_List, true);
if(ieDrb!=NULL) {
f1ap_ue_context_setup_req->drbs_to_be_setup_length = ieDrb->value.choice.DRBs_ToBeSetup_List.list.count;
f1ap_ue_context_setup_req->drbs_to_be_setup = calloc(f1ap_ue_context_setup_req->drbs_to_be_setup_length,
sizeof(f1ap_drb_to_be_setup_t));
......@@ -142,13 +144,13 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
drb_p->drb_id = drbs_tobesetup_item_p->dRBID;
/* TODO in the following, assume only one UP UL TNL is present.
* this matches/assumes OAI CU implementation, can be up to 2! */
drb_p->tnl_length = 1;
drb_p->up_ul_tnl_length = 1;
AssertFatal(drbs_tobesetup_item_p->uLUPTNLInformation_ToBeSetup_List.list.count > 0,
"no UL UP TNL Information in DRBs to be Setup list\n");
F1AP_ULUPTNLInformation_ToBeSetup_Item_t *ul_up_tnl_info_p = (F1AP_ULUPTNLInformation_ToBeSetup_Item_t *)drbs_tobesetup_item_p->uLUPTNLInformation_ToBeSetup_List.list.array[0];
F1AP_GTPTunnel_t *ul_up_tnl0 = ul_up_tnl_info_p->uLUPTNLInformation.choice.gTPTunnel;
BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4(&ul_up_tnl0->transportLayerAddress, drb_p->tnl[0].tl_address);
OCTET_STRING_TO_INT32(&ul_up_tnl0->gTP_TEID, drb_p->tnl[0].outgoingTeid);
BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4(&ul_up_tnl0->transportLayerAddress, drb_p->up_ul_tnl[0].tl_address);
OCTET_STRING_TO_INT32(&ul_up_tnl0->gTP_TEID, drb_p->up_ul_tnl[0].teid);
switch (drbs_tobesetup_item_p->rLCMode) {
case F1AP_RLCMode_rlc_am:
......@@ -159,21 +161,26 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
drb_p->rlc_mode = RLC_MODE_TM;
break;
}
transport_layer_addr_t addr;
memcpy(addr.buffer, &drb_p->tnl[0].tl_address, sizeof(drb_p->tnl[0].tl_address));
addr.length=sizeof(drb_p->tnl[0].tl_address)*8;
drb_p->tnl[0].incomingTeid=newGtpuCreateTunnel(INSTANCE_DEFAULT,
memcpy(addr.buffer, &drb_p->up_ul_tnl[0].tl_address, sizeof(drb_p->up_ul_tnl[0].tl_address));
addr.length=sizeof(drb_p->up_ul_tnl[0].tl_address)*8;
drb_p->up_dl_tnl[0].teid=newGtpuCreateTunnel(INSTANCE_DEFAULT,
f1ap_ue_context_setup_req->rnti,
drb_p->drb_id ,
drb_p->drb_id,
drb_p->tnl[0].outgoingTeid,
drb_p->drb_id,
drb_p->up_ul_tnl[0].teid,
addr,
2152,
DURecvCb);
}
}
F1AP_UEContextSetupRequestIEs_t *ieSrb;
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ieSrb, container,
F1AP_ProtocolIE_ID_id_SRBs_ToBeSetup_List, true);
if(ieSrb != NULL) {
f1ap_ue_context_setup_req->srbs_to_be_setup_length = ieSrb->value.choice.SRBs_ToBeSetup_List.list.count;
f1ap_ue_context_setup_req->srbs_to_be_setup = calloc(f1ap_ue_context_setup_req->srbs_to_be_setup_length,
sizeof(f1ap_srb_to_be_setup_t));
......@@ -187,6 +194,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
srb_p->srb_id = srbs_tobesetup_item_p->sRBID;
}
}
}
/* RRCContainer */
F1AP_UEContextSetupRequestIEs_t *ieRRC;
......@@ -199,8 +207,6 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
f1ap_ue_context_setup_req->rrc_container = malloc(ieRRC->value.choice.RRCContainer.size);
memcpy(f1ap_ue_context_setup_req->rrc_container,
ieRRC->value.choice.RRCContainer.buf, ieRRC->value.choice.RRCContainer.size);
// AssertFatal(0, "check configuration, send to appropriate handler\n");
protocol_ctxt_t ctxt;
// decode RRC Container and act on the message type
......@@ -213,7 +219,6 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
memcpy(&pdcp_pdu_p->data[0], ieRRC->value.choice.RRCContainer.buf, ieRRC->value.choice.RRCContainer.size);
/* for rfsim */
du_rlc_data_req(&ctxt, 1, 0x00, 1, 1, 0, ieRRC->value.choice.RRCContainer.size, pdcp_pdu_p);
} else {
LOG_E(F1AP, " RRCContainer in UEContextSetupRequestIEs size id 0\n");
}
......@@ -222,13 +227,11 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
}
DU_send_UE_CONTEXT_SETUP_RESPONSE(instance, f1ap_ue_context_setup_req);
itti_send_msg_to_task(TASK_RRC_GNB, instance, msg_p);
return 0;
}
int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup_req_t * req) {
int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup_req_t *req) {
F1AP_F1AP_PDU_t pdu= {0};
F1AP_UEContextSetupResponse_t *out;
uint8_t *buffer=NULL;
......@@ -255,6 +258,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
ie2->criticality = F1AP_Criticality_reject;
ie2->value.present = F1AP_UEContextSetupResponseIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie2->value.choice.GNB_DU_UE_F1AP_ID = req->gNB_DU_ue_id;
/* mandatory */
/* c3. DUtoCURRCInformation */
if (0) {
......@@ -343,7 +347,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
//drbs_setup_item.lCID = (F1AP_LCID_t *)calloc(1, sizeof(F1AP_LCID_t));
//drbs_setup_item.lCID = 1L;
for (int j=0; j<req->drbs_to_be_setup[i].tnl_length; j++) {
for (int j=0; j<req->drbs_to_be_setup[i].up_dl_tnl_length; j++) {
/* ADD */
asn1cSequenceAdd(drbs_setup_item->dLUPTNLInformation_ToBeSetup_List.list,
F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item);
......@@ -352,13 +356,13 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel,
F1AP_GTPTunnel_t, gTPTunnel);
/* transportLayerAddress */
struct sockaddr_in addr={0};
struct sockaddr_in addr= {0};
inet_pton(AF_INET, getCxt(false,instance)->setupReq.DU_f1_ip_address.ipv4_address,
&addr.sin_addr.s_addr);
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(addr.sin_addr.s_addr,
&gTPTunnel->transportLayerAddress);
/* gTP_TEID */
INT32_TO_OCTET_STRING(req->drbs_to_be_setup[i].tnl[j].incomingTeid, &gTPTunnel->gTP_TEID);
INT32_TO_OCTET_STRING(req->drbs_to_be_setup[i].up_dl_tnl[j].teid, &gTPTunnel->gTP_TEID);
} // for j
} // for i
......@@ -541,12 +545,9 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
getCxt(false, instance)->default_sctp_stream_id);
return 0;
}
int DU_send_UE_CONTEXT_SETUP_FAILURE(instance_t instance) {
AssertFatal(1==0,"Not implemented yet\n");
}
int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
f1ap_ue_context_release_req_t *req) {
F1AP_F1AP_PDU_t pdu;
......@@ -621,8 +622,6 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
getCxt(false, instance)->default_sctp_stream_id);
return 0;
}
int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
......@@ -763,8 +762,6 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance, &cplt);
return 0;
}
int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
f1ap_ue_context_release_cplt_t *cplt) {
F1AP_F1AP_PDU_t pdu= {0};
......@@ -855,15 +852,12 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
f1ap_remove_ue(false, instance, cplt->rnti);
return 0;
}
int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
AssertFatal(1==0,"Not implemented yet\n");
}
//void DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(F1AP_UEContextModificationResponse_t *UEContextModificationResponse) {
int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
F1AP_F1AP_PDU_t pdu= {0};
......@@ -1145,15 +1139,12 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
//f1ap_itti_send_sctp_data_req(false, instance, buffer, len, 0);
return 0;
}
int DU_send_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance) {
AssertFatal(1==0,"Not implemented yet\n");
}
int DU_send_UE_CONTEXT_MODIFICATION_REQUIRED(instance_t instance) {
AssertFatal(1==0,"Not implemented yet\n");
}
int DU_handle_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
......
......@@ -284,8 +284,10 @@ uint8_t compute_ri_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
}
return max_ri;
}
else
else {
AssertFatal(1==0,"Other configurations not yet implemented\n");
return 0;
}
}
void compute_li_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
......@@ -1352,7 +1354,7 @@ int nr_acknack_scheduling(int mod_id,
* for initialCyclicShift 0 (we assume it always has that one), so other
* initialCyclicShifts can overlap with ICS 0!*/
if (pucch_Config==NULL)
return;
return -1;
const NR_PUCCH_Resource_t *resource = pucch_Config->resourceToAddModList->list.array[pucch->resource_indicator];
DevAssert(resource->format.present == NR_PUCCH_Resource__format_PR_format0);
if (resource->format.choice.format0->initialCyclicShift == 0) {
......
......@@ -1365,7 +1365,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
/* Here the callback function used as input is not the right one. Need to create a new one probably for F1-U, not sure
* if the kind of input parameters to the callback function are convenient though for gtp-u over F1-U.*/
ue_context_pP->ue_context.incoming_teid[i] = newGtpuCreateTunnel(0, create_tunnel_req.rnti,
ue_context_pP->ue_context.incoming_teid[i] = newGtpuCreateTunnel(INSTANCE_DEFAULT, create_tunnel_req.rnti,
create_tunnel_req.incoming_rb_id[i],
create_tunnel_req.incoming_rb_id[i],
create_tunnel_req.outgoing_teid[i],
......@@ -1374,9 +1374,9 @@ rrc_gNB_process_RRCReconfigurationComplete(
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].drb_id = DRB_configList->list.array[i]->drb_Identity;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].rlc_mode = RLC_MODE_AM;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].tnl[0].incomingTeid = ue_context_pP->ue_context.incoming_teid[i];
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].tnl[0].tl_address = inet_addr(rrc->eth_params_s.my_addr);
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].tnl_length = 1;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].up_ul_tnl[0].teid = ue_context_pP->ue_context.incoming_teid[i];
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].up_ul_tnl[0].tl_address = inet_addr(rrc->eth_params_s.my_addr);
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].up_ul_tnl_length = 1;
}
F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_CU_ue_id = 0;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_DU_ue_id = 0;
......@@ -3671,6 +3671,10 @@ void *rrc_gnb_task(void *args_p) {
rrc_DU_process_ue_context_setup_request(msg_p, msg_name_p, instance);
break;
case F1AP_UE_CONTEXT_SETUP_RESP:
LOG_W(NR_RRC, "Handling of F1 UE context setup response context at the RRC layer of the CU is pending \n");
break;
/* Messages from X2AP */
case X2AP_ENDC_SGNB_ADDITION_REQ:
LOG_I(NR_RRC, "Received ENDC sgNB addition request from X2AP \n");
......
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