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
zzha zzha
OpenXG-RAN
Commits
843a1dc0
Commit
843a1dc0
authored
Oct 30, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce lookup functions for DUs
parent
1af4e819
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
12 deletions
+27
-12
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+9
-12
openair2/RRC/NR/rrc_gNB_du.c
openair2/RRC/NR/rrc_gNB_du.c
+13
-0
openair2/RRC/NR/rrc_gNB_du.h
openair2/RRC/NR/rrc_gNB_du.h
+5
-0
No files found.
openair2/RRC/NR/rrc_gNB.c
View file @
843a1dc0
...
...
@@ -524,9 +524,6 @@ static void rrc_gNB_generate_defaultRRCReconfiguration(const protocol_ctxt_t *co
uint8_t
xid
=
rrc_gNB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
);
ue_p
->
xids
[
xid
]
=
RRC_DEFAULT_RECONF
;
const
nr_rrc_du_container_t
*
du
=
rrc
->
du
;
DevAssert
(
du
!=
NULL
);
struct
NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
*
dedicatedNAS_MessageList
=
CALLOC
(
1
,
sizeof
(
*
dedicatedNAS_MessageList
));
/* Add all NAS PDUs to the list */
...
...
@@ -551,7 +548,8 @@ static void rrc_gNB_generate_defaultRRCReconfiguration(const protocol_ctxt_t *co
dedicatedNAS_MessageList
=
NULL
;
}
AssertFatal
(
du
->
setup_req
->
num_cells_available
==
1
,
"cannot handle more than one cell, but have %d
\n
"
,
du
->
setup_req
->
num_cells_available
);
const
nr_rrc_du_container_t
*
du
=
get_du_for_ue
(
rrc
,
ue_p
->
rrc_ue_id
);
DevAssert
(
du
!=
NULL
);
f1ap_served_cell_info_t
*
cell_info
=
&
du
->
setup_req
->
cell
[
0
].
info
;
int
scs
=
get_ssb_scs
(
cell_info
);
int
band
=
get_dl_band
(
cell_info
);
...
...
@@ -1241,10 +1239,12 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc, const NR_RRC
?
"Other Failure"
:
(
cause
==
NR_ReestablishmentCause_handoverFailure
?
"Handover Failure"
:
"reconfigurationFailure"
));
/* look up corresponding DU. For the moment, there is only one */
const
nr_rrc_du_container_t
*
du
=
rrc
->
du
;
AssertFatal
(
du
!=
NULL
,
"received CCCH message, but no corresponding DU found
\n
"
);
AssertFatal
(
du
->
setup_req
->
num_cells_available
==
1
,
"cannot handle more than one cell
\n
"
);
sctp_assoc_t
assoc_id
=
0
;
// currently, we have only one DU
const
nr_rrc_du_container_t
*
du
=
get_du_by_assoc_id
(
rrc
,
assoc_id
);
if
(
du
==
NULL
)
{
LOG_E
(
RRC
,
"received CCCH message, but no corresponding DU found
\n
"
);
return
;
}
const
f1ap_served_cell_info_t
*
cell_info
=
&
du
->
setup_req
->
cell
[
0
].
info
;
if
(
physCellId
!=
cell_info
->
nr_pci
)
{
/* UE was moving from previous cell so quickly that RRCReestablishment for previous cell was received in this cell */
...
...
@@ -1293,7 +1293,7 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc, const NR_RRC
// update with new RNTI, and update secondary UE association
UE
->
rnti
=
msg
->
crnti
;
cu_remove_f1_ue_data
(
UE
->
rrc_ue_id
);
f1_ue_data_t
ue_data
=
{.
secondary_ue
=
msg
->
gNB_DU_ue_id
,
.
du_assoc_id
=
assoc_id
};
f1_ue_data_t
ue_data
=
{.
secondary_ue
=
msg
->
gNB_DU_ue_id
};
cu_add_f1_ue_data
(
UE
->
rrc_ue_id
,
&
ue_data
);
UE
->
reestablishment_cause
=
cause
;
...
...
@@ -2417,9 +2417,6 @@ rrc_gNB_generate_SecurityModeCommand(
cu2du
.
uE_CapabilityRAT_ContainerList_length
=
ue_p
->
ue_cap_buffer
.
len
;
}
const
nr_rrc_du_container_t
*
du
=
rrc
->
du
;
DevAssert
(
du
!=
NULL
);
/* the callback will fill the UE context setup request and forward it */
f1_ue_data_t
ue_data
=
cu_get_f1_ue_data
(
ue_p
->
rrc_ue_id
);
f1ap_ue_context_setup_t
ue_context_setup_req
=
{
...
...
openair2/RRC/NR/rrc_gNB_du.c
View file @
843a1dc0
...
...
@@ -183,3 +183,16 @@ void rrc_CU_process_f1_lost_connection(gNB_RRC_INST *rrc, f1ap_lost_connection_t
/* TODO invalidate UE assoc IDs */
}
nr_rrc_du_container_t
*
get_du_for_ue
(
gNB_RRC_INST
*
rrc
,
uint32_t
ue_id
)
{
nr_rrc_du_container_t
*
du
=
rrc
->
du
;
if
(
du
==
NULL
)
return
NULL
;
return
du
;
}
nr_rrc_du_container_t
*
get_du_by_assoc_id
(
gNB_RRC_INST
*
rrc
,
sctp_assoc_t
assoc_id
)
{
AssertFatal
(
assoc_id
==
rrc
->
du
->
assoc_id
,
"cannot handle multiple DUs yet
\n
"
);
return
rrc
->
du
;
}
openair2/RRC/NR/rrc_gNB_du.h
View file @
843a1dc0
...
...
@@ -24,12 +24,17 @@
#include <netinet/in.h>
#include <netinet/sctp.h>
#include <stdint.h>
struct
f1ap_setup_req_s
;
struct
f1ap_lost_connection_t
;
struct
gNB_RRC_INST_s
;
struct
nr_rrc_du_container_t
;
void
rrc_gNB_process_f1_setup_req
(
struct
f1ap_setup_req_s
*
req
,
sctp_assoc_t
assoc_id
);
void
rrc_CU_process_f1_lost_connection
(
struct
gNB_RRC_INST_s
*
rrc
,
struct
f1ap_lost_connection_t
*
lc
,
sctp_assoc_t
assoc_id
);
struct
nr_rrc_du_container_t
*
get_du_for_ue
(
struct
gNB_RRC_INST_s
*
rrc
,
uint32_t
ue_id
);
struct
nr_rrc_du_container_t
*
get_du_by_assoc_id
(
struct
gNB_RRC_INST_s
*
rrc
,
sctp_assoc_t
assoc_id
);
#endif
/* RRC_GNB_DU_H_ */
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