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
c0e9c0ea
Commit
c0e9c0ea
authored
Sep 08, 2021
by
matzakos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update handling of UE context setup Response at F1AP and RRC of the CU
parent
7b2f3440
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
31 deletions
+52
-31
openair2/COMMON/f1ap_messages_types.h
openair2/COMMON/f1ap_messages_types.h
+4
-0
openair2/F1AP/f1ap_cu_ue_context_management.c
openair2/F1AP/f1ap_cu_ue_context_management.c
+33
-24
openair2/F1AP/f1ap_decoder.c
openair2/F1AP/f1ap_decoder.c
+4
-0
openair2/F1AP/f1ap_du_ue_context_management.c
openair2/F1AP/f1ap_du_ue_context_management.c
+0
-1
openair2/F1AP/f1ap_du_ue_context_management.h
openair2/F1AP/f1ap_du_ue_context_management.h
+2
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+6
-5
openair3/ocp-gtpu/gtp_itf.cpp
openair3/ocp-gtpu/gtp_itf.cpp
+3
-1
No files found.
openair2/COMMON/f1ap_messages_types.h
View file @
c0e9c0ea
...
...
@@ -357,8 +357,12 @@ typedef struct f1ap_ue_context_setup_req_s {
uint8_t
du_to_cu_rrc_information_length
;
f1ap_drb_to_be_setup_t
*
drbs_to_be_setup
;
// BK: need to replace by s1ap_initial_context_setup_req
uint8_t
drbs_to_be_setup_length
;
// BK: need to replace by s1ap_initial_context_setup_req
uint8_t
drbs_failed_to_be_setup_length
;
f1ap_rb_failed_to_be_setup_t
*
drbs_failed_to_be_setup
;
f1ap_srb_to_be_setup_t
*
srbs_to_be_setup
;
uint8_t
srbs_to_be_setup_length
;
uint8_t
srbs_failed_to_be_setup_length
;
f1ap_rb_failed_to_be_setup_t
*
srbs_failed_to_be_setup
;
s1ap_initial_context_setup_req_t
*
s1ap_initial_context_setup_req
;
// coniatner for the rrc_eNB_generate_SecurityModeCommand message
uint8_t
*
rrc_container
;
...
...
openair2/F1AP/f1ap_cu_ue_context_management.c
View file @
c0e9c0ea
...
...
@@ -631,46 +631,55 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
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_re
sp
_t
*
f1ap_ue_context_setup_resp
=
&
F1AP_UE_CONTEXT_SETUP_RESP
(
msg_p
);
f1ap_ue_context_setup_re
q
_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
;
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID
,
false
);
f1ap_ue_context_setup_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_setup_resp
->
gNB_CU_ue_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 */
LOG_D
(
F1AP
,
"f1ap_ue_context_setup_resp->gNB_DU_ue_id is: %d
\n
"
,
f1ap_ue_context_setup_resp
->
gNB_DU_ue_id
);
f1ap_ue_context_setup_resp
->
rnti
=
f1ap_get_rnti_by_du_id
(
true
,
instance
,
f1ap_ue_context_setup_resp
->
gNB_DU_ue_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
;
}
f1ap_ue_context_setup_resp
->
du_to_cu_rrc_information
=
(
uint8_t
*
)
calloc
(
1
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
);
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 */
/
/ 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
,
f1ap_ue_context_setup_resp
->
drbs_
to_be_
setup_length
=
ie
->
value
.
choice
.
DRBs_Setup_List
.
list
.
count
;
f1ap_ue_context_setup_resp
->
drbs_
to_be_setup
=
calloc
(
f1ap_ue_context_setup_resp
->
drbs_to_be
_setup_length
,
sizeof
(
f1ap_drb_to_be_setup_t
));
AssertFatal
(
f1ap_ue_context_setup_resp
->
drbs_setup
,
AssertFatal
(
f1ap_ue_context_setup_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_setup_resp
->
drbs_setup_length
;
++
i
)
{
f1ap_drb_to_be_setup_t
*
drb_p
=
&
f1ap_ue_context_setup_resp
->
drbs_setup
[
i
];
for
(
i
=
0
;
i
<
f1ap_ue_context_setup_resp
->
drbs_
to_be_
setup_length
;
++
i
)
{
f1ap_drb_to_be_setup_t
*
drb_p
=
&
f1ap_ue_context_setup_resp
->
drbs_
to_be_
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! */
/
/
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
"
);
...
...
@@ -681,9 +690,9 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
}
}
/
* SRBs_FailedToBeSetup_List */
/
/ SRBs_FailedToBeSetup_List
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_SRBs_FailedToBeSetup_List
,
tru
e
);
F1AP_ProtocolIE_ID_id_SRBs_FailedToBeSetup_List
,
fals
e
);
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
,
...
...
@@ -696,9 +705,9 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
}
}
/
* DRBs_FailedToBeSetup_List */
/
/ DRBs_FailedToBeSetup_List
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_DRBs_FailedToBeSetup_List
,
tru
e
);
F1AP_ProtocolIE_ID_id_DRBs_FailedToBeSetup_List
,
fals
e
);
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
,
...
...
@@ -711,24 +720,24 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
}
}
/
* SCell_FailedtoSetup_List */
/
/ SCell_FailedtoSetup_List
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_SCell_FailedtoSetup_List
,
tru
e
);
F1AP_ProtocolIE_ID_id_SCell_FailedtoSetup_List
,
fals
e
);
if
(
ie
!=
NULL
){
LOG_E
(
F1AP
,
"Not supporting handling of SCell_FailedtoSetup_List
\n
"
);
}
/
* SRBs_Setup_List */
/
/ 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
,
f1ap_ue_context_setup_resp
->
srbs_
to_be_
setup_length
=
ie
->
value
.
choice
.
SRBs_Setup_List
.
list
.
count
;
f1ap_ue_context_setup_resp
->
srbs_
to_be_setup
=
calloc
(
f1ap_ue_context_setup_resp
->
srbs_to_be
_setup_length
,
sizeof
(
f1ap_srb_to_be_setup_t
));
AssertFatal
(
f1ap_ue_context_setup_resp
->
drbs
_setup
,
AssertFatal
(
f1ap_ue_context_setup_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_setup_resp
->
srbs_setup_length
;
++
i
)
{
f1ap_srb_to_be_setup_t
*
srb_p
=
&
f1ap_ue_context_setup_resp
->
srbs_setup
[
i
];
for
(
i
=
0
;
i
<
f1ap_ue_context_setup_resp
->
srbs_
to_be_
setup_length
;
++
i
)
{
f1ap_srb_to_be_setup_t
*
srb_p
=
&
f1ap_ue_context_setup_resp
->
srbs_
to_be_
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
;
...
...
openair2/F1AP/f1ap_decoder.c
View file @
c0e9c0ea
...
...
@@ -119,6 +119,10 @@ static int f1ap_decode_successful_outcome(F1AP_F1AP_PDU_t *pdu) {
LOG_I
(
F1AP
,
"%s(): F1AP_ProcedureCode_id_UEContextRelease
\n
"
,
__func__
);
break
;
case
F1AP_ProcedureCode_id_UEContextSetup
:
LOG_I
(
F1AP
,
"%s(): F1AP_ProcedureCode_id_UEContextSetup
\n
"
,
__func__
);
break
;
default:
LOG_E
(
F1AP
,
"Unknown procedure ID (%d) for successfull outcome message
\n
"
,
(
int
)
pdu
->
choice
.
successfulOutcome
->
procedureCode
);
...
...
openair2/F1AP/f1ap_du_ue_context_management.c
View file @
c0e9c0ea
...
...
@@ -43,7 +43,6 @@
#include <openair3/ocp-gtpu/gtp_itf.h>
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
,
...
...
openair2/F1AP/f1ap_du_ue_context_management.h
View file @
c0e9c0ea
...
...
@@ -36,6 +36,8 @@
/*
* UE Context Setup
*/
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
,
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
c0e9c0ea
...
...
@@ -3249,7 +3249,7 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha
static
void
rrc_CU_process_ue_context_setup_response
(
MessageDef
*
msg_p
,
const
char
*
msg_name
,
instance_t
instance
){
f1ap_ue_context_setup_re
sp
_t
*
resp
=&
F1AP_UE_CONTEXT_SETUP_RESP
(
msg_p
);
f1ap_ue_context_setup_re
q
_t
*
resp
=&
F1AP_UE_CONTEXT_SETUP_RESP
(
msg_p
);
protocol_ctxt_t
ctxt
;
ctxt
.
rnti
=
resp
->
rnti
;
ctxt
.
module_id
=
instance
;
...
...
@@ -3273,7 +3273,7 @@ static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, const ch
SEQUENCE_free
(
&
asn_DEF_NR_CellGroupConfig
,
cellGroupConfig
,
1
);
return
;
}
xer_fprint
(
stdout
,
&
asn_DEF_NR_CellGroupConfig
,
cellGroupConfig
);
//
xer_fprint(stdout,&asn_DEF_NR_CellGroupConfig, cellGroupConfig);
if
(
ue_context_p
->
ue_context
.
masterCellGroup
==
NULL
){
ue_context_p
->
ue_context
.
masterCellGroup
=
calloc
(
1
,
sizeof
(
NR_CellGroupConfig_t
));
...
...
@@ -3287,10 +3287,11 @@ static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, const ch
memcpy
(
ue_context_p
->
ue_context
.
masterCellGroup
->
rlc_BearerToAddModList
,
cellGroupConfig
->
rlc_BearerToAddModList
,
sizeof
(
struct
NR_CellGroupConfig__rlc_BearerToAddModList
));
}
xer_fprint
(
stdout
,
&
asn_DEF_NR_CellGroupConfig
,
ue_context_p
->
ue_context
.
masterCellGroup
);
for
(
i
=
0
;
i
<
resp
->
drbs_setup_length
;
i
++
){
for
(
j
=
0
;
j
<
resp
->
drbs_setup
[
i
].
up_dl_tnl_length
;
j
++
){
GtpuUpdateTunnelOutgoingTeid
(
INSTANCE_DEFAULT
,
ue_context_p
->
ue_context
.
rnti
,
(
ebi_t
)
resp
->
drbs_
setup
[
i
].
drb_id
,
resp
->
drbs
_setup
[
i
].
up_dl_tnl
[
j
].
teid
);
for
(
i
=
0
;
i
<
resp
->
drbs_
to_be_
setup_length
;
i
++
){
for
(
j
=
0
;
j
<
resp
->
drbs_
to_be_
setup
[
i
].
up_dl_tnl_length
;
j
++
){
GtpuUpdateTunnelOutgoingTeid
(
INSTANCE_DEFAULT
,
ue_context_p
->
ue_context
.
rnti
,
(
ebi_t
)
resp
->
drbs_
to_be_setup
[
i
].
drb_id
,
resp
->
drbs_to_be
_setup
[
i
].
up_dl_tnl
[
j
].
teid
);
}
}
free
(
cellGroupConfig
->
rlc_BearerToAddModList
);
...
...
openair3/ocp-gtpu/gtp_itf.cpp
View file @
c0e9c0ea
...
...
@@ -396,13 +396,15 @@ void GtpuUpdateTunnelOutgoingTeid(instance_t instance, rnti_t rnti, ebi_t bearer
LOG_E
(
GTPU
,
"Update tunnel for a not existing rnti %x
\n
"
,
rnti
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
return
;
}
auto
tmp
=
ptrRnti
->
second
.
bearers
;
}
auto
tmp
=
ptrRnti
->
second
.
bearers
;
auto
ptrBearer
=
tmp
.
find
(
bearer_id
);
if
(
ptrBearer
==
tmp
.
end
()
)
{
LOG_E
(
GTPU
,
"Update tunnel for a existing rnti %x, but wrong bearer_id %u
\n
"
,
rnti
,
bearer_id
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
return
;
}
//AssertFatal(ptrBearer.second.teid_outgoing == oldOutGoingTeid, "");
ptrBearer
->
second
.
teid_outgoing
=
newOutgoingTeid
;
LOG_I
(
GTPU
,
"Tunnel Outgoing TEID updated to %d
\n
"
,
ptrBearer
->
second
.
teid_outgoing
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
return
;
}
...
...
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