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
c5f759d4
Commit
c5f759d4
authored
Aug 20, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
4eaea279
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
345 deletions
+58
-345
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+29
-153
src/smf_app/smf_app.hpp
src/smf_app/smf_app.hpp
+0
-1
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+21
-135
src/smf_app/smf_context.hpp
src/smf_app/smf_context.hpp
+2
-14
src/smf_app/smf_n1.cpp
src/smf_app/smf_n1.cpp
+2
-31
src/smf_app/smf_procedure.cpp
src/smf_app/smf_procedure.cpp
+4
-11
No files found.
src/smf_app/smf_app.cpp
View file @
c5f759d4
This diff is collapsed.
Click to expand it.
src/smf_app/smf_app.hpp
View file @
c5f759d4
...
...
@@ -200,7 +200,6 @@ class smf_app {
void
operator
=
(
smf_app
const
&
)
=
delete
;
void
test_dns
();
/*
* Set the association between Seid and SM Context
* @param [const seid_t &] seid: SessionID
...
...
src/smf_app/smf_context.cpp
View file @
c5f759d4
This diff is collapsed.
Click to expand it.
src/smf_app/smf_context.hpp
View file @
c5f759d4
...
...
@@ -597,11 +597,11 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
amf_status_uri
=
{};
target_amf
=
{};
supi_prefix
=
{};
// Subscribe to
sm context status c
hange
// Subscribe to
SM Context Status C
hange
sm_context_status_connection
=
event_sub
.
subscribe_sm_context_status
(
boost
::
bind
(
&
smf_context
::
handle_sm_context_status_change
,
this
,
_1
,
_2
,
_3
));
// Subscribe to
pdu session r
elease (event exposure)
// Subscribe to
PDU Session R
elease (event exposure)
ee_pdu_session_release_connection
=
event_sub
.
subscribe_ee_pdu_session_release
(
boost
::
bind
(
&
smf_context
::
handle_ee_pdu_session_release
,
this
,
_1
,
_2
,
_3
));
...
...
@@ -1019,13 +1019,6 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
*/
supi_t
get_supi
()
const
;
/*
* Get the number of dnn contexts
* @param
* @return std::size_t: the number of contexts
*/
std
::
size_t
get_number_dnn_contexts
()
const
;
/*
* Get Supi prefix
* @param [const std::string &] prefix: Supi prefix (e.g., imsi)
...
...
@@ -1251,12 +1244,10 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
const
pdu_session_id_t
&
pdu_session_id
)
const
;
private:
// std::vector<std::shared_ptr<dnn_context>> dnns;
std
::
vector
<
std
::
shared_ptr
<
smf_procedure
>>
pending_procedures
;
// snssai-sst <-> session management subscription
std
::
map
<
uint8_t
,
std
::
shared_ptr
<
session_management_subscription
>>
dnn_subscriptions
;
std
::
map
<
pdu_session_id_t
,
std
::
shared_ptr
<
smf_pdu_session
>>
pdu_sessions
;
// Store all PDU Sessions associated with this UE
mutable
std
::
shared_mutex
m_pdu_sessions_mutex
;
...
...
@@ -1265,9 +1256,6 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
std
::
string
supi_prefix
;
plmn_t
plmn
;
// AMF IP addr
// string amf_addr;
std
::
string
amf_id
;
std
::
string
amf_addr
;
std
::
string
amf_status_uri
;
...
...
src/smf_app/smf_n1.cpp
View file @
c5f759d4
...
...
@@ -416,7 +416,6 @@ bool smf_n1::create_n1_pdu_session_modification_command(
// Get the SMF_PDU_Session
std
::
shared_ptr
<
smf_context
>
sc
=
{};
// std::shared_ptr<dnn_context> sd = {};
std
::
shared_ptr
<
smf_pdu_session
>
sp
=
{};
supi_t
supi
=
sm_context_res
.
get_supi
();
supi64_t
supi64
=
smf_supi_to_u64
(
supi
);
...
...
@@ -429,20 +428,6 @@ bool smf_n1::create_n1_pdu_session_modification_command(
"SMF context with SUPI "
SUPI_64_FMT
" does not exist!"
,
supi64
);
return
false
;
}
/*
bool find_dnn = sc.get()->find_dnn_context(
sm_context_res.get_snssai(), sm_context_res.get_dnn(), sd);
bool find_pdu = false;
if (find_dnn) {
find_pdu =
sd.get()->find_pdu_session(sm_context_res.get_pdu_session_id(), sp);
}
if (!find_dnn or !find_pdu) {
// error
Logger::smf_n1().warn("DNN or PDU session context does not exist!");
return false;
}
*/
if
(
!
sc
.
get
()
->
find_pdu_session
(
sm_context_res
.
get_pdu_session_id
(),
sp
))
{
// error
...
...
@@ -574,7 +559,6 @@ bool smf_n1::create_n1_pdu_session_modification_command(
// Get the SMF_PDU_Session
std
::
shared_ptr
<
smf_context
>
sc
=
{};
// std::shared_ptr<dnn_context> sd = {};
std
::
shared_ptr
<
smf_pdu_session
>
sp
=
{};
supi_t
supi
=
msg
.
get_supi
();
supi64_t
supi64
=
smf_supi_to_u64
(
supi
);
...
...
@@ -587,19 +571,6 @@ bool smf_n1::create_n1_pdu_session_modification_command(
"SMF context with SUPI "
SUPI_64_FMT
" does not exist!"
,
supi64
);
return
false
;
}
/*
bool find_dnn =
sc.get()->find_dnn_context(msg.get_snssai(), msg.get_dnn(), sd);
bool find_pdu = false;
if (find_dnn) {
find_pdu = sd.get()->find_pdu_session(msg.get_pdu_session_id(), sp);
}
if (!find_dnn or !find_pdu) {
// error
Logger::smf_n1().warn("DNN or PDU session context does not exist!");
return false;
}
*/
if
(
!
sc
.
get
()
->
find_pdu_session
(
msg
.
get_pdu_session_id
(),
sp
))
{
// error
...
...
src/smf_app/smf_procedure.cpp
View file @
c5f759d4
...
...
@@ -125,7 +125,7 @@ int session_create_sm_context_procedure::run(
PDU_SESSION_APPLICATION_ERROR_CONTEXT_NOT_FOUND
);
return
RETURNerror
;
}
if
(
sp
.
get
()
!=
nullptr
)
sp
.
get
()
->
set_upf_node_id
(
up_node_id
);
sp
.
get
()
->
set_upf_node_id
(
up_node_id
);
}
else
{
Logger
::
smf_app
().
warn
(
...
...
@@ -549,13 +549,9 @@ int session_update_sm_context_procedure::run(
std
::
shared_ptr
<
smf_pdu_session
>
sp
=
{};
if
(
!
sc
.
get
()
->
find_pdu_session
(
scf
.
get
()
->
pdu_session_id
,
sp
))
{
Logger
::
smf_app
().
warn
(
"PDU session context does not exist!"
);
}
if
(
sp
.
get
()
!=
nullptr
)
{
sp
.
get
()
->
get_upf_node_id
(
up_node_id
);
}
else
{
Logger
::
smf_app
().
warn
(
"PDU session context does not exist!"
);
return
RETURNerror
;
}
sp
.
get
()
->
get_upf_node_id
(
up_node_id
);
// TODO: UPF insertion in case of Handover
...
...
@@ -1421,14 +1417,11 @@ int session_release_sm_context_procedure::run(
std
::
shared_ptr
<
smf_pdu_session
>
sp
=
{};
if
(
!
sc
.
get
()
->
find_pdu_session
(
scf
.
get
()
->
pdu_session_id
,
sp
))
{
Logger
::
smf_app
().
warn
(
"PDU session context does not exist!"
);
}
if
(
sp
.
get
()
!=
nullptr
)
{
sp
.
get
()
->
get_upf_node_id
(
up_node_id
);
}
else
{
Logger
::
smf_app
().
warn
(
"PDU session context does not exist!"
);
return
RETURNerror
;
}
sp
.
get
()
->
get_upf_node_id
(
up_node_id
);
/* if (not pfcp_associations::get_instance().select_up_node(
up_node_id, NODE_SELECTION_CRITERIA_MIN_PFCP_SESSIONS)) {
sm_context_res->res.set_cause(
...
...
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