Commit 2114e592 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen
Browse files

Remove SCID in SMF Context

parent 1c22f054
......@@ -1009,8 +1009,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
scf.get()->pdu_session_id = pdu_session_id;
set_scid_2_smf_context(scid, scf);
smreq->set_scid(scid);
// Store scid in the context itself
sc.get()->set_scid(scid);
Logger::smf_app().debug("Generated a SMF Context ID " SCID_FMT " ", scid);
// Step 9. Let the context handle the message
......
......@@ -734,27 +734,11 @@ void smf_context::handle_itti_msg(
pfcp::qfi_t qfi = {};
if (find_pdu_session(pdr_id, qfi, sd, sp)) {
// Step 1. send N4 Data Report Ack to UPF
pfcp::node_id_t up_node_id = {};
scid_t scid = get_scid();
// Get UPF node
std::shared_ptr<smf_context_ref> scf = {};
if (smf_app_inst->is_scid_2_smf_context(scid)) {
scf = smf_app_inst->scid_2_smf_context(scid);
up_node_id = scf.get()->upf_node_id;
} else {
Logger::smf_app().warn(
"SM Context associated with this id " SCID_FMT
" does not exit!",
scid);
return;
}
itti_n4_session_report_response* n4_ser =
new itti_n4_session_report_response(TASK_SMF_APP, TASK_SMF_N4);
n4_ser->seid = req->seid;
n4_ser->trxn_id = req->trxn_id;
n4_ser->r_endpoint =
endpoint(up_node_id.u1.ipv4_address, pfcp::default_port);
n4_ser->seid = req->seid;
n4_ser->trxn_id = req->trxn_id;
n4_ser->r_endpoint = req->r_endpoint;
std::shared_ptr<itti_n4_session_report_response> n4_report_ack =
std::shared_ptr<itti_n4_session_report_response>(n4_ser);
......@@ -2968,16 +2952,6 @@ std::size_t smf_context::get_number_dnn_contexts() const {
return dnns.size();
}
//-----------------------------------------------------------------------------
void smf_context::set_scid(const scid_t& id) {
scid = id;
}
//-----------------------------------------------------------------------------
scid_t smf_context::get_scid() const {
return scid;
}
//-----------------------------------------------------------------------------
void smf_context::get_supi_prefix(std::string& prefix) const {
prefix = supi_prefix;
......
......@@ -558,7 +558,6 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
: m_context(),
pending_procedures(),
dnn_subscriptions(),
scid(0),
event_sub(),
plmn() {
supi_prefix = {};
......@@ -922,20 +921,6 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
*/
std::size_t get_number_dnn_contexts() const;
/*
* Set SM Context ID
* @param [const scid_t &] id: SM Context Id
* @return void
*/
void set_scid(const scid_t& id);
/*
* Get SM Context ID
* @param [void
* @return scid_t: SM Context Id
*/
scid_t get_scid() const;
/*
* Get Supi prefix
* @param [const std::string &] prefix: Supi prefix (e.g., imsi)
......@@ -1064,7 +1049,6 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
dnn_subscriptions;
supi_t supi;
std::string supi_prefix;
scid_t scid; // SM Context ID
plmn_t plmn;
// AMF IP addr
......
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