Commit 259a1e2b authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Merge branch 'nssai_check_fix' into 'develop'

Fix NSSAI check during UPF selection

See merge request oai/cn5g/oai-cn5g-smf!128
parents 2de278f9 6d0a5f25
...@@ -114,13 +114,13 @@ SMF = ...@@ -114,13 +114,13 @@ SMF =
{ {
SESSION_MANAGEMENT_SUBSCRIPTION_LIST = ( SESSION_MANAGEMENT_SUBSCRIPTION_LIST = (
{ NSSAI_SST = @NSSAI_SST0@, NSSAI_SD = "@NSSAI_SD0@", DNN = "@DNN_NI0@", DEFAULT_SESSION_TYPE = "@TYPE0@", DEFAULT_SSC_MODE = 1, { NSSAI_SST = @NSSAI_SST0@, NSSAI_SD = "@NSSAI_SD0@", DNN = "@DNN_NI0@", DEFAULT_SESSION_TYPE = "@TYPE0@", DEFAULT_SSC_MODE = 1,
QOS_PROFILE_5QI = 6, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT", QOS_PROFILE_5QI = @QOS_PROFILE_5QI0@, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "@SESSION_AMBR_UL0@", SESSION_AMBR_DL = "@SESSION_AMBR_DL0@"}, QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "@SESSION_AMBR_UL0@", SESSION_AMBR_DL = "@SESSION_AMBR_DL0@"},
{ NSSAI_SST = @NSSAI_SST1@; NSSAI_SD = "@NSSAI_SD1@", DNN = "@DNN_NI1@", DEFAULT_SESSION_TYPE = "@TYPE1@", DEFAULT_SSC_MODE = 1, { NSSAI_SST = @NSSAI_SST1@; NSSAI_SD = "@NSSAI_SD1@", DNN = "@DNN_NI1@", DEFAULT_SESSION_TYPE = "@TYPE1@", DEFAULT_SSC_MODE = 1,
QOS_PROFILE_5QI = 7, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT", QOS_PROFILE_5QI = @QOS_PROFILE_5QI1@, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "@SESSION_AMBR_UL1@", SESSION_AMBR_DL = "@SESSION_AMBR_DL1@"}, QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "@SESSION_AMBR_UL1@", SESSION_AMBR_DL = "@SESSION_AMBR_DL1@"},
{ NSSAI_SST = @NSSAI_SST2@; NSSAI_SD = "@NSSAI_SD2@", DNN = "@DNN_NI2@", DEFAULT_SESSION_TYPE = "@TYPE2@", DEFAULT_SSC_MODE = 1, { NSSAI_SST = @NSSAI_SST2@; NSSAI_SD = "@NSSAI_SD2@", DNN = "@DNN_NI2@", DEFAULT_SESSION_TYPE = "@TYPE2@", DEFAULT_SSC_MODE = 1,
QOS_PROFILE_5QI = 8, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT", QOS_PROFILE_5QI = @QOS_PROFILE_5QI2@, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "@SESSION_AMBR_UL2@", SESSION_AMBR_DL = "@SESSION_AMBR_DL2@"} QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "@SESSION_AMBR_UL2@", SESSION_AMBR_DL = "@SESSION_AMBR_DL2@"}
); );
}; };
......
...@@ -17,6 +17,9 @@ NSSAI_SST1=${NSSAI_SST1:-1} ...@@ -17,6 +17,9 @@ NSSAI_SST1=${NSSAI_SST1:-1}
NSSAI_SD1=${NSSAI_SD1:-1} NSSAI_SD1=${NSSAI_SD1:-1}
NSSAI_SST2=${NSSAI_SST2:-1} NSSAI_SST2=${NSSAI_SST2:-1}
NSSAI_SD2=${NSSAI_SD2:-1} NSSAI_SD2=${NSSAI_SD2:-1}
QOS_PROFILE_5QI0=${QOS_PROFILE_5QI0:-6}
QOS_PROFILE_5QI1=${QOS_PROFILE_5QI1:-7}
QOS_PROFILE_5QI2=${QOS_PROFILE_5QI2:-8}
SESSION_AMBR_UL0=${SESSION_AMBR_UL0:-20Mbps} SESSION_AMBR_UL0=${SESSION_AMBR_UL0:-20Mbps}
SESSION_AMBR_DL0=${SESSION_AMBR_DL0:-22Mbps} SESSION_AMBR_DL0=${SESSION_AMBR_DL0:-22Mbps}
SESSION_AMBR_UL1=${SESSION_AMBR_UL1:-20Mbps} SESSION_AMBR_UL1=${SESSION_AMBR_UL1:-20Mbps}
......
...@@ -32,6 +32,8 @@ typedef uint64_t supi64_t; ...@@ -32,6 +32,8 @@ typedef uint64_t supi64_t;
#define SUPI_DIGITS_MAX 15 #define SUPI_DIGITS_MAX 15
const uint8_t SST_MAX_STANDARDIZED_VALUE = 127;
typedef struct { typedef struct {
uint32_t length; uint32_t length;
char data[SUPI_DIGITS_MAX + 1]; char data[SUPI_DIGITS_MAX + 1];
......
...@@ -467,15 +467,19 @@ bool pfcp_associations::select_up_node( ...@@ -467,15 +467,19 @@ bool pfcp_associations::select_up_node(
Logger::smf_app().debug("UPF info: %s", upf_info.to_string().c_str()); Logger::smf_app().debug("UPF info: %s", upf_info.to_string().c_str());
for (auto ui : upf_info.snssai_upf_info_list) { for (auto ui : upf_info.snssai_upf_info_list) {
if (ui.snssai == snssai) { if (ui.snssai.sST == snssai.sST) {
for (auto d : ui.dnn_upf_info_list) { if ((ui.snssai.sST <= SST_MAX_STANDARDIZED_VALUE) or
if (d.dnn.compare(dnn) == 0) { (snssai.sD.compare(ui.snssai.sD) == 0)) {
node_id = it->second->node_id; for (auto d : ui.dnn_upf_info_list) {
Logger::smf_app().info( if (d.dnn.compare(dnn) == 0) {
"Select the UPF for the corresponding DNN %s, NSSSAI (SD: %s, " node_id = it->second->node_id;
"SST: %d) ", Logger::smf_app().info(
d.dnn.c_str(), snssai.sD.c_str(), snssai.sST); "Select the UPF for the corresponding DNN %s, NSSSAI (SD: "
return true; "%s, "
"SST: %d) ",
d.dnn.c_str(), snssai.sD.c_str(), snssai.sST);
return true;
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment