Commit 41a2b48a authored by Giulio Carota's avatar Giulio Carota

QoS Flows are no more stored in smf_pdu_session

parent d22b51bf
...@@ -3493,15 +3493,21 @@ bool smf_context::handle_ho_preparation_request( ...@@ -3493,15 +3493,21 @@ bool smf_context::handle_ho_preparation_request(
return false; return false;
} }
std::vector<smf_qos_flow> flows = {}; edge access_upf =
sp.get()->get_qos_flows( sp->get_sessions_graph()->get_access_edge();
flows); // get all flows associated with this session for now
for (auto flow : flows) { // Retrieve QoS Flows from the access UPF
//TODO: Check PDU Session id cast (uint32 -> uint8)
std::vector<std::shared_ptr<smf_qos_flow>> flows = {};
access_upf.get_qos_flows(
sp->pdu_session_id, flows);
for (const auto& flow : flows) {
qos_flow_context_updated qos_flow = {}; qos_flow_context_updated qos_flow = {};
qos_flow.qfi = flow.qfi; qos_flow.set_qfi(flow->qfi);
qos_flow.ul_fteid = flow.ul_fteid; qos_flow.set_ul_fteid(flow->ul_fteid);
qos_flow.dl_fteid = flow.dl_fteid; qos_flow.set_dl_fteid(flow->dl_fteid);
qos_flow.qos_profile = flow.qos_profile; qos_flow.set_qos_profile(flow->qos_profile);
sm_context_resp->res.add_qos_flow_context_updated(qos_flow); sm_context_resp->res.add_qos_flow_context_updated(qos_flow);
} }
......
...@@ -178,6 +178,27 @@ bool edge::serves_network( ...@@ -178,6 +178,27 @@ bool edge::serves_network(
return serves_network(dnn, snssai, set, s); return serves_network(dnn, snssai, set, s);
} }
//---------------------------------------------------------------------------------------------
bool edge::get_qos_flows(std::vector<std::shared_ptr<smf_qos_flow>>& flows){
flows.clear();
for(const auto& flow : this->qos_flows){
flows.push_back(flow);
}
return flows.size() > 0;
}
//---------------------------------------------------------------------------------------------
bool edge::get_qos_flows(pdu_session_id_t pid, std::vector<std::shared_ptr<smf_qos_flow>>& flows){
flows.clear();
for(const auto& flow : this->qos_flows){
if(flow->pdu_session_id == pid)
flows.push_back(flow);
}
return flows.size() > 0;
}
//--------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------
std::shared_ptr<smf_qos_flow> edge::get_qos_flow(const pfcp::pdr_id_t& pdr_id) { std::shared_ptr<smf_qos_flow> edge::get_qos_flow(const pfcp::pdr_id_t& pdr_id) {
// it may happen that 2 qos flows have the same PDR ID e.g. in an // it may happen that 2 qos flows have the same PDR ID e.g. in an
......
...@@ -314,6 +314,9 @@ struct edge { ...@@ -314,6 +314,9 @@ struct edge {
const std::unordered_set<std::string>& dnais, const std::unordered_set<std::string>& dnais,
std::string& found_dnai) const; std::string& found_dnai) const;
bool get_qos_flows(std::vector<std::shared_ptr<smf_qos_flow>>& flows);
bool get_qos_flows(pdu_session_id_t pid, std::vector<std::shared_ptr<smf_qos_flow>>& flows);
std::shared_ptr<smf_qos_flow> get_qos_flow(const pfcp::pdr_id_t& pdr_id); std::shared_ptr<smf_qos_flow> get_qos_flow(const pfcp::pdr_id_t& pdr_id);
std::shared_ptr<smf_qos_flow> get_qos_flow(const pfcp::qfi_t& qfi); std::shared_ptr<smf_qos_flow> get_qos_flow(const pfcp::qfi_t& qfi);
......
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