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
7b3d7b59
Commit
7b3d7b59
authored
Jan 07, 2022
by
kharade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added assoc_retry as ITTI task
parent
f6581cd4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
11 deletions
+30
-11
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+25
-11
src/smf_app/smf_app.hpp
src/smf_app/smf_app.hpp
+5
-0
No files found.
src/smf_app/smf_app.cpp
View file @
7b3d7b59
...
...
@@ -84,6 +84,25 @@ extern itti_mw* itti_inst;
void
smf_app_task
(
void
*
);
//------------------------------------------------------------------------------
void
trigger_upf_association_task
(
void
*
arg
)
{
upf_assoc_retry_t
upf_assoc_retry
=
*
(
upf_assoc_retry_t
*
)
arg
;
for
(
int
i
=
0
;
i
<
PFCP_ASSOC_RETRY_COUNT
;
i
++
)
{
smf_app_inst
->
start_upf_association
(
upf_assoc_retry
.
node_id
,
upf_assoc_retry
.
upf_nf_profile
);
sleep
(
PFCP_ASSOC_RESP_WAIT
);
std
::
shared_ptr
<
pfcp_association
>
sa
=
{};
if
(
not
pfcp_associations
::
get_instance
().
get_association
(
upf_assoc_retry
.
node_id
,
sa
))
Logger
::
smf_app
().
warn
(
"Failed to receive PFCP Association Response, Retrying "
".....!!"
);
else
break
;
}
return
;
}
//------------------------------------------------------------------------------
int
smf_app
::
apply_config
(
const
smf_config
&
cfg
)
{
Logger
::
smf_app
().
info
(
"Apply config..."
);
...
...
@@ -1425,17 +1444,12 @@ bool smf_app::handle_nf_status_notification(
smf_cfg
.
upfs
.
push_back
(
n
);
upf_profile
*
upf_node_profile
=
dynamic_cast
<
upf_profile
*>
(
profile
.
get
());
for
(
int
i
=
0
;
i
<
PFCP_ASSOC_RETRY_COUNT
;
i
++
)
{
start_upf_association
(
n
,
std
::
ref
(
*
upf_node_profile
));
sleep
(
PFCP_ASSOC_RESP_WAIT
);
std
::
shared_ptr
<
pfcp_association
>
sa
=
{};
if
(
not
pfcp_associations
::
get_instance
().
get_association
(
n
,
sa
))
Logger
::
smf_app
().
warn
(
"Failed to receive PFCP Association Response, Retrying "
".....!!"
);
else
break
;
}
// start_upf_association(n, std::ref(*upf_node_profile));
upf_assoc_retry_t
assoc_retry_param
;
assoc_retry_param
.
node_id
=
n
;
assoc_retry_param
.
upf_nf_profile
=
std
::
ref
(
*
upf_node_profile
);
itti_inst
->
create_task
(
TASK_SMF_N4
,
trigger_upf_association_task
,
&
assoc_retry_param
);
}
else
{
Logger
::
smf_app
().
debug
(
"No IP Addr/FQDN found"
);
return
false
;
...
...
src/smf_app/smf_app.hpp
View file @
7b3d7b59
...
...
@@ -72,6 +72,11 @@ typedef enum {
PDU_SESSION_RELEASE
=
3
}
pdu_session_procedure_t
;
typedef
struct
upf_assoc_retry_s
{
pfcp
::
node_id_t
node_id
;
upf_profile
upf_nf_profile
;
}
upf_assoc_retry_t
;
class
smf_config
;
class
smf_context_ref
{
...
...
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