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-Simple
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
CommunityXG
OpenXG-SMF-Simple
Commits
e3cd0205
Commit
e3cd0205
authored
Feb 22, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Select UPF node according to UPF profile
parent
75cf50e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+1
-1
src/smf_app/smf_pfcp_association.cpp
src/smf_app/smf_pfcp_association.cpp
+10
-2
No files found.
src/smf_app/smf_app.cpp
View file @
e3cd0205
...
...
@@ -403,7 +403,7 @@ void smf_app::start_upf_association(
std
::
time_t
time_epoch
=
std
::
time
(
nullptr
);
uint64_t
tv_ntp
=
time_epoch
+
SECONDS_SINCE_FIRST_EPOCH
;
pfcp_associations
::
get_instance
().
add_peer_candidate_node
(
node_id
);
pfcp_associations
::
get_instance
().
add_peer_candidate_node
(
node_id
,
profile
);
std
::
shared_ptr
<
itti_n4_association_setup_request
>
n4_asc
=
std
::
shared_ptr
<
itti_n4_association_setup_request
>
(
new
itti_n4_association_setup_request
(
TASK_SMF_APP
,
TASK_SMF_N4
));
...
...
src/smf_app/smf_pfcp_association.cpp
View file @
e3cd0205
...
...
@@ -100,7 +100,6 @@ bool pfcp_associations::add_association(
sa
=
std
::
shared_ptr
<
pfcp_association
>
(
association
);
sa
->
recovery_time_stamp
=
recovery_time_stamp
;
std
::
size_t
hash_node_id
=
std
::
hash
<
pfcp
::
node_id_t
>
{}(
node_id
);
// Associate with UPF profile if exist
for
(
std
::
vector
<
std
::
shared_ptr
<
pfcp_association
>>::
iterator
it
=
pending_associations
.
begin
();
...
...
@@ -111,7 +110,6 @@ bool pfcp_associations::add_association(
break
;
}
}
associations
.
insert
((
int32_t
)
hash_node_id
,
sa
);
trigger_heartbeat_request_procedure
(
sa
);
}
...
...
@@ -144,6 +142,16 @@ bool pfcp_associations::add_association(
sa
->
function_features
.
first
=
true
;
sa
->
function_features
.
second
=
function_features
;
std
::
size_t
hash_node_id
=
std
::
hash
<
pfcp
::
node_id_t
>
{}(
node_id
);
// Associate with UPF profile if exist
for
(
std
::
vector
<
std
::
shared_ptr
<
pfcp_association
>>::
iterator
it
=
pending_associations
.
begin
();
it
<
pending_associations
.
end
();
++
it
)
{
if
((
*
it
)
->
node_id
==
node_id
)
{
Logger
::
smf_app
().
info
(
"Associate with UPF profile"
);
sa
->
set_upf_node_profile
((
*
it
)
->
get_upf_node_profile
());
break
;
}
}
associations
.
insert
((
int32_t
)
hash_node_id
,
sa
);
trigger_heartbeat_request_procedure
(
sa
);
}
...
...
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