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
littleBu
OpenXG-RAN
Commits
ffb3354d
Commit
ffb3354d
authored
Jan 24, 2025
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Verify cu/du_add_f1_ue_data() success in stack
parent
f0ab2683
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
16 deletions
+32
-16
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
+4
-2
openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c
openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c
+2
-1
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+12
-6
openair2/RRC/NR/rrc_gNB_UE_context.c
openair2/RRC/NR/rrc_gNB_UE_context.c
+2
-1
openair2/RRC/NR/rrc_gNB_cuup.c
openair2/RRC/NR/rrc_gNB_cuup.c
+4
-2
openair2/RRC/NR/rrc_gNB_du.c
openair2/RRC/NR/rrc_gNB_du.c
+4
-2
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+4
-2
No files found.
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
View file @
ffb3354d
...
@@ -482,7 +482,8 @@ static NR_UE_info_t *create_new_UE(gNB_MAC_INST *mac, uint32_t cu_id)
...
@@ -482,7 +482,8 @@ static NR_UE_info_t *create_new_UE(gNB_MAC_INST *mac, uint32_t cu_id)
return
NULL
;
return
NULL
;
f1_ue_data_t
new_ue_data
=
{.
secondary_ue
=
cu_id
};
f1_ue_data_t
new_ue_data
=
{.
secondary_ue
=
cu_id
};
du_add_f1_ue_data
(
rnti
,
&
new_ue_data
);
bool
success
=
du_add_f1_ue_data
(
rnti
,
&
new_ue_data
);
DevAssert
(
success
);
const
NR_ServingCellConfigCommon_t
*
scc
=
mac
->
common_channels
[
CC_id
].
ServingCellConfigCommon
;
const
NR_ServingCellConfigCommon_t
*
scc
=
mac
->
common_channels
[
CC_id
].
ServingCellConfigCommon
;
const
NR_ServingCellConfig_t
*
sccd
=
mac
->
common_channels
[
CC_id
].
pre_ServingCellConfig
;
const
NR_ServingCellConfig_t
*
sccd
=
mac
->
common_channels
[
CC_id
].
pre_ServingCellConfig
;
...
@@ -826,7 +827,8 @@ void dl_rrc_message_transfer(const f1ap_dl_rrc_message_t *dl_rrc)
...
@@ -826,7 +827,8 @@ void dl_rrc_message_transfer(const f1ap_dl_rrc_message_t *dl_rrc)
if
(
!
du_exists_f1_ue_data
(
dl_rrc
->
gNB_DU_ue_id
))
{
if
(
!
du_exists_f1_ue_data
(
dl_rrc
->
gNB_DU_ue_id
))
{
LOG_D
(
NR_MAC
,
"No CU UE ID stored for UE RNTI %04x, adding CU UE ID %d
\n
"
,
dl_rrc
->
gNB_DU_ue_id
,
dl_rrc
->
gNB_CU_ue_id
);
LOG_D
(
NR_MAC
,
"No CU UE ID stored for UE RNTI %04x, adding CU UE ID %d
\n
"
,
dl_rrc
->
gNB_DU_ue_id
,
dl_rrc
->
gNB_CU_ue_id
);
f1_ue_data_t
new_ue_data
=
{.
secondary_ue
=
dl_rrc
->
gNB_CU_ue_id
};
f1_ue_data_t
new_ue_data
=
{.
secondary_ue
=
dl_rrc
->
gNB_CU_ue_id
};
du_add_f1_ue_data
(
dl_rrc
->
gNB_DU_ue_id
,
&
new_ue_data
);
bool
success
=
du_add_f1_ue_data
(
dl_rrc
->
gNB_DU_ue_id
,
&
new_ue_data
);
DevAssert
(
success
);
}
}
if
(
UE
->
expect_reconfiguration
&&
dl_rrc
->
srb_id
==
1
)
{
if
(
UE
->
expect_reconfiguration
&&
dl_rrc
->
srb_id
==
1
)
{
...
...
openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c
View file @
ffb3354d
...
@@ -150,7 +150,8 @@ void e1_bearer_context_setup(const e1ap_bearer_setup_req_t *req)
...
@@ -150,7 +150,8 @@ void e1_bearer_context_setup(const e1ap_bearer_setup_req_t *req)
uint32_t
cu_up_ue_id
=
req
->
gNB_cu_cp_ue_id
;
uint32_t
cu_up_ue_id
=
req
->
gNB_cu_cp_ue_id
;
f1_ue_data_t
ued
=
{.
secondary_ue
=
req
->
gNB_cu_cp_ue_id
};
f1_ue_data_t
ued
=
{.
secondary_ue
=
req
->
gNB_cu_cp_ue_id
};
if
(
need_ue_id_mgmt
)
{
if
(
need_ue_id_mgmt
)
{
cu_add_f1_ue_data
(
cu_up_ue_id
,
&
ued
);
bool
success
=
cu_add_f1_ue_data
(
cu_up_ue_id
,
&
ued
);
DevAssert
(
success
);
LOG_I
(
E1AP
,
"adding UE with CU-CP UE ID %d and CU-UP UE ID %d
\n
"
,
req
->
gNB_cu_cp_ue_id
,
cu_up_ue_id
);
LOG_I
(
E1AP
,
"adding UE with CU-CP UE ID %d and CU-UP UE ID %d
\n
"
,
req
->
gNB_cu_cp_ue_id
,
cu_up_ue_id
);
}
}
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
ffb3354d
...
@@ -1181,8 +1181,10 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc,
...
@@ -1181,8 +1181,10 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc,
/* update to old DU assoc id -- RNTI + secondary DU UE ID further below */
/* update to old DU assoc id -- RNTI + secondary DU UE ID further below */
f1_ue_data_t
ue_data
=
cu_get_f1_ue_data
(
UE
->
rrc_ue_id
);
f1_ue_data_t
ue_data
=
cu_get_f1_ue_data
(
UE
->
rrc_ue_id
);
ue_data
.
du_assoc_id
=
source_ctx
->
du
->
assoc_id
;
ue_data
.
du_assoc_id
=
source_ctx
->
du
->
assoc_id
;
cu_remove_f1_ue_data
(
UE
->
rrc_ue_id
);
bool
success
=
cu_remove_f1_ue_data
(
UE
->
rrc_ue_id
);
cu_add_f1_ue_data
(
UE
->
rrc_ue_id
,
&
ue_data
);
DevAssert
(
success
);
success
=
cu_add_f1_ue_data
(
UE
->
rrc_ue_id
,
&
ue_data
);
DevAssert
(
success
);
nr_rrc_finalize_ho
(
UE
);
nr_rrc_finalize_ho
(
UE
);
}
else
if
(
physCellId
!=
cell_info
->
nr_pci
)
{
}
else
if
(
physCellId
!=
cell_info
->
nr_pci
)
{
/* UE was moving from previous cell so quickly that RRCReestablishment for previous cell was received in this cell */
/* UE was moving from previous cell so quickly that RRCReestablishment for previous cell was received in this cell */
...
@@ -1212,8 +1214,10 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc,
...
@@ -1212,8 +1214,10 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc,
UE
->
nr_cellid
=
msg
->
nr_cellid
;
UE
->
nr_cellid
=
msg
->
nr_cellid
;
f1_ue_data_t
ue_data
=
cu_get_f1_ue_data
(
UE
->
rrc_ue_id
);
f1_ue_data_t
ue_data
=
cu_get_f1_ue_data
(
UE
->
rrc_ue_id
);
ue_data
.
secondary_ue
=
msg
->
gNB_DU_ue_id
;
ue_data
.
secondary_ue
=
msg
->
gNB_DU_ue_id
;
cu_remove_f1_ue_data
(
UE
->
rrc_ue_id
);
bool
success
=
cu_remove_f1_ue_data
(
UE
->
rrc_ue_id
);
cu_add_f1_ue_data
(
UE
->
rrc_ue_id
,
&
ue_data
);
DevAssert
(
success
);
success
=
cu_add_f1_ue_data
(
UE
->
rrc_ue_id
,
&
ue_data
);
DevAssert
(
success
);
rrc_gNB_generate_RRCReestablishment
(
ue_context_p
,
msg
->
du2cu_rrc_container
,
old_rnti
,
du
);
rrc_gNB_generate_RRCReestablishment
(
ue_context_p
,
msg
->
du2cu_rrc_container
,
old_rnti
,
du
);
return
;
return
;
...
@@ -2125,8 +2129,10 @@ static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, i
...
@@ -2125,8 +2129,10 @@ static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, i
f1_ue_data_t
ue_data
=
cu_get_f1_ue_data
(
UE
->
rrc_ue_id
);
f1_ue_data_t
ue_data
=
cu_get_f1_ue_data
(
UE
->
rrc_ue_id
);
ue_data
.
secondary_ue
=
target_ctx
->
du_ue_id
;
ue_data
.
secondary_ue
=
target_ctx
->
du_ue_id
;
ue_data
.
du_assoc_id
=
target_ctx
->
du
->
assoc_id
;
ue_data
.
du_assoc_id
=
target_ctx
->
du
->
assoc_id
;
cu_remove_f1_ue_data
(
UE
->
rrc_ue_id
);
bool
success
=
cu_remove_f1_ue_data
(
UE
->
rrc_ue_id
);
cu_add_f1_ue_data
(
UE
->
rrc_ue_id
,
&
ue_data
);
DevAssert
(
success
);
success
=
cu_add_f1_ue_data
(
UE
->
rrc_ue_id
,
&
ue_data
);
DevAssert
(
success
);
LOG_I
(
NR_RRC
,
"UE %d handover: update RNTI from %04x to %04x
\n
"
,
UE
->
rrc_ue_id
,
UE
->
rnti
,
target_ctx
->
new_rnti
);
LOG_I
(
NR_RRC
,
"UE %d handover: update RNTI from %04x to %04x
\n
"
,
UE
->
rrc_ue_id
,
UE
->
rnti
,
target_ctx
->
new_rnti
);
nr_ho_source_cu_t
*
source_ctx
=
UE
->
ho_context
->
source
;
nr_ho_source_cu_t
*
source_ctx
=
UE
->
ho_context
->
source
;
DevAssert
(
source_ctx
->
old_rnti
==
UE
->
rnti
);
DevAssert
(
source_ctx
->
old_rnti
==
UE
->
rnti
);
...
...
openair2/RRC/NR/rrc_gNB_UE_context.c
View file @
ffb3354d
...
@@ -204,7 +204,8 @@ rrc_gNB_ue_context_t *rrc_gNB_create_ue_context(sctp_assoc_t assoc_id,
...
@@ -204,7 +204,8 @@ rrc_gNB_ue_context_t *rrc_gNB_create_ue_context(sctp_assoc_t assoc_id,
AssertFatal
(
!
cu_exists_f1_ue_data
(
ue
->
rrc_ue_id
),
AssertFatal
(
!
cu_exists_f1_ue_data
(
ue
->
rrc_ue_id
),
"UE F1 Context for ID %d already exists, logic bug
\n
"
,
"UE F1 Context for ID %d already exists, logic bug
\n
"
,
ue
->
rrc_ue_id
);
ue
->
rrc_ue_id
);
cu_add_f1_ue_data
(
ue
->
rrc_ue_id
,
&
ue_data
);
bool
success
=
cu_add_f1_ue_data
(
ue
->
rrc_ue_id
,
&
ue_data
);
DevAssert
(
success
);
RB_INSERT
(
rrc_nr_ue_tree_s
,
&
rrc_instance_pP
->
rrc_ue_head
,
ue_context_p
);
RB_INSERT
(
rrc_nr_ue_tree_s
,
&
rrc_instance_pP
->
rrc_ue_head
,
ue_context_p
);
LOG_UE_EVENT
(
ue
,
LOG_UE_EVENT
(
ue
,
...
...
openair2/RRC/NR/rrc_gNB_cuup.c
View file @
ffb3354d
...
@@ -132,8 +132,10 @@ sctp_assoc_t get_new_cuup_for_ue(const gNB_RRC_INST *rrc, const gNB_RRC_UE_t *ue
...
@@ -132,8 +132,10 @@ sctp_assoc_t get_new_cuup_for_ue(const gNB_RRC_INST *rrc, const gNB_RRC_UE_t *ue
/* update the association for the UE so it will be picked up later */
/* update the association for the UE so it will be picked up later */
ue_data
.
e1_assoc_id
=
selected
->
assoc_id
;
ue_data
.
e1_assoc_id
=
selected
->
assoc_id
;
cu_remove_f1_ue_data
(
ue
->
rrc_ue_id
);
bool
success
=
cu_remove_f1_ue_data
(
ue
->
rrc_ue_id
);
cu_add_f1_ue_data
(
ue
->
rrc_ue_id
,
&
ue_data
);
DevAssert
(
success
);
success
=
cu_add_f1_ue_data
(
ue
->
rrc_ue_id
,
&
ue_data
);
DevAssert
(
success
);
LOG_I
(
RRC
,
"UE %d associating to CU-UP assoc_id %d out of %ld CU-UPs
\n
"
,
ue
->
rrc_ue_id
,
ue_data
.
e1_assoc_id
,
rrc
->
num_cuups
);
LOG_I
(
RRC
,
"UE %d associating to CU-UP assoc_id %d out of %ld CU-UPs
\n
"
,
ue
->
rrc_ue_id
,
ue_data
.
e1_assoc_id
,
rrc
->
num_cuups
);
return
ue_data
.
e1_assoc_id
;
return
ue_data
.
e1_assoc_id
;
...
...
openair2/RRC/NR/rrc_gNB_du.c
View file @
ffb3354d
...
@@ -426,9 +426,11 @@ static int invalidate_du_connections(gNB_RRC_INST *rrc, sctp_assoc_t assoc_id)
...
@@ -426,9 +426,11 @@ static int invalidate_du_connections(gNB_RRC_INST *rrc, sctp_assoc_t assoc_id)
if
(
ue_data
.
du_assoc_id
==
assoc_id
)
{
if
(
ue_data
.
du_assoc_id
==
assoc_id
)
{
/* this UE belongs to the DU that disconnected, set du_assoc_id to 0,
/* this UE belongs to the DU that disconnected, set du_assoc_id to 0,
* meaning DU is offline, then trigger release request */
* meaning DU is offline, then trigger release request */
cu_remove_f1_ue_data
(
ue_id
);
bool
success
=
cu_remove_f1_ue_data
(
ue_id
);
DevAssert
(
success
);
ue_data
.
du_assoc_id
=
0
;
ue_data
.
du_assoc_id
=
0
;
cu_add_f1_ue_data
(
ue_id
,
&
ue_data
);
success
=
cu_add_f1_ue_data
(
ue_id
,
&
ue_data
);
DevAssert
(
success
);
rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_REQ
(
0
,
rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_REQ
(
0
,
ue_context_p
,
ue_context_p
,
NGAP_CAUSE_RADIO_NETWORK
,
NGAP_CAUSE_RADIO_NETWORK
,
...
...
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
ffb3354d
...
@@ -355,9 +355,11 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a
...
@@ -355,9 +355,11 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a
uint32_t
du_ue_id
=
ue_context_p
->
ue_context
.
rnti
;
uint32_t
du_ue_id
=
ue_context_p
->
ue_context
.
rnti
;
uint32_t
rrc_ue_id
=
ue_context_p
->
ue_context
.
rrc_ue_id
;
uint32_t
rrc_ue_id
=
ue_context_p
->
ue_context
.
rrc_ue_id
;
f1_ue_data_t
du_ue_data
=
{.
secondary_ue
=
rrc_ue_id
};
f1_ue_data_t
du_ue_data
=
{.
secondary_ue
=
rrc_ue_id
};
du_add_f1_ue_data
(
du_ue_id
,
&
du_ue_data
);
bool
success
=
du_add_f1_ue_data
(
du_ue_id
,
&
du_ue_data
);
DevAssert
(
success
);
f1_ue_data_t
cu_ue_data
=
{.
secondary_ue
=
du_ue_id
};
f1_ue_data_t
cu_ue_data
=
{.
secondary_ue
=
du_ue_id
};
cu_add_f1_ue_data
(
rrc_ue_id
,
&
cu_ue_data
);
success
=
cu_add_f1_ue_data
(
rrc_ue_id
,
&
cu_ue_data
);
DevAssert
(
success
);
LOG_I
(
RRC
,
"Assign CU UE ID %d and DU UE ID %d to UE RNTI %04x
\n
"
,
rrc_ue_id
,
du_ue_id
,
ue_context_p
->
ue_context
.
rnti
);
LOG_I
(
RRC
,
"Assign CU UE ID %d and DU UE ID %d to UE RNTI %04x
\n
"
,
rrc_ue_id
,
du_ue_id
,
ue_context_p
->
ue_context
.
rnti
);
// configure MAC and RLC
// configure MAC and RLC
...
...
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