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
0304b108
Commit
0304b108
authored
Dec 11, 2023
by
liuyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync context
parent
21a4a9a9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
14 deletions
+43
-14
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+19
-1
src/smf_app/smf_procedure.cpp
src/smf_app/smf_procedure.cpp
+10
-9
src/udp/cooudp.cpp
src/udp/cooudp.cpp
+14
-4
No files found.
src/smf_app/smf_context.cpp
View file @
0304b108
...
...
@@ -85,7 +85,7 @@ using namespace smf;
extern
itti_mw
*
itti_inst
;
extern
smf
::
smf_app
*
smf_app_inst
;
extern
smf
::
smf_config
smf_cfg
;
extern
void
UdpSend_smf
(
nlohmann
::
json
aggregation
,
string
ip
,
int
port
);
//------------------------------------------------------------------------------
void
smf_pdu_session
::
get_pdu_session_id
(
uint32_t
&
psi
)
const
{
psi
=
pdu_session_id
;
...
...
@@ -4991,6 +4991,24 @@ void smf_context::send_pdu_session_create_response(
// need this info for the moment
json_data
[
"pduSessionId"
]
=
resp
->
res
.
get_pdu_session_id
();
Logger
::
smf_app
().
info
(
"---------------liuyu--udpsend"
,
resp
->
scid
);
nlohmann
::
json
udpsmfcontext
;
udpsmfcontext
[
"scid"
]
=
resp
->
scid
;
udpsmfcontext
[
"supi"
]
=
smf_supi_to_string
(
resp
->
res
.
get_supi
());
udpsmfcontext
[
"pdu_session_id"
]
=
resp
->
res
.
get_pdu_session_id
();
udpsmfcontext
[
"dnn"
]
=
resp
->
res
.
get_dnn
();
udpsmfcontext
[
"snssai"
]
=
resp
->
res
.
get_snssai
().
toString
();
udpsmfcontext
[
"pdu_session_type"
]
=
0
;
supi64_t
supi64
=
smf_supi_to_u64
(
resp
->
res
.
get_supi
());
std
::
shared_ptr
<
smf_context
>
sc
=
{};
sc
=
smf_app_inst
->
supi_2_smf_context
(
supi64
);
std
::
shared_ptr
<
smf_pdu_session
>
sp
=
{};
sc
.
get
()
->
find_pdu_session
(
resp
->
res
.
get_pdu_session_id
(),
sp
);
udpsmfcontext
[
"seid"
]
=
sp
.
get
()
->
seid
;
UdpSend_smf
(
udpsmfcontext
,
"10.103.239.31"
,
20023
);
// json_data["smfcontext"] = udpsmfcontext.dump();
resp
->
res
.
set_json_data
(
json_data
);
// send ITTI message to APP to trigger N1N2MessageTransfer towards AMFs
...
...
src/smf_app/smf_procedure.cpp
View file @
0304b108
...
...
@@ -737,18 +737,18 @@ smf_procedure_code session_create_sm_context_procedure::run(
// Get next UPF for the first N4 session establishment
get_next_upf
(
dl_edges
,
ul_edges
,
upf
);
Logger
::
smf_app
().
info
(
"-----------------udpsend"
,
sm_context_req
->
scid
);
nlohmann
::
json
udpsmfcontext
;
udpsmfcontext
[
"scid"
]
=
sm_context_req
->
scid
;
udpsmfcontext
[
"supi"
]
=
smf_supi_to_string
(
scf
.
get
()
->
supi
);
udpsmfcontext
[
"pdu_session_id"
]
=
scf
.
get
()
->
pdu_session_id
;
udpsmfcontext
[
"dnn"
]
=
dnn
;
udpsmfcontext
[
"snssai"
]
=
snssai
.
toString
();
udpsmfcontext
[
"pdu_session_type"
]
=
sm_context_req
->
req
.
get_pdu_session_type
();
//
Logger::smf_app().info("-----------------udpsend",sm_context_req->scid);
//
nlohmann::json udpsmfcontext;
//
udpsmfcontext["scid"] = sm_context_req->scid;
//
udpsmfcontext["supi"] = smf_supi_to_string(scf.get()->supi);
//
udpsmfcontext["pdu_session_id"] = scf.get()->pdu_session_id;
//
udpsmfcontext["dnn"] = dnn;
//
udpsmfcontext["snssai"] = snssai.toString();
//
udpsmfcontext["pdu_session_type"] = sm_context_req->req.get_pdu_session_type();
UdpSend_smf
(
udpsmfcontext
,
"10.103.239.31"
,
20023
);
//
UdpSend_smf(udpsmfcontext,"10.103.239.31", 20023);
return
send_n4_session_establishment_request
();
...
...
@@ -788,6 +788,7 @@ smf_procedure_code session_create_sm_context_procedure::handle_itti_msg(
if
(
smf_cfg
.
enable_dl_pdr_in_pfcp_sess_estab
&&
resp
.
pfcp_ies
.
created_pdrs
.
empty
())
{
pfcp
::
pdr_id_t
pdr_id_tmp
;
Logger
::
smf_app
().
info
(
"liuyu22222222)"
);
// we use qos flow for 1st PDR for the moment
// TODO: remove this hardcoding of qos flow
pdr_id_tmp
.
rule_id
=
1
;
...
...
src/udp/cooudp.cpp
View file @
0304b108
...
...
@@ -205,9 +205,20 @@ int udp_server_coop::udp_read_from_peer_smf() {
sc
.
get
()
->
insert_dnn_subscription
(
snssai
,
dnn
,
subscription
);
}
sp
.
get
()
->
set_dnn
(
dnn
);
sp
.
get
()
->
set_snssai
(
snssai
);
std
::
shared_ptr
<
upf_graph
>
graph
=
{};
graph
=
pfcp_associations
::
get_instance
().
select_up_node
(
snssai
,
dnn
);
sp
.
get
()
->
set_sessions_graph
(
graph
);
sp
->
set_seid
(
smfcontext
[
"seid"
]);
// for finding procedure when receiving response
smf_app_inst
->
set_seid_2_smf_context
(
sp
.
get
()
->
seid
,
sc
);
subscribed_default_qos_t
default_qos
=
{};
std
::
shared_ptr
<
session_management_subscription
>
ss
=
{};
...
...
@@ -241,9 +252,8 @@ int udp_server_coop::udp_read_from_peer_smf() {
Logger
::
smf_app
().
warn
(
"----------liuyu-------dfs_next_upf"
);
graph
->
dfs_next_upf
(
dl_edges
,
ul_edges
,
upf
);
sp
.
get
()
->
set_dnn
(
dnn
);
sp
.
get
()
->
set_snssai
(
snssai
);
sp
.
get
()
->
set_sessions_graph
(
graph
);
// std::shared_ptr<pfcp_association> current_upf;
// std::vector<edge> dl_edges2;
...
...
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