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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
d3899a21
Commit
d3899a21
authored
Oct 08, 2021
by
matzakos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add implementation of UE context modification response handler at F1AP layer of the CU
parent
a1b2d222
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
134 additions
and
2 deletions
+134
-2
openair2/F1AP/f1ap_cu_ue_context_management.c
openair2/F1AP/f1ap_cu_ue_context_management.c
+125
-1
openair2/F1AP/f1ap_handlers.c
openair2/F1AP/f1ap_handlers.c
+1
-1
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+8
-0
No files found.
openair2/F1AP/f1ap_cu_ue_context_management.c
View file @
d3899a21
...
...
@@ -1646,7 +1646,131 @@ int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance,
uint32_t
assoc_id
,
uint32_t
stream
,
F1AP_F1AP_PDU_t
*
pdu
)
{
AssertFatal
(
1
==
0
,
"Not implemented yet
\n
"
);
MessageDef
*
msg_p
;
F1AP_UEContextModificationResponse_t
*
container
;
F1AP_UEContextModificationResponseIEs_t
*
ie
;
DevAssert
(
pdu
);
msg_p
=
itti_alloc_new_message
(
TASK_DU_F1
,
0
,
F1AP_UE_CONTEXT_MODIFICATION_RESP
);
f1ap_ue_context_setup_t
*
f1ap_ue_context_modification_resp
=
&
F1AP_UE_CONTEXT_MODIFICATION_RESP
(
msg_p
);
container
=
&
pdu
->
choice
.
successfulOutcome
->
value
.
choice
.
UEContextModificationResponse
;
int
i
;
/* GNB_CU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextModificationResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID
,
false
);
f1ap_ue_context_modification_resp
->
gNB_CU_ue_id
=
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
;
LOG_D
(
F1AP
,
"f1ap_ue_context_setup_resp->gNB_CU_ue_id is: %d
\n
"
,
f1ap_ue_context_modification_resp
->
gNB_CU_ue_id
);
/* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextModificationResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID
,
true
);
f1ap_ue_context_modification_resp
->
gNB_DU_ue_id
=
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
;
LOG_D
(
F1AP
,
"f1ap_ue_context_setup_resp->gNB_DU_ue_id is: %d
\n
"
,
f1ap_ue_context_modification_resp
->
gNB_DU_ue_id
);
f1ap_ue_context_modification_resp
->
rnti
=
f1ap_get_rnti_by_du_id
(
CUtype
,
instance
,
f1ap_ue_context_modification_resp
->
gNB_DU_ue_id
);
// DUtoCURRCInformation
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextModificationResponseIEs_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
;
}
f1ap_ue_context_modification_resp
->
du_to_cu_rrc_information
=
(
uint8_t
*
)
calloc
(
1
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
);
memcpy
(
f1ap_ue_context_modification_resp
->
du_to_cu_rrc_information
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
buf
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
);
f1ap_ue_context_modification_resp
->
du_to_cu_rrc_information_length
=
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
;
// DRBs_SetupMod_List
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextModificationResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_DRBs_SetupMod_List
,
false
);
if
(
ie
!=
NULL
){
f1ap_ue_context_modification_resp
->
drbs_to_be_setup_length
=
ie
->
value
.
choice
.
DRBs_SetupMod_List
.
list
.
count
;
f1ap_ue_context_modification_resp
->
drbs_to_be_setup
=
calloc
(
f1ap_ue_context_modification_resp
->
drbs_to_be_setup_length
,
sizeof
(
f1ap_drb_to_be_setup_t
));
AssertFatal
(
f1ap_ue_context_modification_resp
->
drbs_to_be_setup
,
"could not allocate memory for f1ap_ue_context_setup_resp->drbs_setup
\n
"
);
for
(
i
=
0
;
i
<
f1ap_ue_context_modification_resp
->
drbs_to_be_setup_length
;
++
i
)
{
f1ap_drb_to_be_setup_t
*
drb_p
=
&
f1ap_ue_context_modification_resp
->
drbs_to_be_setup
[
i
];
F1AP_DRBs_SetupMod_Item_t
*
drbs_setupmod_item_p
;
drbs_setupmod_item_p
=
&
((
F1AP_DRBs_SetupMod_ItemIEs_t
*
)
ie
->
value
.
choice
.
DRBs_SetupMod_List
.
list
.
array
[
i
])
->
value
.
choice
.
DRBs_SetupMod_Item
;
drb_p
->
drb_id
=
drbs_setupmod_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_setupmod_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_setupmod_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
);
GtpuUpdateTunnelOutgoingTeid
(
getCxt
(
CUtype
,
instance
)
->
gtpInst
,
f1ap_ue_context_modification_resp
->
rnti
,
(
ebi_t
)
drbs_setupmod_item_p
->
dRBID
,
drb_p
->
up_dl_tnl
[
0
].
teid
);
}
}
// SRBs_FailedToBeSetupMod_List
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextModificationResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_SRBs_FailedToBeSetupMod_List
,
false
);
if
(
ie
!=
NULL
){
f1ap_ue_context_modification_resp
->
srbs_failed_to_be_setup_length
=
ie
->
value
.
choice
.
SRBs_FailedToBeSetupMod_List
.
list
.
count
;
f1ap_ue_context_modification_resp
->
srbs_failed_to_be_setup
=
calloc
(
f1ap_ue_context_modification_resp
->
srbs_failed_to_be_setup_length
,
sizeof
(
f1ap_rb_failed_to_be_setup_t
));
AssertFatal
(
f1ap_ue_context_modification_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_modification_resp
->
srbs_failed_to_be_setup_length
;
++
i
)
{
f1ap_rb_failed_to_be_setup_t
*
srb_p
=
&
f1ap_ue_context_modification_resp
->
srbs_failed_to_be_setup
[
i
];
srb_p
->
rb_id
=
((
F1AP_SRBs_FailedToBeSetupMod_Item_t
*
)
ie
->
value
.
choice
.
SRBs_FailedToBeSetupMod_List
.
list
.
array
[
i
])
->
sRBID
;
}
}
// DRBs_FailedToBeSetupMod_List
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextModificationResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_DRBs_FailedToBeSetupMod_List
,
false
);
if
(
ie
!=
NULL
){
f1ap_ue_context_modification_resp
->
drbs_failed_to_be_setup_length
=
ie
->
value
.
choice
.
DRBs_FailedToBeSetupMod_List
.
list
.
count
;
f1ap_ue_context_modification_resp
->
drbs_failed_to_be_setup
=
calloc
(
f1ap_ue_context_modification_resp
->
drbs_failed_to_be_setup_length
,
sizeof
(
f1ap_rb_failed_to_be_setup_t
));
AssertFatal
(
f1ap_ue_context_modification_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_modification_resp
->
drbs_failed_to_be_setup_length
;
++
i
)
{
f1ap_rb_failed_to_be_setup_t
*
drb_p
=
&
f1ap_ue_context_modification_resp
->
drbs_failed_to_be_setup
[
i
];
drb_p
->
rb_id
=
((
F1AP_DRBs_FailedToBeSetupMod_Item_t
*
)
ie
->
value
.
choice
.
DRBs_FailedToBeSetupMod_List
.
list
.
array
[
i
])
->
dRBID
;
}
}
// SCell_FailedtoSetupMod_List
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextModificationResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_SCell_FailedtoSetupMod_List
,
false
);
if
(
ie
!=
NULL
){
LOG_E
(
F1AP
,
"Not supporting handling of SCell_FailedtoSetupMod_List
\n
"
);
}
// SRBs_Setup_List
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextModificationResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_SRBs_SetupMod_List
,
false
);
if
(
ie
!=
NULL
){
f1ap_ue_context_modification_resp
->
srbs_to_be_setup_length
=
ie
->
value
.
choice
.
SRBs_SetupMod_List
.
list
.
count
;
f1ap_ue_context_modification_resp
->
srbs_to_be_setup
=
calloc
(
f1ap_ue_context_modification_resp
->
srbs_to_be_setup_length
,
sizeof
(
f1ap_srb_to_be_setup_t
));
AssertFatal
(
f1ap_ue_context_modification_resp
->
srbs_to_be_setup
,
"could not allocate memory for f1ap_ue_context_setup_resp->drbs_setup
\n
"
);
for
(
i
=
0
;
i
<
f1ap_ue_context_modification_resp
->
srbs_to_be_setup_length
;
++
i
)
{
f1ap_srb_to_be_setup_t
*
srb_p
=
&
f1ap_ue_context_modification_resp
->
srbs_to_be_setup
[
i
];
F1AP_SRBs_SetupMod_Item_t
*
srbs_setup_item_p
;
srbs_setup_item_p
=
&
((
F1AP_SRBs_SetupMod_ItemIEs_t
*
)
ie
->
value
.
choice
.
SRBs_SetupMod_List
.
list
.
array
[
i
])
->
value
.
choice
.
SRBs_SetupMod_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
;
}
int
CU_handle_UE_CONTEXT_MODIFICATION_FAILURE
(
instance_t
instance
,
...
...
openair2/F1AP/f1ap_handlers.c
View file @
d3899a21
...
...
@@ -50,7 +50,7 @@ f1ap_message_processing_t f1ap_messages_processing[][3] = {
{
DU_handle_gNB_CU_CONFIGURATION_UPDATE
,
CU_handle_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE
,
CU_handle_gNB_CU_CONFIGURATION_UPDATE_FAILURE
},
/* gNBCUConfigurationUpdate */
{
DU_handle_UE_CONTEXT_SETUP_REQUEST
,
CU_handle_UE_CONTEXT_SETUP_RESPONSE
,
0
},
/* UEContextSetup */
{
DU_handle_UE_CONTEXT_RELEASE_COMMAND
,
CU_handle_UE_CONTEXT_RELEASE_COMPLETE
,
0
},
/* UEContextRelease */
{
DU_handle_UE_CONTEXT_MODIFICATION_REQUEST
,
0
,
0
},
/* UEContextModification */
{
DU_handle_UE_CONTEXT_MODIFICATION_REQUEST
,
CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE
,
0
},
/* UEContextModification */
{
0
,
0
,
0
},
/* UEContextModificationRequired */
{
0
,
0
,
0
},
/* UEMobilityCommand */
{
CU_handle_UE_CONTEXT_RELEASE_REQUEST
,
0
,
0
},
/* UEContextReleaseRequest */
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
d3899a21
...
...
@@ -3606,6 +3606,10 @@ static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, const ch
}
static
void
rrc_CU_process_ue_context_modification_response
(
MessageDef
*
msg_p
,
const
char
*
msg_name
,
instance_t
instance
){
LOG_I
(
NR_RRC
,
"RRC processing of F1 ue_context modification response at the CU is pending
\n
"
);
}
unsigned
int
mask_flip
(
unsigned
int
x
)
{
return
((((
x
>>
8
)
+
(
x
<<
8
))
&
0xffff
)
>>
6
);
}
...
...
@@ -4108,6 +4112,10 @@ void *rrc_gnb_task(void *args_p) {
rrc_CU_process_ue_context_setup_response
(
msg_p
,
msg_name_p
,
instance
);
break
;
case
F1AP_UE_CONTEXT_MODIFICATION_RESP
:
rrc_CU_process_ue_context_modification_response
(
msg_p
,
msg_name_p
,
instance
);
break
;
case
F1AP_UE_CONTEXT_MODIFICATION_REQ
:
rrc_DU_process_ue_context_modification_request
(
msg_p
,
msg_name_p
,
instance
);
break
;
...
...
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