Commit 44a7737f authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

documentation

parent 6abf9f49
...@@ -924,7 +924,10 @@ void smf_app::handle_pdu_session_release_sm_context_request( ...@@ -924,7 +924,10 @@ void smf_app::handle_pdu_session_release_sm_context_request(
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void smf_app::trigger_pdu_session_modification() { void smf_app::trigger_pdu_session_modification(supi_t &supi, std::string &dnn,
pdu_session_id_t pdu_session_id,
snssai_t &snssai,
pfcp::qfi_t &qfi) {
//SMF-requested session modification, see section 4.3.3.2@3GPP TS 23.502 //SMF-requested session modification, see section 4.3.3.2@3GPP TS 23.502
//The SMF may decide to modify PDU Session. This procedure also may be //The SMF may decide to modify PDU Session. This procedure also may be
//triggered based on locally configured policy or triggered from the (R)AN (see clause 4.2.6 and clause 4.9.1). //triggered based on locally configured policy or triggered from the (R)AN (see clause 4.2.6 and clause 4.9.1).
...@@ -936,17 +939,20 @@ void smf_app::trigger_pdu_session_modification() { ...@@ -936,17 +939,20 @@ void smf_app::trigger_pdu_session_modification() {
std::make_shared<itti_nx_trigger_pdu_session_modification>(TASK_SMF_APP, std::make_shared<itti_nx_trigger_pdu_session_modification>(TASK_SMF_APP,
TASK_SMF_N11); TASK_SMF_N11);
//step 1. collect the necessary information- hardcoded //step 1. collect the necessary information
supi_t supi = { }; /*
std::string dnn("default"); //For testing purpose
pdu_session_id_t pdu_session_id = { 1 }; supi_t supi = { };
snssai_t snssai = { }; std::string dnn("default");
pfcp::qfi_t qfi = { }; pdu_session_id_t pdu_session_id = { 1 };
qfi.qfi = 7; snssai_t snssai = { };
std::string supi_str("200000000000001"); pfcp::qfi_t qfi = { };
smf_string_to_supi(&supi, supi_str.c_str()); qfi.qfi = 7;
snssai.sST = 222; std::string supi_str("200000000000001");
snssai.sD = "0000D4"; smf_string_to_supi(&supi, supi_str.c_str());
snssai.sST = 222;
snssai.sD = "0000D4";
*/
itti_msg->msg.set_supi(supi); itti_msg->msg.set_supi(supi);
itti_msg->msg.set_dnn(dnn); itti_msg->msg.set_dnn(dnn);
......
...@@ -65,7 +65,6 @@ namespace smf { ...@@ -65,7 +65,6 @@ namespace smf {
#define T3592_TIMER_VALUE_SEC 16 #define T3592_TIMER_VALUE_SEC 16
#define T3592_TIMER_MAX_RETRIES 4 #define T3592_TIMER_MAX_RETRIES 4
typedef enum { typedef enum {
PDU_SESSION_ESTABLISHMENT = 1, PDU_SESSION_ESTABLISHMENT = 1,
PDU_SESSION_MODIFICATION = 2, PDU_SESSION_MODIFICATION = 2,
...@@ -219,10 +218,16 @@ class smf_app { ...@@ -219,10 +218,16 @@ class smf_app {
/* /*
* Trigger pdu session modification * Trigger pdu session modification
* @param should be updated * @param [supi_t &] supi
* @param [std::string &] dnn
* @param [pdu_session_id_t] pdu_session_id
* @param [snssai_t &] snssai
* @param [pfcp::qfi_t &] qfi
* @return void * @return void
*/ */
void trigger_pdu_session_modification(); void trigger_pdu_session_modification(supi_t &supi, std::string &dnn,
pdu_session_id_t pdu_session_id,
snssai_t &snssai, pfcp::qfi_t &qfi);
/* /*
* Verify if SM Context is existed for this Supi * Verify if SM Context is existed for this Supi
...@@ -300,7 +305,7 @@ class smf_app { ...@@ -300,7 +305,7 @@ class smf_app {
* @return void * @return void
*/ */
void update_pdu_session_upCnx_state(const scid_t scid, void update_pdu_session_upCnx_state(const scid_t scid,
const upCnx_state_e state); const upCnx_state_e state);
void timer_t3591_timeout(timer_id_t timer_id, uint64_t arg2_user); void timer_t3591_timeout(timer_id_t timer_id, uint64_t arg2_user);
n2_sm_info_type_e n2_sm_info_type_str2e(std::string n2_info_type); n2_sm_info_type_e n2_sm_info_type_str2e(std::string n2_info_type);
......
...@@ -63,7 +63,7 @@ extern smf::smf_n11 *smf_n11_inst; ...@@ -63,7 +63,7 @@ extern smf::smf_n11 *smf_n11_inst;
extern smf::smf_config smf_cfg; extern smf::smf_config smf_cfg;
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void smf_qos_flow::release_qos_flow() { void smf_qos_flow::mark_as_released() {
released = true; released = true;
} }
...@@ -163,7 +163,7 @@ void smf_pdu_session::get_paa(paa_t &paa) { ...@@ -163,7 +163,7 @@ void smf_pdu_session::get_paa(paa_t &paa) {
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void smf_pdu_session::add_qos_flow(smf_qos_flow &flow) { void smf_pdu_session::add_qos_flow(const smf_qos_flow &flow) {
if ((flow.qfi.qfi >= QOS_FLOW_IDENTIFIER_FIRST ) if ((flow.qfi.qfi >= QOS_FLOW_IDENTIFIER_FIRST )
and (flow.qfi.qfi <= QOS_FLOW_IDENTIFIER_LAST )) { and (flow.qfi.qfi <= QOS_FLOW_IDENTIFIER_LAST )) {
qos_flows.erase(flow.qfi.qfi); qos_flows.erase(flow.qfi.qfi);
...@@ -248,19 +248,6 @@ bool smf_pdu_session::find_qos_flow(const pfcp::pdr_id_t &pdr_id, ...@@ -248,19 +248,6 @@ bool smf_pdu_session::find_qos_flow(const pfcp::pdr_id_t &pdr_id,
return false; return false;
} }
//------------------------------------------------------------------------------
bool smf_pdu_session::has_qos_flow(const pfcp::pdr_id_t &pdr_id,
pfcp::qfi_t &qfi) {
for (std::map<uint8_t, smf_qos_flow>::iterator it = qos_flows.begin();
it != qos_flows.end(); ++it) {
if ((it->second.pdr_id_ul == pdr_id) || (it->second.pdr_id_dl == pdr_id)) {
qfi = it->second.qfi;
return true;
}
}
return false;
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void smf_pdu_session::remove_qos_flow(const pfcp::qfi_t &qfi) { void smf_pdu_session::remove_qos_flow(const pfcp::qfi_t &qfi) {
smf_qos_flow &flow = qos_flows[qfi.qfi]; smf_qos_flow &flow = qos_flows[qfi.qfi];
...@@ -397,7 +384,7 @@ void smf_pdu_session::get_qos_rules_to_be_synchronised( ...@@ -397,7 +384,7 @@ void smf_pdu_session::get_qos_rules_to_be_synchronised(
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void smf_pdu_session::get_qos_rules(pfcp::qfi_t qfi, void smf_pdu_session::get_qos_rules(const pfcp::qfi_t &qfi,
std::vector<QOSRulesIE> &rules) const { std::vector<QOSRulesIE> &rules) const {
Logger::smf_app().info("Get QoS Rules associated with Flow with QFI %d", Logger::smf_app().info("Get QoS Rules associated with Flow with QFI %d",
qfi.qfi); qfi.qfi);
...@@ -431,7 +418,7 @@ bool smf_pdu_session::get_qos_rule(uint8_t rule_id, ...@@ -431,7 +418,7 @@ bool smf_pdu_session::get_qos_rule(uint8_t rule_id,
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void smf_pdu_session::update_qos_rule(QOSRulesIE qos_rule) { void smf_pdu_session::update_qos_rule(const QOSRulesIE &qos_rule) {
Logger::smf_app().info("Update QoS Rule with Rule Id %d", Logger::smf_app().info("Update QoS Rule with Rule Id %d",
(uint8_t) qos_rule.qosruleidentifer); (uint8_t) qos_rule.qosruleidentifer);
uint8_t rule_id = qos_rule.qosruleidentifer; uint8_t rule_id = qos_rule.qosruleidentifer;
...@@ -482,7 +469,7 @@ void smf_pdu_session::mark_qos_rule_to_be_synchronised(uint8_t rule_id) { ...@@ -482,7 +469,7 @@ void smf_pdu_session::mark_qos_rule_to_be_synchronised(uint8_t rule_id) {
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void smf_pdu_session::add_qos_rule(QOSRulesIE qos_rule) { void smf_pdu_session::add_qos_rule(const QOSRulesIE &qos_rule) {
Logger::smf_app().info("Add QoS Rule with Rule Id %d", Logger::smf_app().info("Add QoS Rule with Rule Id %d",
(uint8_t) qos_rule.qosruleidentifer); (uint8_t) qos_rule.qosruleidentifer);
uint8_t rule_id = qos_rule.qosruleidentifer; uint8_t rule_id = qos_rule.qosruleidentifer;
...@@ -1586,8 +1573,6 @@ void smf_context::handle_pdu_session_update_sm_context_request( ...@@ -1586,8 +1573,6 @@ void smf_context::handle_pdu_session_update_sm_context_request(
n2_sm_info_hex_to_be_created); n2_sm_info_hex_to_be_created);
n11_sm_context_resp->res.set_n1_sm_message(n1_sm_msg_hex_to_be_created); n11_sm_context_resp->res.set_n1_sm_message(n1_sm_msg_hex_to_be_created);
n11_sm_context_resp->res.set_n1_sm_msg_type(
"PDU_SESSION_MODIFICATION_COMMAND");
n11_sm_context_resp->res.set_n2_sm_information( n11_sm_context_resp->res.set_n2_sm_information(
n2_sm_info_hex_to_be_created); n2_sm_info_hex_to_be_created);
n11_sm_context_resp->res.set_n2_sm_info_type("PDU_RES_MOD_REQ"); n11_sm_context_resp->res.set_n2_sm_info_type("PDU_RES_MOD_REQ");
...@@ -2309,7 +2294,7 @@ void smf_context::handle_pdu_session_modification_network_requested( ...@@ -2309,7 +2294,7 @@ void smf_context::handle_pdu_session_modification_network_requested(
smf_app_inst->convert_string_2_hex(n1_sm_msg, n1_sm_msg_hex); smf_app_inst->convert_string_2_hex(n1_sm_msg, n1_sm_msg_hex);
itti_msg->msg.set_n1_sm_message(n1_sm_msg_hex); itti_msg->msg.set_n1_sm_message(n1_sm_msg_hex);
//N2: PDU Session Resource Modify Request Transfer //N2: PDU Session Resource Modify Response Transfer
smf_n1_n2_inst.create_n2_sm_information(itti_msg->msg, 1, smf_n1_n2_inst.create_n2_sm_information(itti_msg->msg, 1,
n2_sm_info_type_e::PDU_RES_MOD_REQ, n2_sm_info_type_e::PDU_RES_MOD_REQ,
n2_sm_info); n2_sm_info);
......
This diff is collapsed.
...@@ -228,16 +228,6 @@ std::string pdu_session_create_sm_context_request::get_dnn_selection_mode() cons ...@@ -228,16 +228,6 @@ std::string pdu_session_create_sm_context_request::get_dnn_selection_mode() cons
return m_dnn_selection_mode; return m_dnn_selection_mode;
} }
//-----------------------------------------------------------------------------
ipmdr_t pdu_session_create_sm_context_request::get_ipmdr() const {
return m_ipmdr;
}
//-----------------------------------------------------------------------------
void pdu_session_create_sm_context_request::set_ipmdr(ipmdr_t const &ipmdr) {
m_ipmdr = ipmdr;
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void pdu_session_create_sm_context_response::set_cause(uint8_t cause) { void pdu_session_create_sm_context_response::set_cause(uint8_t cause) {
m_cause = cause; m_cause = cause;
...@@ -326,48 +316,48 @@ std::string pdu_session_create_sm_context_response::get_amf_url() const { ...@@ -326,48 +316,48 @@ std::string pdu_session_create_sm_context_response::get_amf_url() const {
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
std::string pdu_session_update_sm_context_request::get_n2_sm_information() const { std::string pdu_session_update_sm_context::get_n2_sm_information() const {
return m_n2_sm_information; return m_n2_sm_information;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void pdu_session_update_sm_context_request::set_n2_sm_information( void pdu_session_update_sm_context::set_n2_sm_information(
std::string const &value) { std::string const &value) {
m_n2_sm_information = value; m_n2_sm_information = value;
m_n2_sm_info_is_set = true; m_n2_sm_info_is_set = true;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
std::string pdu_session_update_sm_context_request::get_n2_sm_info_type() const { std::string pdu_session_update_sm_context::get_n2_sm_info_type() const {
return m_n2_sm_info_type; return m_n2_sm_info_type;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void pdu_session_update_sm_context_request::set_n2_sm_info_type( void pdu_session_update_sm_context::set_n2_sm_info_type(
std::string const &value) { std::string const &value) {
m_n2_sm_info_type = value; m_n2_sm_info_type = value;
m_n2_sm_info_is_set = true; m_n2_sm_info_is_set = true;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
std::string pdu_session_update_sm_context_request::get_n1_sm_message() const { std::string pdu_session_update_sm_context::get_n1_sm_message() const {
return m_n1_sm_message; return m_n1_sm_message;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void pdu_session_update_sm_context_request::set_n1_sm_message( void pdu_session_update_sm_context::set_n1_sm_message(
std::string const &value) { std::string const &value) {
m_n1_sm_message = value; m_n1_sm_message = value;
m_n1_sm_msg_is_set = true; m_n1_sm_msg_is_set = true;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool pdu_session_update_sm_context_request::n1_sm_msg_is_set() const { bool pdu_session_update_sm_context::n1_sm_msg_is_set() const {
return m_n1_sm_msg_is_set; return m_n1_sm_msg_is_set;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool pdu_session_update_sm_context_request::n2_sm_info_is_set() const { bool pdu_session_update_sm_context::n2_sm_info_is_set() const {
return m_n2_sm_info_is_set; return m_n2_sm_info_is_set;
} }
...@@ -457,63 +447,6 @@ uint8_t pdu_session_update_sm_context_response::get_cause() { ...@@ -457,63 +447,6 @@ uint8_t pdu_session_update_sm_context_response::get_cause() {
return m_cause; return m_cause;
} }
//-----------------------------------------------------------------------------
std::string pdu_session_update_sm_context_response::get_n2_sm_information() const {
return m_n2_sm_information;
}
//-----------------------------------------------------------------------------
void pdu_session_update_sm_context_response::set_n2_sm_information(
std::string const &value) {
m_n2_sm_information = value;
}
//-----------------------------------------------------------------------------
std::string pdu_session_update_sm_context_response::get_n2_sm_info_type() const {
return n2_sm_info_type;
}
//-----------------------------------------------------------------------------
void pdu_session_update_sm_context_response::set_n2_sm_info_type(
std::string const &value) {
n2_sm_info_type = value;
m_n2_sm_info_is_set = true;
}
//-----------------------------------------------------------------------------
std::string pdu_session_update_sm_context_response::get_n1_sm_message() const {
return m_n1_sm_message;
}
//-----------------------------------------------------------------------------
void pdu_session_update_sm_context_response::set_n1_sm_message(
std::string const &value) {
m_n1_sm_message = value;
m_n1_sm_msg_is_set = true;
}
//-----------------------------------------------------------------------------
std::string pdu_session_update_sm_context_response::get_n1_sm_msg_type() const {
return n2_sm_info_type;
}
//-----------------------------------------------------------------------------
void pdu_session_update_sm_context_response::set_n1_sm_msg_type(
std::string const &value) {
n2_sm_info_type = value;
m_n2_sm_info_is_set = true;
}
//-----------------------------------------------------------------------------
bool pdu_session_update_sm_context_response::n1_sm_msg_is_set() const {
return m_n1_sm_msg_is_set;
}
//-----------------------------------------------------------------------------
bool pdu_session_update_sm_context_response::n2_sm_info_is_set() const {
return m_n2_sm_info_is_set;
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void pdu_session_update_sm_context_response::add_qos_flow_context_updated( void pdu_session_update_sm_context_response::add_qos_flow_context_updated(
const qos_flow_context_updated &flow) { const qos_flow_context_updated &flow) {
......
This diff is collapsed.
...@@ -102,11 +102,6 @@ smf_n10::smf_n10() { ...@@ -102,11 +102,6 @@ smf_n10::smf_n10() {
Logger::smf_n10().startup("Started"); Logger::smf_n10().startup("Started");
} }
//------------------------------------------------------------------------------
void smf_n10::handle_receive_sm_data_notification() {
//TODO:
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool smf_n10::get_sm_data( bool smf_n10::get_sm_data(
supi64_t &supi, std::string &dnn, snssai_t &snssai, supi64_t &supi, std::string &dnn, snssai_t &snssai,
......
...@@ -43,8 +43,6 @@ class smf_n10 { ...@@ -43,8 +43,6 @@ class smf_n10 {
std::thread::id thread_id; std::thread::id thread_id;
std::thread thread; std::thread thread;
void handle_receive_sm_data_notification();
public: public:
smf_n10(); smf_n10();
smf_n10(smf_n10 const&) = delete; smf_n10(smf_n10 const&) = delete;
......
...@@ -46,8 +46,6 @@ class smf_n11 { ...@@ -46,8 +46,6 @@ class smf_n11 {
std::thread::id thread_id; std::thread::id thread_id;
std::thread thread; std::thread thread;
void handle_receive_sm_data_notification();
public: public:
smf_n11(); smf_n11();
smf_n11(smf_n11 const&) = delete; smf_n11(smf_n11 const&) = delete;
......
...@@ -863,7 +863,7 @@ int session_update_sm_context_procedure::run( ...@@ -863,7 +863,7 @@ int session_update_sm_context_procedure::run(
} }
//update in the PDU Session //update in the PDU Session
flow.release_qos_flow(); flow.mark_as_released();
smf_qos_flow flow2 = flow; smf_qos_flow flow2 = flow;
sps->add_qos_flow(flow2); sps->add_qos_flow(flow2);
} }
......
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