Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
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
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-SMF
Commits
61e84600
Commit
61e84600
authored
Dec 01, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Process PDU Session release in Release procedure instead of Update procedure
parent
7af3fc9f
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
204 additions
and
201 deletions
+204
-201
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+124
-126
src/smf_app/smf_procedure.cpp
src/smf_app/smf_procedure.cpp
+80
-75
No files found.
src/smf_app/smf_context.cpp
View file @
61e84600
This diff is collapsed.
Click to expand it.
src/smf_app/smf_procedure.cpp
View file @
61e84600
...
@@ -1138,74 +1138,75 @@ smf_procedure_code session_update_sm_context_procedure::run(
...
@@ -1138,74 +1138,75 @@ smf_procedure_code session_update_sm_context_procedure::run(
n11_triggered_pending
->
res
.
add_qos_flow_context_updated
(
qcu
);
n11_triggered_pending
->
res
.
add_qos_flow_context_updated
(
qcu
);
}
}
}
break
;
}
break
;
/*
case session_management_procedures_type_e::
PDU_SESSION_RELEASE_AMF_INITIATED:
case session_management_procedures_type_e::
PDU_SESSION_RELEASE_UE_REQUESTED_STEP1: {
for (const auto& qfi : list_of_qfis_to_be_modified) {
auto flow = dl_edges[0].get_qos_flow(qfi);
if (!flow) { // no QoS flow found
Logger::smf_app().error(
"Update SM Context procedure: could not found QoS flow with
QFI "
"%d",
qfi.qfi);
// Set cause to SYSTEM_FAILURE and send response
qos_flow_context_updated qcu = {};
qcu.set_cause(static_cast<uint8_t>(
cause_value_5gsm_e::CAUSE_31_REQUEST_REJECTED_UNSPECIFIED));
qcu.set_qfi(qfi);
n11_triggered_pending->res.add_qos_flow_context_updated(qcu);
continue;
}
case
session_management_procedures_type_e
:
:
// for DL
PDU_SESSION_RELEASE_AMF_INITIATED:
if (flow->far_id_dl.first) {
case
session_management_procedures_type_e
:
:
pfcp::update_far far = {};
PDU_SESSION_RELEASE_UE_REQUESTED_STEP1:
{
pfcp::far_id_t far_id = {};
for
(
const
auto
&
qfi
:
list_of_qfis_to_be_modified
)
{
auto
flow
=
dl_edges
[
0
].
get_qos_flow
(
qfi
);
if
(
!
flow
)
{
// no QoS flow found
Logger
::
smf_app
().
error
(
"Update SM Context procedure: could not found QoS flow with QFI "
"%d"
,
qfi
.
qfi
);
// Set cause to SYSTEM_FAILURE and send response
qos_flow_context_updated
qcu
=
{};
qcu
.
set_cause
(
static_cast
<
uint8_t
>
(
cause_value_5gsm_e
::
CAUSE_31_REQUEST_REJECTED_UNSPECIFIED
));
qcu
.
set_qfi
(
qfi
);
n11_triggered_pending
->
res
.
add_qos_flow_context_updated
(
qcu
);
continue
;
}
// for DL
if
(
flow
->
far_id_dl
.
first
)
{
pfcp
::
update_far
far
=
{};
pfcp
::
far_id_t
far_id
=
{};
far_id
.
far_id
=
flow
->
far_id_dl
.
second
.
far_id
;
far_id.far_id = flow->far_id_dl.second.far_id;
// apply_action.buff = 1;
// apply_action.buff = 1;
pfcp
::
apply_action_t
apply_action
=
{};
pfcp::apply_action_t apply_action = {};
apply_action
.
nocp
=
1
;
// notify the CP function about the arrival of
apply_action.nocp = 1; // notify the CP function about the
// a first DL packet
arrival of
// a first DL packet
far
.
set
(
far_id
);
far.set(far_id);
far
.
set
(
apply_action
);
far.set(apply_action);
// Add IEs to message
// Add IEs to message
n4_triggered
->
pfcp_ies
.
set
(
far
);
n4_triggered->pfcp_ies.set(far);
send_n4
=
true
;
send_n4 = true;
}
else
{
} else {
Logger
::
smf_app
().
info
(
Logger::smf_app().info(
"Update SM Context procedure, could not get FAR ID of QoS Flow "
"Update SM Context procedure, could not get FAR ID of QoS
"ID %d"
,
Flow " "ID %d", flow->qfi.qfi);
flow
->
qfi
.
qfi
);
}
}
// for UL
if
(
flow
->
far_id_ul
.
first
)
{
pfcp
::
update_far
far
=
{};
pfcp
::
far_id_t
far_id
=
{};
far_id
.
far_id
=
flow
->
far_id_ul
.
second
.
far_id
;
pfcp
::
apply_action_t
apply_action
=
{};
apply_action
.
drop
=
1
;
far
.
set
(
far_id
);
far
.
set
(
apply_action
);
// Add IEs to message
n4_triggered
->
pfcp_ies
.
set
(
far
);
send_n4
=
true
;
}
// update in the PDU Session
// for UL
flow
->
mark_as_released
();
if (flow->far_id_ul.first) {
// TODO can I safely remove that
pfcp::update_far far = {};
// sps->add_qos_flow(flow);
pfcp::far_id_t far_id = {};
}
far_id.far_id =
}
break
;
flow->far_id_ul.second.far_id; pfcp::apply_action_t apply_action = {};
apply_action.drop = 1;
far.set(far_id);
far.set(apply_action);
// Add IEs to message
n4_triggered->pfcp_ies.set(far);
send_n4 = true;
}
// update in the PDU Session
flow->mark_as_released();
// TODO can I safely remove that
// sps->add_qos_flow(flow);
}
} break;
*/
default:
{
default:
{
Logger
::
smf_app
().
error
(
Logger
::
smf_app
().
error
(
"Update SM Context procedure: Unknown session management type %d"
,
"Update SM Context procedure: Unknown session management type %d"
,
...
@@ -1412,21 +1413,25 @@ smf_procedure_code session_update_sm_context_procedure::handle_itti_msg(
...
@@ -1412,21 +1413,25 @@ smf_procedure_code session_update_sm_context_procedure::handle_itti_msg(
}
}
}
break
;
}
break
;
case
session_management_procedures_type_e
:
:
/*
PDU_SESSION_RELEASE_AMF_INITIATED:
case session_management_procedures_type_e::
case
session_management_procedures_type_e
:
:
PDU_SESSION_RELEASE_AMF_INITIATED:
PDU_SESSION_RELEASE_UE_REQUESTED_STEP1:
{
case session_management_procedures_type_e::
if
(
cause
.
cause_value
==
CAUSE_VALUE_REQUEST_ACCEPTED
)
{
PDU_SESSION_RELEASE_UE_REQUESTED_STEP1: {
Logger
::
smf_app
().
info
(
if (cause.cause_value == CAUSE_VALUE_REQUEST_ACCEPTED) {
"PDU Session Update SM Context (PDU Session Release) accepted by "
Logger::smf_app().info(
"UPF"
);
"PDU Session Update SM Context (PDU Session Release) accepted by "
// clear the resources including addresses allocated to this Session and
"UPF");
// associated QoS flows
// clear the resources including addresses allocated to this Session
sps
->
deallocate_ressources
(
and
n11_trigger
.
get
()
->
req
.
get_dnn
());
// TODO: for IPv6 (only for Ipv4
// associated QoS flows
// for the moment)
sps->deallocate_ressources(
n11_trigger.get()->req.get_dnn()); // TODO: for IPv6 (only for
Ipv4
// for the moment)
}
}
}
}
*/
}
}
std
::
shared_ptr
<
pfcp_association
>
next_upf
{};
std
::
shared_ptr
<
pfcp_association
>
next_upf
{};
...
...
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