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
59a25c48
Commit
59a25c48
authored
Oct 31, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RRC UE context lookup by RNTI: use assoc_id
parent
6520dbc9
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
15 deletions
+27
-15
common/utils/telnetsrv/telnetsrv_bearer.c
common/utils/telnetsrv/telnetsrv_bearer.c
+2
-2
common/utils/telnetsrv/telnetsrv_ci.c
common/utils/telnetsrv/telnetsrv_ci.c
+1
-1
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_gtp.c
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_gtp.c
+1
-1
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
+2
-2
openair2/RRC/NR/L2_nr_interface.c
openair2/RRC/NR/L2_nr_interface.c
+1
-1
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+4
-5
openair2/RRC/NR/rrc_gNB_UE_context.c
openair2/RRC/NR/rrc_gNB_UE_context.c
+13
-1
openair2/RRC/NR/rrc_gNB_UE_context.h
openair2/RRC/NR/rrc_gNB_UE_context.h
+2
-1
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+1
-1
No files found.
common/utils/telnetsrv/telnetsrv_bearer.c
View file @
59a25c48
...
...
@@ -71,7 +71,7 @@ int add_bearer(char *buf, int debug, telnet_printfunc_t prnt)
}
// verify it exists in RRC as well
rrc_gNB_ue_context_t
*
rrcue
=
rrc_gNB_get_ue_context_by_rnti
(
RC
.
nrrrc
[
0
],
rnti
);
rrc_gNB_ue_context_t
*
rrcue
=
rrc_gNB_get_ue_context_by_rnti
_any_du
(
RC
.
nrrrc
[
0
],
rnti
);
if
(
!
rrcue
)
ERROR_MSG_RET
(
"could not find UE with RNTI %04x
\n
"
,
rnti
);
...
...
@@ -95,7 +95,7 @@ int release_bearer(char *buf, int debug, telnet_printfunc_t prnt)
}
// verify it exists in RRC as well
rrc_gNB_ue_context_t
*
rrcue
=
rrc_gNB_get_ue_context_by_rnti
(
RC
.
nrrrc
[
0
],
rnti
);
rrc_gNB_ue_context_t
*
rrcue
=
rrc_gNB_get_ue_context_by_rnti
_any_du
(
RC
.
nrrrc
[
0
],
rnti
);
if
(
!
rrcue
)
ERROR_MSG_RET
(
"could not find UE with RNTI %04x
\n
"
,
rnti
);
...
...
common/utils/telnetsrv/telnetsrv_ci.c
View file @
59a25c48
...
...
@@ -87,7 +87,7 @@ int get_reestab_count(char *buf, int debug, telnet_printfunc_t prnt)
rnti
=
strtol
(
buf
,
NULL
,
16
);
if
(
rnti
<
1
||
rnti
>=
0xfffe
)
ERROR_MSG_RET
(
"RNTI needs to be [1,0xfffe]
\n
"
);
ue
=
rrc_gNB_get_ue_context_by_rnti
(
RC
.
nrrrc
[
0
],
rnti
);
ue
=
rrc_gNB_get_ue_context_by_rnti
_any_du
(
RC
.
nrrrc
[
0
],
rnti
);
if
(
!
ue
)
ERROR_MSG_RET
(
"could not find UE with RNTI %04x in RRC
\n
"
);
}
...
...
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_gtp.c
View file @
59a25c48
...
...
@@ -38,7 +38,7 @@ void read_gtp_sm(void * data)
UE_iterator
(
UE_info
->
list
,
UE
)
{
uint16_t
const
rnti
=
UE
->
rnti
;
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
rrc_gNB_get_ue_context_by_rnti
(
RC
.
nrrrc
[
mod_id
],
rnti
);
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
rrc_gNB_get_ue_context_by_rnti
_any_du
(
RC
.
nrrrc
[
mod_id
],
rnti
);
if
(
ue_context_p
!=
NULL
)
{
gtp
->
msg
.
ngut
[
i
].
rnti
=
ue_context_p
->
ue_context
.
rnti
;
int
nb_pdu_session
=
ue_context_p
->
ue_context
.
nb_of_pdusessions
;
...
...
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
View file @
59a25c48
...
...
@@ -43,7 +43,7 @@ matched_ues_mac_t filter_ues_by_s_nssai_in_du_or_monolithic(test_cond_e const co
{
if
(
NODE_IS_MONOLITHIC
(
RC
.
nrrrc
[
0
]
->
node_type
))
{
rrc_gNB_ue_context_t
*
rrc_ue_context_list
=
rrc_gNB_get_ue_context_by_rnti
(
RC
.
nrrrc
[
0
],
ue
->
rnti
);
rrc_gNB_ue_context_t
*
rrc_ue_context_list
=
rrc_gNB_get_ue_context_by_rnti
_any_du
(
RC
.
nrrrc
[
0
],
ue
->
rnti
);
ngap_ue_context_list
=
ngap_get_ue_context
(
rrc_ue_context_list
->
ue_context
.
rrc_ue_id
);
assert
(
ngap_ue_context_list
->
gNB_instance
[
0
].
s_nssai
[
0
][
0
].
sST
==
value
&&
"Please, check the condition for S-NSSAI. At the moment, OAI supports eMBB"
);
}
...
...
@@ -589,7 +589,7 @@ kpm_ind_msg_format_3_t fill_kpm_ind_msg_frm_3_in_monolithic(const matched_ues_ma
for
(
size_t
i
=
0
;
i
<
msg_frm_3
.
ue_meas_report_lst_len
;
i
++
)
{
// Fill UE ID data
rrc_gNB_ue_context_t
*
rrc_ue_context_list
=
rrc_gNB_get_ue_context_by_rnti
(
RC
.
nrrrc
[
0
],
matched_ues
.
ue_list
[
i
].
rnti
);
rrc_gNB_ue_context_t
*
rrc_ue_context_list
=
rrc_gNB_get_ue_context_by_rnti
_any_du
(
RC
.
nrrrc
[
0
],
matched_ues
.
ue_list
[
i
].
rnti
);
msg_frm_3
.
meas_report_per_ue
[
i
].
ue_meas_report_lst
.
type
=
GNB_UE_ID_E2SM
;
msg_frm_3
.
meas_report_per_ue
[
i
].
ue_meas_report_lst
.
gnb
=
fill_gnb_data
(
rrc_ue_context_list
);
...
...
openair2/RRC/NR/L2_nr_interface.c
View file @
59a25c48
...
...
@@ -58,7 +58,7 @@ int8_t nr_mac_rrc_bwp_switch_req(const module_id_t module_idP,
const
rnti_t
rntiP
,
const
int
dl_bwp_id
,
const
int
ul_bwp_id
)
{
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context_by_rnti
(
RC
.
nrrrc
[
module_idP
],
rntiP
);
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context_by_rnti
_any_du
(
RC
.
nrrrc
[
module_idP
],
rntiP
);
protocol_ctxt_t
ctxt
;
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
module_idP
,
GNB_FLAG_YES
,
rntiP
,
frameP
,
sub_frameP
,
0
);
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
59a25c48
...
...
@@ -1276,9 +1276,7 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc, sctp_assoc_t
}
rnti_t
old_rnti
=
req
->
ue_Identity
.
c_RNTI
;
// TODO: we need to check within a specific DU!
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context_by_rnti
(
rrc
,
old_rnti
);
gNB_RRC_UE_t
*
UE
=
&
ue_context_p
->
ue_context
;
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context_by_rnti
(
rrc
,
assoc_id
,
old_rnti
);
/* in case we need to do RRC Setup, give the UE a new random identity */
uint64_t
random_value
;
fill_random
(
&
random_value
,
sizeof
(
random_value
));
...
...
@@ -1291,6 +1289,7 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc, sctp_assoc_t
return
;
}
gNB_RRC_UE_t
*
UE
=
&
ue_context_p
->
ue_context
;
// 3GPP TS 38.321 version 15.13.0 Section 7.1 Table 7.1-1: RNTI values
if
(
req
->
ue_Identity
.
c_RNTI
<
0x1
||
req
->
ue_Identity
.
c_RNTI
>
0xffef
)
{
/* c_RNTI range error should not happen */
...
...
@@ -2546,7 +2545,7 @@ void rrc_gNB_trigger_new_bearer(int rnti)
{
/* get RRC and UE */
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
0
];
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context_by_rnti
(
rrc
,
rnti
);
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context_by_rnti
_any_du
(
rrc
,
rnti
);
if
(
ue_context_p
==
NULL
)
{
LOG_E
(
RRC
,
"unknown UE RNTI %04x
\n
"
,
rnti
);
return
;
...
...
@@ -2628,7 +2627,7 @@ void rrc_gNB_trigger_release_bearer(int rnti)
{
/* get RRC and UE */
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
0
];
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context_by_rnti
(
rrc
,
rnti
);
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context_by_rnti
_any_du
(
rrc
,
rnti
);
if
(
ue_context_p
==
NULL
)
{
LOG_E
(
RRC
,
"unknown UE RNTI %04x
\n
"
,
rnti
);
return
;
...
...
openair2/RRC/NR/rrc_gNB_UE_context.c
View file @
59a25c48
...
...
@@ -87,7 +87,19 @@ rrc_gNB_ue_context_t *rrc_gNB_get_ue_context(gNB_RRC_INST *rrc_instance_pP, ue_i
return
RB_FIND
(
rrc_nr_ue_tree_s
,
&
rrc_instance_pP
->
rrc_ue_head
,
&
temp
);
}
rrc_gNB_ue_context_t
*
rrc_gNB_get_ue_context_by_rnti
(
gNB_RRC_INST
*
rrc_instance_pP
,
rnti_t
rntiP
)
rrc_gNB_ue_context_t
*
rrc_gNB_get_ue_context_by_rnti
(
gNB_RRC_INST
*
rrc_instance_pP
,
sctp_assoc_t
assoc_id
,
rnti_t
rntiP
)
{
rrc_gNB_ue_context_t
*
ue_context_p
;
RB_FOREACH
(
ue_context_p
,
rrc_nr_ue_tree_s
,
&
(
rrc_instance_pP
->
rrc_ue_head
))
{
f1_ue_data_t
ue_data
=
cu_get_f1_ue_data
(
ue_context_p
->
ue_context
.
rrc_ue_id
);
if
(
ue_data
.
du_assoc_id
==
assoc_id
&&
ue_context_p
->
ue_context
.
rnti
==
rntiP
)
return
ue_context_p
;
}
LOG_W
(
NR_RRC
,
"search by RNTI %04x and assoc_id %d: no UE found
\n
"
,
rntiP
,
assoc_id
);
return
NULL
;
}
rrc_gNB_ue_context_t
*
rrc_gNB_get_ue_context_by_rnti_any_du
(
gNB_RRC_INST
*
rrc_instance_pP
,
rnti_t
rntiP
)
{
rrc_gNB_ue_context_t
*
ue_context_p
;
RB_FOREACH
(
ue_context_p
,
rrc_nr_ue_tree_s
,
&
(
rrc_instance_pP
->
rrc_ue_head
))
...
...
openair2/RRC/NR/rrc_gNB_UE_context.h
View file @
59a25c48
...
...
@@ -41,7 +41,8 @@ RB_PROTOTYPE(rrc_nr_ue_tree_s, rrc_gNB_ue_context_s, entries, rrc_gNB_compare_ue
rrc_gNB_ue_context_t
*
rrc_gNB_allocate_new_ue_context
(
gNB_RRC_INST
*
rrc_instance_pP
);
rrc_gNB_ue_context_t
*
rrc_gNB_get_ue_context
(
gNB_RRC_INST
*
rrc_instance_pP
,
ue_id_t
ue
);
rrc_gNB_ue_context_t
*
rrc_gNB_get_ue_context_by_rnti
(
gNB_RRC_INST
*
rrc_instance_pP
,
rnti_t
rntiP
);
rrc_gNB_ue_context_t
*
rrc_gNB_get_ue_context_by_rnti
(
gNB_RRC_INST
*
rrc_instance_pP
,
sctp_assoc_t
assoc_id
,
rnti_t
rntiP
);
rrc_gNB_ue_context_t
*
rrc_gNB_get_ue_context_by_rnti_any_du
(
gNB_RRC_INST
*
rrc_instance_pP
,
rnti_t
rntiP
);
void
rrc_gNB_free_mem_ue_context
(
rrc_gNB_ue_context_t
*
const
ue_context_pP
);
...
...
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
59a25c48
...
...
@@ -414,7 +414,7 @@ void rrc_remove_nsa_user(gNB_RRC_INST *rrc, int rnti) {
LOG_D
(
RRC
,
"calling rrc_remove_nsa_user rnti %d
\n
"
,
rnti
);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
rrc
->
module_id
,
GNB_FLAG_YES
,
rnti
,
0
,
0
,
rrc
->
module_id
);
ue_context
=
rrc_gNB_get_ue_context_by_rnti
(
rrc
,
rnti
);
ue_context
=
rrc_gNB_get_ue_context_by_rnti
_any_du
(
rrc
,
rnti
);
if
(
ue_context
==
NULL
)
{
LOG_W
(
RRC
,
"rrc_remove_nsa_user: rnti %d not found
\n
"
,
rnti
);
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