Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-SMF
Commits
44a7737f
Commit
44a7737f
authored
May 10, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
documentation
parent
6abf9f49
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
395 additions
and
362 deletions
+395
-362
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+18
-12
src/smf_app/smf_app.hpp
src/smf_app/smf_app.hpp
+9
-4
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+6
-21
src/smf_app/smf_context.hpp
src/smf_app/smf_context.hpp
+326
-64
src/smf_app/smf_msg.cpp
src/smf_app/smf_msg.cpp
+8
-75
src/smf_app/smf_msg.hpp
src/smf_app/smf_msg.hpp
+27
-176
src/smf_app/smf_n10.cpp
src/smf_app/smf_n10.cpp
+0
-5
src/smf_app/smf_n10.hpp
src/smf_app/smf_n10.hpp
+0
-2
src/smf_app/smf_n11.hpp
src/smf_app/smf_n11.hpp
+0
-2
src/smf_app/smf_procedure.cpp
src/smf_app/smf_procedure.cpp
+1
-1
No files found.
src/smf_app/smf_app.cpp
View file @
44a7737f
...
...
@@ -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
//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).
...
...
@@ -936,17 +939,20 @@ void smf_app::trigger_pdu_session_modification() {
std
::
make_shared
<
itti_nx_trigger_pdu_session_modification
>
(
TASK_SMF_APP
,
TASK_SMF_N11
);
//step 1. collect the necessary information- hardcoded
supi_t
supi
=
{
};
std
::
string
dnn
(
"default"
);
pdu_session_id_t
pdu_session_id
=
{
1
};
snssai_t
snssai
=
{
};
pfcp
::
qfi_t
qfi
=
{
};
qfi
.
qfi
=
7
;
std
::
string
supi_str
(
"200000000000001"
);
smf_string_to_supi
(
&
supi
,
supi_str
.
c_str
());
snssai
.
sST
=
222
;
snssai
.
sD
=
"0000D4"
;
//step 1. collect the necessary information
/*
//For testing purpose
supi_t supi = { };
std::string dnn("default");
pdu_session_id_t pdu_session_id = { 1 };
snssai_t snssai = { };
pfcp::qfi_t qfi = { };
qfi.qfi = 7;
std::string supi_str("200000000000001");
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_dnn
(
dnn
);
...
...
src/smf_app/smf_app.hpp
View file @
44a7737f
...
...
@@ -65,7 +65,6 @@ namespace smf {
#define T3592_TIMER_VALUE_SEC 16
#define T3592_TIMER_MAX_RETRIES 4
typedef
enum
{
PDU_SESSION_ESTABLISHMENT
=
1
,
PDU_SESSION_MODIFICATION
=
2
,
...
...
@@ -219,10 +218,16 @@ class smf_app {
/*
* 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
*/
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
...
...
@@ -300,7 +305,7 @@ class smf_app {
* @return void
*/
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
);
n2_sm_info_type_e
n2_sm_info_type_str2e
(
std
::
string
n2_info_type
);
...
...
src/smf_app/smf_context.cpp
View file @
44a7737f
...
...
@@ -63,7 +63,7 @@ extern smf::smf_n11 *smf_n11_inst;
extern
smf
::
smf_config
smf_cfg
;
//------------------------------------------------------------------------------
void
smf_qos_flow
::
release_qos_flow
()
{
void
smf_qos_flow
::
mark_as_released
()
{
released
=
true
;
}
...
...
@@ -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
)
and
(
flow
.
qfi
.
qfi
<=
QOS_FLOW_IDENTIFIER_LAST
))
{
qos_flows
.
erase
(
flow
.
qfi
.
qfi
);
...
...
@@ -248,19 +248,6 @@ bool smf_pdu_session::find_qos_flow(const pfcp::pdr_id_t &pdr_id,
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
)
{
smf_qos_flow
&
flow
=
qos_flows
[
qfi
.
qfi
];
...
...
@@ -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
{
Logger
::
smf_app
().
info
(
"Get QoS Rules associated with Flow with QFI %d"
,
qfi
.
qfi
);
...
...
@@ -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"
,
(
uint8_t
)
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) {
}
//------------------------------------------------------------------------------
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"
,
(
uint8_t
)
qos_rule
.
qosruleidentifer
);
uint8_t
rule_id
=
qos_rule
.
qosruleidentifer
;
...
...
@@ -1586,8 +1573,6 @@ void smf_context::handle_pdu_session_update_sm_context_request(
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_msg_type
(
"PDU_SESSION_MODIFICATION_COMMAND"
);
n11_sm_context_resp
->
res
.
set_n2_sm_information
(
n2_sm_info_hex_to_be_created
);
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(
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
);
//N2: PDU Session Resource Modify Re
quest
Transfer
//N2: PDU Session Resource Modify Re
sponse
Transfer
smf_n1_n2_inst
.
create_n2_sm_information
(
itti_msg
->
msg
,
1
,
n2_sm_info_type_e
::
PDU_RES_MOD_REQ
,
n2_sm_info
);
...
...
src/smf_app/smf_context.hpp
View file @
44a7737f
This diff is collapsed.
Click to expand it.
src/smf_app/smf_msg.cpp
View file @
44a7737f
...
...
@@ -228,16 +228,6 @@ std::string pdu_session_create_sm_context_request::get_dnn_selection_mode() cons
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
)
{
m_cause
=
cause
;
...
...
@@ -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
;
}
//-----------------------------------------------------------------------------
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
)
{
m_n2_sm_information
=
value
;
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
;
}
//-----------------------------------------------------------------------------
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
)
{
m_n2_sm_info_type
=
value
;
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
;
}
//-----------------------------------------------------------------------------
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
)
{
m_n1_sm_message
=
value
;
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
;
}
//-----------------------------------------------------------------------------
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
;
}
...
...
@@ -457,63 +447,6 @@ uint8_t pdu_session_update_sm_context_response::get_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
(
const
qos_flow_context_updated
&
flow
)
{
...
...
src/smf_app/smf_msg.hpp
View file @
44a7737f
This diff is collapsed.
Click to expand it.
src/smf_app/smf_n10.cpp
View file @
44a7737f
...
...
@@ -102,11 +102,6 @@ smf_n10::smf_n10() {
Logger
::
smf_n10
().
startup
(
"Started"
);
}
//------------------------------------------------------------------------------
void
smf_n10
::
handle_receive_sm_data_notification
()
{
//TODO:
}
//------------------------------------------------------------------------------
bool
smf_n10
::
get_sm_data
(
supi64_t
&
supi
,
std
::
string
&
dnn
,
snssai_t
&
snssai
,
...
...
src/smf_app/smf_n10.hpp
View file @
44a7737f
...
...
@@ -43,8 +43,6 @@ class smf_n10 {
std
::
thread
::
id
thread_id
;
std
::
thread
thread
;
void
handle_receive_sm_data_notification
();
public:
smf_n10
();
smf_n10
(
smf_n10
const
&
)
=
delete
;
...
...
src/smf_app/smf_n11.hpp
View file @
44a7737f
...
...
@@ -46,8 +46,6 @@ class smf_n11 {
std
::
thread
::
id
thread_id
;
std
::
thread
thread
;
void
handle_receive_sm_data_notification
();
public:
smf_n11
();
smf_n11
(
smf_n11
const
&
)
=
delete
;
...
...
src/smf_app/smf_procedure.cpp
View file @
44a7737f
...
...
@@ -863,7 +863,7 @@ int session_update_sm_context_procedure::run(
}
//update in the PDU Session
flow
.
release_qos_flow
();
flow
.
mark_as_released
();
smf_qos_flow
flow2
=
flow
;
sps
->
add_qos_flow
(
flow2
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment