Commit 047abd75 authored by gauthier's avatar gauthier

Clean SPGWU hashtables on Sx delete session request

parent a69056a0
...@@ -443,6 +443,12 @@ void pfcp_switch::add_pfcp_ul_pdr_by_up_teid(const teid_t teid, std::shared_ptr< ...@@ -443,6 +443,12 @@ void pfcp_switch::add_pfcp_ul_pdr_by_up_teid(const teid_t teid, std::shared_ptr<
} }
} }
} }
//------------------------------------------------------------------------------
void pfcp_switch::remove_pfcp_ul_pdrs_by_up_teid(const teid_t teid)
{
ul_s1u_teid2pfcp_pdr.erase(teid);
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void pfcp_switch::add_pfcp_dl_pdr_by_ue_ip(const uint32_t ue_ip, std::shared_ptr<pfcp::pfcp_pdr>& pdr) void pfcp_switch::add_pfcp_dl_pdr_by_ue_ip(const uint32_t ue_ip, std::shared_ptr<pfcp::pfcp_pdr>& pdr)
{ {
...@@ -466,6 +472,11 @@ void pfcp_switch::add_pfcp_dl_pdr_by_ue_ip(const uint32_t ue_ip, std::shared_ptr ...@@ -466,6 +472,11 @@ void pfcp_switch::add_pfcp_dl_pdr_by_ue_ip(const uint32_t ue_ip, std::shared_ptr
} }
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void pfcp_switch::remove_pfcp_dl_pdrs_by_ue_ip(const uint32_t ue_ip)
{
ue_ipv4_hbo2pfcp_pdr.erase(ue_ip);
}
//------------------------------------------------------------------------------
std::string pfcp_switch::to_string() const std::string pfcp_switch::to_string() const
{ {
std::string s = {}; std::string s = {};
...@@ -789,16 +800,24 @@ void pfcp_switch::pfcp_session_look_up_pack_in_core(const char *buffer, const st ...@@ -789,16 +800,24 @@ void pfcp_switch::pfcp_session_look_up_pack_in_core(const char *buffer, const st
pfcp::far_id_t far_id = {}; pfcp::far_id_t far_id = {};
if ((*it)->get(far_id)) { if ((*it)->get(far_id)) {
std::shared_ptr<pfcp::pfcp_far> sfar = {}; std::shared_ptr<pfcp::pfcp_far> sfar = {};
//Logger::pfcp_switch().trace( "pfcp_session_look_up_pack_in_core %d bytes, far id %08X", num_bytes, far_id); #if TRACE_IS_ON
Logger::pfcp_switch().trace( "pfcp_session_look_up_pack_in_core %d bytes, far id %08X", num_bytes, far_id);
#endif
if (ssession->get(far_id.far_id, sfar)) { if (ssession->get(far_id.far_id, sfar)) {
//Logger::pfcp_switch().trace( "pfcp_session_look_up_pack_in_core %d bytes, got far, far id %08X", num_bytes, far_id); #if TRACE_IS_ON
Logger::pfcp_switch().trace( "pfcp_session_look_up_pack_in_core %d bytes, got far, far id %08X", num_bytes, far_id);
#endif
sfar->apply_forwarding_rules(iph, num_bytes, nocp, buff); sfar->apply_forwarding_rules(iph, num_bytes, nocp, buff);
if (buff) { if (buff) {
//Logger::pfcp_switch().trace( "Buffering %d bytes, far id %08X", num_bytes, far_id); #if TRACE_IS_ON
Logger::pfcp_switch().trace( "Buffering %d bytes, far id %08X", num_bytes, far_id);
#endif
(*it)->buffering_requested(buffer, num_bytes); (*it)->buffering_requested(buffer, num_bytes);
} }
if (nocp) { if (nocp) {
//Logger::pfcp_switch().trace( "Notify CP %d bytes, far id %08X", num_bytes, far_id); #if TRACE_IS_ON
Logger::pfcp_switch().trace( "Notify CP %d bytes, far id %08X", num_bytes, far_id);
#endif
(*it)->notify_cp_requested(ssession); (*it)->notify_cp_requested(ssession);
} }
} }
......
...@@ -170,8 +170,8 @@ public: ...@@ -170,8 +170,8 @@ public:
void time_out_max_commit_interval(const uint32_t timer_id); void time_out_max_commit_interval(const uint32_t timer_id);
void remove_pfcp_session(const pfcp::fseid_t& cp_fseid); void remove_pfcp_session(const pfcp::fseid_t& cp_fseid);
void remove_pfcp_ul_pdrs_by_up_teid(const teid_t) {}; void remove_pfcp_ul_pdrs_by_up_teid(const teid_t);
void remove_pfcp_dl_pdrs_by_ue_ip(const uint32_t) {}; void remove_pfcp_dl_pdrs_by_ue_ip(const uint32_t);
std::string to_string() const; std::string to_string() const;
}; };
......
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