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
81cc3c93
Commit
81cc3c93
authored
Jun 20, 2022
by
Stefan Spettel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refact(smf): Added warning for unsupported features
Signed-off-by:
Stefan Spettel
<
stefan.spettel@eurecom.fr
>
parent
d54a2ecf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
28 deletions
+30
-28
src/smf_app/smf_config.cpp
src/smf_app/smf_config.cpp
+9
-3
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+21
-25
No files found.
src/smf_app/smf_config.cpp
View file @
81cc3c93
...
...
@@ -519,7 +519,10 @@ int smf_config::load(const string& config_file) {
support_features
.
lookupValue
(
SMF_CONFIG_STRING_SUPPORT_FEATURES_DISCOVER_PCF
,
opt
);
if
(
boost
::
iequals
(
opt
,
"yes"
))
{
discover_pcf
=
true
;
Logger
::
smf_app
().
warn
(
"Discover PCF feature is not supported, you need to configure the "
"PCF in the config file. This feature is set to false."
);
discover_pcf
=
false
;
// set to false as not yet supported
}
else
{
discover_pcf
=
false
;
}
...
...
@@ -527,8 +530,11 @@ int smf_config::load(const string& config_file) {
support_features
.
lookupValue
(
SMF_CONFIG_STRING_SUPPORT_FEATURES_USE_LOCAL_PCC_RULES
,
opt
);
if
(
boost
::
iequals
(
opt
,
"yes"
))
{
use_local_pcc_rules
=
true
;
discover_pcf
=
false
;
Logger
::
smf_app
().
warn
(
"Local PCC rules feature is not supported, you need to configure "
"and use the PCF. This feature is set to false"
);
use_local_pcc_rules
=
false
;
// set to false as not yet supported
// discover_pcf = false;
}
else
{
use_local_pcc_rules
=
false
;
}
...
...
src/smf_app/smf_context.cpp
View file @
81cc3c93
...
...
@@ -1511,31 +1511,27 @@ void smf_context::handle_pdu_session_create_sm_context_request(
std
::
string
smContextRef
=
std
::
to_string
(
smreq
->
scid
);
sp
.
get
()
->
policy_ptr
=
std
::
make_shared
<
n7
::
policy_association
>
();
bool
use_pcf_policy
=
false
;
if
(
!
smf_cfg
.
use_local_pcc_rules
)
{
sp
.
get
()
->
policy_ptr
->
set_context
(
smf_supi_to_string
(
smreq
->
req
.
get_supi
()),
smreq
->
req
.
get_dnn
(),
snssai
,
plmn
,
smreq
->
req
.
get_pdu_session_id
(),
smreq
->
req
.
get_pdu_session_type
());
// TODO what is the exact meaning of SCID? Is this unique per registration
// or unique per PDU session?
sp
.
get
()
->
policy_ptr
->
id
=
smreq
->
scid
;
n7
::
sm_policy_status_code
status
=
n7
::
smf_n7
::
get_instance
().
create_sm_policy_association
(
*
sp
->
policy_ptr
);
if
(
status
!=
n7
::
sm_policy_status_code
::
CREATED
)
{
Logger
::
smf_n7
().
info
(
"PCF SM Policy Association Creation was not successful. Continue "
"using default rules"
);
use_pcf_policy
=
false
;
// Here, the standard says that we could reject the PDU session or allow
// the PDU session applying local policies 29.512 Chapter 4.2.2.2
// TODO I propose to have this behavior configurable, for now we
// continue
}
else
{
use_pcf_policy
=
true
;
}
sp
.
get
()
->
policy_ptr
->
set_context
(
smf_supi_to_string
(
smreq
->
req
.
get_supi
()),
smreq
->
req
.
get_dnn
(),
snssai
,
plmn
,
smreq
->
req
.
get_pdu_session_id
(),
smreq
->
req
.
get_pdu_session_type
());
// TODO what is the exact meaning of SCID? Is this unique per registration
// or unique per PDU session?
sp
.
get
()
->
policy_ptr
->
id
=
smreq
->
scid
;
n7
::
sm_policy_status_code
status
=
n7
::
smf_n7
::
get_instance
().
create_sm_policy_association
(
*
sp
->
policy_ptr
);
if
(
status
!=
n7
::
sm_policy_status_code
::
CREATED
)
{
Logger
::
smf_n7
().
info
(
"PCF SM Policy Association Creation was not successful. Continue "
"using default rules"
);
use_pcf_policy
=
false
;
// Here, the standard says that we could reject the PDU session or allow
// the PDU session applying local policies 29.512 Chapter 4.2.2.2
// TODO I propose to have this behavior configurable, for now we
// continue
}
else
{
use_pcf_policy
=
true
;
}
// TODO use the PCC rules also for QoS and other policy information
...
...
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