Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
412caafd
Commit
412caafd
authored
Dec 07, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
F1AP_UE_CONTEXT_RELEASE_COMMAND: Implement in DU, don't send COMPLETE
parent
956fafb5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
49 deletions
+83
-49
openair2/F1AP/f1ap_decoder.c
openair2/F1AP/f1ap_decoder.c
+3
-0
openair2/F1AP/f1ap_du_ue_context_management.c
openair2/F1AP/f1ap_du_ue_context_management.c
+79
-48
openair2/F1AP/f1ap_handlers.c
openair2/F1AP/f1ap_handlers.c
+1
-1
No files found.
openair2/F1AP/f1ap_decoder.c
View file @
412caafd
...
@@ -63,6 +63,9 @@ static int f1ap_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
...
@@ -63,6 +63,9 @@ static int f1ap_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
LOG_I
(
F1AP
,
"f1ap_eNB_decode_initiating_message!
\n
"
);
LOG_I
(
F1AP
,
"f1ap_eNB_decode_initiating_message!
\n
"
);
break
;
break
;
case
F1AP_ProcedureCode_id_UEContextRelease
:
LOG_I
(
F1AP
,
"%s(): F1AP_ProcedureCode_id_UEContextRelease
\n
"
,
__func__
);
break
;
// case F1AP_ProcedureCode_id_InitialContextSetup:
// case F1AP_ProcedureCode_id_InitialContextSetup:
// res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
// res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
// message_id = F1AP_INITIAL_CONTEXT_SETUP_LOG;
// message_id = F1AP_INITIAL_CONTEXT_SETUP_LOG;
...
...
openair2/F1AP/f1ap_du_ue_context_management.c
View file @
412caafd
...
@@ -36,6 +36,9 @@
...
@@ -36,6 +36,9 @@
#include "f1ap_itti_messaging.h"
#include "f1ap_itti_messaging.h"
#include "f1ap_du_ue_context_management.h"
#include "f1ap_du_ue_context_management.h"
#include "rrc_extern.h"
#include "rrc_eNB_UE_context.h"
// undefine C_RNTI from
// undefine C_RNTI from
// openair1/PHY/LTE_TRANSPORT/transport_common.h which
// openair1/PHY/LTE_TRANSPORT/transport_common.h which
// replaces in ie->value.choice.C_RNTI, causing
// replaces in ie->value.choice.C_RNTI, causing
...
@@ -45,6 +48,7 @@
...
@@ -45,6 +48,7 @@
extern
f1ap_setup_req_t
*
f1ap_du_data
;
extern
f1ap_setup_req_t
*
f1ap_du_data
;
extern
f1ap_cudu_ue_inst_t
f1ap_du_ue
[
MAX_eNB
];
extern
f1ap_cudu_ue_inst_t
f1ap_du_ue
[
MAX_eNB
];
extern
RAN_CONTEXT_t
RC
;
int
DU_handle_UE_CONTEXT_SETUP_REQUEST
(
instance_t
instance
,
int
DU_handle_UE_CONTEXT_SETUP_REQUEST
(
instance_t
instance
,
uint32_t
assoc_id
,
uint32_t
assoc_id
,
...
@@ -641,75 +645,102 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
...
@@ -641,75 +645,102 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
}
}
// note: is temporary with F1AP_UE_CONTEXT_SETUP_REQ
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
assoc_id
,
uint32_t
stream
,
uint32_t
stream
,
F1AP_F1AP_PDU_t
*
pdu
)
{
F1AP_F1AP_PDU_t
*
pdu
)
{
MessageDef
*
msg_p
;
// message to RRC
F1AP_UEContextReleaseCommand_t
*
container
;
F1AP_UEContextRelease
Request_t
*
container
;
F1AP_UEContextRelease
CommandIEs_t
*
ie
;
F1AP_UEContextReleaseRequestIEs_t
*
ie
;
protocol_ctxt_t
ctxt
;
DevAssert
(
pdu
);
DevAssert
(
pdu
);
msg_p
=
itti_alloc_new_message
(
TASK_DU_F1
,
F1AP_UE_CONTEXT_SETUP_REQ
);
container
=
&
pdu
->
choice
.
initiatingMessage
->
value
.
choice
.
UEContextReleaseCommand
;
f1ap_ue_context_setup_req_t
*
f1ap_ue_context_setup_req
;
f1ap_ue_context_setup_req
=
&
F1AP_UE_CONTEXT_SETUP_REQ
(
msg_p
);
container
=
&
pdu
->
choice
.
initiatingMessage
->
value
.
choice
.
UEContextReleaseRequest
;
/* GNB_CU_UE_F1AP_ID */
/* GNB_CU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextRelease
Request
IEs_t
,
ie
,
container
,
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextRelease
Command
IEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID
,
true
);
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID
,
true
);
f1ap_ue_context_setup_req
->
gNB_CU_ue_id
=
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
;
ctxt
.
rnti
=
f1ap_get_rnti_by_cu_id
(
&
f1ap_du_ue
[
instance
],
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
);
ctxt
.
module_id
=
instance
;
ctxt
.
instance
=
instance
;
ctxt
.
enb_flag
=
1
;
/* GNB_DU_UE_F1AP_ID */
/* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextRelease
Request
IEs_t
,
ie
,
container
,
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextRelease
Command
IEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID
,
true
);
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID
,
true
);
f1ap_ue_context_setup_req
->
gNB_DU_ue_id
=
malloc
(
sizeof
(
uint32_t
));
AssertFatal
(
ctxt
.
rnti
==
f1ap_get_rnti_by_du_id
(
&
f1ap_du_ue
[
instance
],
if
(
f1ap_ue_context_setup_req
->
gNB_DU_ue_id
)
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
),
*
f1ap_ue_context_setup_req
->
gNB_DU_ue_id
=
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
;
"RNTI obtained through DU ID is different from CU ID
\n
"
)
;
/* Cause */
/* We don't need the Cause */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextReleaseRequestIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_Cause
,
true
);
switch
(
ie
->
value
.
choice
.
Cause
.
present
)
/* Optional RRC Container: if present, send to UE */
{
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextReleaseCommandIEs_t
,
ie
,
container
,
case
F1AP_Cause_PR_radioNetwork
:
//ie->value.choice.Cause.choice.radioNetwork
break
;
case
F1AP_Cause_PR_transport
:
//ie->value.choice.Cause.choice.transport
break
;
case
F1AP_Cause_PR_protocol
:
//ie->value.choice.Cause.choice.protocol
break
;
case
F1AP_Cause_PR_misc
:
//ie->value.choice.Cause.choice.misc
break
;
case
F1AP_Cause_PR_NOTHING
:
default:
break
;
}
/* Optional */
/* RRC Container */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_InitialULRRCMessageTransferIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_RRCContainer
,
false
);
F1AP_ProtocolIE_ID_id_RRCContainer
,
false
);
if
(
ie
)
{
if
(
ie
)
{
// message_p = itti_alloc_new_message (TASK_CU_F1, RRC_MAC_CCCH_DATA_IND);
/*pstruct rrc_eNB_ue_context_s* ue_context_p;
// memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.module_id], ctxt.rnti);
// ccch_sdu_len = ie->value.choice.RRCContainer.size;
// memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
thread_mutex_lock(&rrc_release_freelist);
// ccch_sdu_len);
for (uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
// LOG_D(CU_F1AP, "RRCContainer(CCCH) :");
if (rrc_release_info.RRC_release_ctrl[release_num].flag == 0) {
// for (int i=0;i<ie->value.choice.RRCContainer.size;i++) LOG_D(CU_F1AP, "%2x ",RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
if (ue_context_p->ue_context.ue_release_timer_s1 > 0)
rrc_release_info.RRC_release_ctrl[release_num].flag = 1;
else
rrc_release_info.RRC_release_ctrl[release_num].flag = 2;
rrc_release_info.RRC_release_ctrl[release_num].rnti = ctxt.rnti;
// TODO: how to provide the correct MUI?
rrc_release_info.RRC_release_ctrl[release_num].rrc_eNB_mui = 0;
rrc_release_info.num_UEs++;
LOG_D(RRC,"Generate DLSCH Release send: index %d rnti %x mui %d flag %d \n",release_num,
ctxt.rnti, 0, rrc_release_info.RRC_release_ctrl[release_num].flag);
break;
}
}
pthread_mutex_unlock(&rrc_release_freelist);*/
const
sdu_size_t
sdu_len
=
ie
->
value
.
choice
.
RRCContainer
.
size
;
mem_block_t
*
pdu_p
=
NULL
;
pdu_p
=
get_free_mem_block
(
sdu_len
,
__func__
);
memcpy
(
&
pdu_p
->
data
[
0
],
ie
->
value
.
choice
.
RRCContainer
.
buf
,
sdu_len
);
rlc_op_status_t
rlc_status
=
rlc_data_req
(
&
ctxt
,
1
,
MBMS_FLAG_NO
,
1
// SRB 1 correct?
,
0
,
0
,
sdu_len
,
pdu_p
#ifdef Rel14
,
NULL
,
NULL
#endif
);
switch
(
rlc_status
)
{
case
RLC_OP_STATUS_OK
:
break
;
case
RLC_OP_STATUS_BAD_PARAMETER
:
LOG_W
(
DU_F1AP
,
"Data sending request over RLC failed with 'Bad Parameter' reason!
\n
"
);
break
;
case
RLC_OP_STATUS_INTERNAL_ERROR
:
LOG_W
(
DU_F1AP
,
"Data sending request over RLC failed with 'Internal Error' reason!
\n
"
);
break
;
case
RLC_OP_STATUS_OUT_OF_RESSOURCES
:
LOG_W
(
DU_F1AP
,
"Data sending request over RLC failed with 'Out of Resources' reason!
\n
"
);
break
;
default:
LOG_W
(
DU_F1AP
,
"RLC returned an unknown status code after DU_F1AP placed "
"the order to send some data (Status Code:%d)
\n
"
,
rlc_status
);
break
;
}
}
}
AssertFatal
(
0
,
"check configuration, send to appropriate handler
\n
"
);
rrc_mac_remove_ue
(
instance
,
ctxt
.
rnti
);
rrc_rlc_remove_ue
(
&
ctxt
);
/* DU_send_UE_CONTEXT_RELEASE_COMPLETE() */
return
0
;
}
}
...
...
openair2/F1AP/f1ap_handlers.c
View file @
412caafd
...
@@ -52,7 +52,7 @@ f1ap_message_decoded_callback f1ap_messages_callback[][3] = {
...
@@ -52,7 +52,7 @@ f1ap_message_decoded_callback f1ap_messages_callback[][3] = {
{
0
,
0
,
0
},
/* gNBDUConfigurationUpdate */
{
0
,
0
,
0
},
/* gNBDUConfigurationUpdate */
{
0
,
0
,
0
},
/* gNBCUConfigurationUpdate */
{
0
,
0
,
0
},
/* gNBCUConfigurationUpdate */
{
DU_handle_UE_CONTEXT_SETUP_REQUEST
,
CU_handle_UE_CONTEXT_SETUP_RESPONSE
,
0
},
/* UEContextSetup */
{
DU_handle_UE_CONTEXT_SETUP_REQUEST
,
CU_handle_UE_CONTEXT_SETUP_RESPONSE
,
0
},
/* UEContextSetup */
{
0
,
0
,
0
},
/* UEContextRelease */
{
DU_handle_UE_CONTEXT_RELEASE_COMMAND
,
0
,
0
},
/* UEContextRelease */
{
0
,
0
,
0
},
/* UEContextModification */
{
0
,
0
,
0
},
/* UEContextModification */
{
0
,
0
,
0
},
/* UEContextModificationRequired */
{
0
,
0
,
0
},
/* UEContextModificationRequired */
{
0
,
0
,
0
},
/* UEMobilityCommand */
{
0
,
0
,
0
},
/* UEMobilityCommand */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment