Commit 61e84600 authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Process PDU Session release in Release procedure instead of Update procedure

parent 7af3fc9f
This diff is collapsed.
...@@ -1138,7 +1138,7 @@ smf_procedure_code session_update_sm_context_procedure::run( ...@@ -1138,7 +1138,7 @@ 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:: case session_management_procedures_type_e::
PDU_SESSION_RELEASE_AMF_INITIATED: PDU_SESSION_RELEASE_AMF_INITIATED:
case session_management_procedures_type_e:: case session_management_procedures_type_e::
...@@ -1147,7 +1147,8 @@ smf_procedure_code session_update_sm_context_procedure::run( ...@@ -1147,7 +1147,8 @@ smf_procedure_code session_update_sm_context_procedure::run(
auto flow = dl_edges[0].get_qos_flow(qfi); auto flow = dl_edges[0].get_qos_flow(qfi);
if (!flow) { // no QoS flow found if (!flow) { // no QoS flow found
Logger::smf_app().error( Logger::smf_app().error(
"Update SM Context procedure: could not found QoS flow with QFI " "Update SM Context procedure: could not found QoS flow with
QFI "
"%d", "%d",
qfi.qfi); qfi.qfi);
// Set cause to SYSTEM_FAILURE and send response // Set cause to SYSTEM_FAILURE and send response
...@@ -1167,7 +1168,8 @@ smf_procedure_code session_update_sm_context_procedure::run( ...@@ -1167,7 +1168,8 @@ smf_procedure_code session_update_sm_context_procedure::run(
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
arrival of
// a first DL packet // a first DL packet
far.set(far_id); far.set(far_id);
...@@ -1179,17 +1181,16 @@ smf_procedure_code session_update_sm_context_procedure::run( ...@@ -1179,17 +1181,16 @@ smf_procedure_code session_update_sm_context_procedure::run(
} 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 // for UL
if (flow->far_id_ul.first) { if (flow->far_id_ul.first) {
pfcp::update_far far = {}; pfcp::update_far far = {};
pfcp::far_id_t far_id = {}; pfcp::far_id_t far_id = {};
far_id.far_id = flow->far_id_ul.second.far_id; far_id.far_id =
pfcp::apply_action_t apply_action = {}; flow->far_id_ul.second.far_id; pfcp::apply_action_t apply_action = {};
apply_action.drop = 1; apply_action.drop = 1;
far.set(far_id); far.set(far_id);
...@@ -1205,7 +1206,7 @@ smf_procedure_code session_update_sm_context_procedure::run( ...@@ -1205,7 +1206,7 @@ smf_procedure_code session_update_sm_context_procedure::run(
// sps->add_qos_flow(flow); // sps->add_qos_flow(flow);
} }
} break; } 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,6 +1413,7 @@ smf_procedure_code session_update_sm_context_procedure::handle_itti_msg( ...@@ -1412,6 +1413,7 @@ smf_procedure_code session_update_sm_context_procedure::handle_itti_msg(
} }
} break; } break;
/*
case session_management_procedures_type_e:: case session_management_procedures_type_e::
PDU_SESSION_RELEASE_AMF_INITIATED: PDU_SESSION_RELEASE_AMF_INITIATED:
case session_management_procedures_type_e:: case session_management_procedures_type_e::
...@@ -1420,13 +1422,16 @@ smf_procedure_code session_update_sm_context_procedure::handle_itti_msg( ...@@ -1420,13 +1422,16 @@ smf_procedure_code session_update_sm_context_procedure::handle_itti_msg(
Logger::smf_app().info( Logger::smf_app().info(
"PDU Session Update SM Context (PDU Session Release) accepted by " "PDU Session Update SM Context (PDU Session Release) accepted by "
"UPF"); "UPF");
// clear the resources including addresses allocated to this Session and // clear the resources including addresses allocated to this Session
and
// associated QoS flows // associated QoS flows
sps->deallocate_ressources( sps->deallocate_ressources(
n11_trigger.get()->req.get_dnn()); // TODO: for IPv6 (only for Ipv4 n11_trigger.get()->req.get_dnn()); // TODO: for IPv6 (only for
Ipv4
// for the moment) // for the moment)
} }
} }
*/
} }
std::shared_ptr<pfcp_association> next_upf{}; std::shared_ptr<pfcp_association> next_upf{};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment