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
lizhongxiao
OpenXG-RAN
Commits
f3cbfe17
Commit
f3cbfe17
authored
Feb 14, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trigger RC -> bearer
parent
585b2e05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c
+23
-2
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+13
-0
No files found.
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c
View file @
f3cbfe17
...
...
@@ -214,22 +214,43 @@ sm_ag_if_ans_t write_subs_rc_sm(void const* src)
return
ans
;
}
void
rrc_gNB_trigger_new_bearer
(
int
rnti
);
void
rrc_gNB_trigger_release_bearer
(
int
rnti
);
sm_ag_if_ans_t
write_ctrl_rc_sm
(
void
const
*
data
)
{
assert
(
data
!=
NULL
);
// assert(data->type == RAN_CONTROL_CTRL_V1_03 );
// assert(data->type == RAN_CONTROL_CTRL_V1_03 );
rc_ctrl_req_data_t
const
*
ctrl
=
(
rc_ctrl_req_data_t
const
*
)
data
;
if
(
ctrl
->
hdr
.
format
==
FORMAT_1_E2SM_RC_CTRL_HDR
){
if
(
ctrl
->
hdr
.
frmt_1
.
ric_style_type
==
1
&&
ctrl
->
hdr
.
frmt_1
.
ctrl_act_id
==
2
){
printf
(
"QoS flow mapping configuration
\n
"
);
//mir
//int const rnti = get_single_ue_rnti();
int
const
rnti
=
-
1
;
printf
(
"QoS flow mapping configuration with rnti %d
\n
"
,
rnti
);
e2sm_rc_ctrl_msg_frmt_1_t
const
*
frmt_1
=
&
ctrl
->
msg
.
frmt_1
;
printf
(
"int_ran %ld
\n
"
,
frmt_1
->
ran_param
[
0
].
ran_param_val
.
flag_true
->
int_ran
);
for
(
size_t
i
=
0
;
i
<
frmt_1
->
sz_ran_param
;
++
i
){
seq_ran_param_t
const
*
rp
=
frmt_1
->
ran_param
;
if
(
rp
[
i
].
ran_param_id
==
1
){
assert
(
rp
[
i
].
ran_param_val
.
type
==
ELEMENT_KEY_FLAG_TRUE_RAN_PARAMETER_VAL_TYPE
);
printf
(
"DRB ID %ld
\n
"
,
rp
[
i
].
ran_param_val
.
flag_true
->
int_ran
);
if
(
rp
[
i
].
ran_param_val
.
flag_true
->
int_ran
==
5
){
printf
(
"[O-RAN RC]: Creating a new bearer
\n
"
);
fflush
(
stdout
);
rrc_gNB_trigger_new_bearer
(
rnti
);
}
else
if
(
rp
[
i
].
ran_param_val
.
flag_true
->
int_ran
==
4
){
printf
(
"[O-RAN RC]: Releasing bearer
\n
"
);
fflush
(
stdout
);
rrc_gNB_trigger_release_bearer
(
rnti
);
}
else
{
assert
(
0
!=
0
&&
"Unknown int_ran"
);
}
}
else
if
(
rp
[
i
].
ran_param_id
==
2
){
assert
(
rp
[
i
].
ran_param_val
.
type
==
LIST_RAN_PARAMETER_VAL_TYPE
);
printf
(
"List of QoS Flows to be modified
\n
"
);
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
f3cbfe17
...
...
@@ -2655,11 +2655,22 @@ static pdu_session_to_setup_t fill_pdu_session(const rrc_pdu_session_param_t *se
return
pdu
;
}
static
int
get_single_ue_rnti
(
void
)
{
rrc_gNB_ue_context_t
*
ue_context_p
=
NULL
;
RB_FOREACH
(
ue_context_p
,
rrc_nr_ue_tree_s
,
&
(
RC
.
nrrrc
[
0
]
->
rrc_ue_head
))
{
return
ue_context_p
->
ue_context
.
rnti
;
}
return
-
1
;
}
extern
instance_t
get_f1_gtp_instance
(
void
);
void
rrc_gNB_trigger_new_bearer
(
int
rnti
)
{
/* get RRC and UE */
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
0
];
if
(
rnti
<
0
)
rnti
=
get_single_ue_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
);
...
...
@@ -2774,6 +2785,8 @@ void rrc_gNB_trigger_release_bearer(int rnti)
{
/* get RRC and UE */
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
0
];
if
(
rnti
<
0
)
rnti
=
get_single_ue_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
);
...
...
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