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
c4c3269b
Commit
c4c3269b
authored
Dec 13, 2023
by
liuyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync is successful
parent
6fbd0579
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
139 additions
and
72 deletions
+139
-72
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+1
-1
src/udp/cooudp.cpp
src/udp/cooudp.cpp
+4
-71
udo q
udo q
+134
-0
No files found.
src/smf_app/smf_context.cpp
View file @
c4c3269b
...
...
@@ -3893,7 +3893,6 @@ bool smf_context::add_pdu_session(
pdu_sessions
.
insert
(
std
::
pair
<
pdu_session_id_t
,
std
::
shared_ptr
<
smf_pdu_session
>>
(
psi
,
sp
));
lock
.
unlock
();
Logger
::
smf_app
().
debug
(
"PDU Session Id (%d) has been added successfully"
,
psi
);
return
true
;
...
...
@@ -5007,6 +5006,7 @@ void smf_context::send_pdu_session_create_response(
sc
.
get
()
->
find_pdu_session
(
resp
->
res
.
get_pdu_session_id
(),
sp
);
udpsmfcontext
[
"up_fseid"
]
=
sp
.
get
()
->
up_fseid
.
seid
;
udpsmfcontext
[
"seid"
]
=
sp
.
get
()
->
seid
;
udpsmfcontext
[
"ipv4_address"
]
=
inet_ntoa
(
sp
.
get
()
->
ipv4_address
);
UdpSend_smf
(
udpsmfcontext
,
"10.103.239.31"
,
20023
);
// json_data["smfcontext"] = udpsmfcontext.dump();
...
...
src/udp/cooudp.cpp
View file @
c4c3269b
...
...
@@ -177,6 +177,9 @@ int udp_server_coop::udp_read_from_peer_smf() {
smf_app_inst
->
set_supi_2_smf_context
(
supi64
,
sc
);
// sc.get()->set_plmn(smreq->req.get_plmn()); // PLMN
}
uint64_t
seid
=
smfcontext
[
"seid"
];
smf_app_inst
->
set_seid_2_smf_context
(
seid
,
sc
);
std
::
shared_ptr
<
smf_pdu_session
>
sp
=
{};
if
(
!
sc
.
get
()
->
find_pdu_session
(
scf
.
get
()
->
pdu_session_id
,
sp
))
{
...
...
@@ -212,7 +215,6 @@ int udp_server_coop::udp_read_from_peer_smf() {
sp
.
get
()
->
set_sessions_graph
(
graph
);
uint64_t
seid
=
smf_app_inst
->
generate_seid
();
sp
->
set_seid
(
seid
);
sp
->
up_fseid
.
seid
=
smfcontext
[
"up_fseid"
];
sp
->
ipv4
=
true
;
...
...
@@ -222,10 +224,6 @@ int udp_server_coop::udp_read_from_peer_smf() {
// 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
=
{};
...
...
@@ -252,10 +250,6 @@ int udp_server_coop::udp_read_from_peer_smf() {
flow
.
far_id_ul
.
first
=
true
;
sp
->
generate_pdr_id
(
flow
.
pdr_id_ul
);
smf_qos_flow
current_flow
{};
current_flow
=
flow
;
Logger
::
smf_app
().
warn
(
"----------liuyu-------start_asynch_dfs_procedure"
);
...
...
@@ -267,67 +261,6 @@ 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
);
// std::shared_ptr<pfcp_association> current_upf;
// std::vector<edge> dl_edges2;
// std::vector<edge> ul_edges2;
// std::shared_ptr<smf_session_procedure> ssp = {};
// // smf_procedure_code res = ssp.get()->get_current_upf(dl_edges2, ul_edges2, current_upf);
// edge dl_edge = dl_edges[0];
// // if (res != smf_procedure_code::OK) {
// // Logger::smf_app().error("----------liuyu-------smf_procedure_code");
// // }
// for (auto ul_edge : ul_edges) {
// //-------------------
// // IE CREATE_FAR
// //-------------------
// pfcp::create_far create_far = ssp.get()->pfcp_create_far(ul_edge, current_flow.qfi);
// // copy created FAR ID to DL edge for PDR
// ssp.get()->synch_ul_dl_edges(dl_edges, ul_edges, current_flow.qfi);
// // copy values from UL edge, so we simulate two downlink edges for PFCP
// auto flow = dl_edge.get_qos_flow(current_flow.qfi);
// flow->pdr_id_ul = 0;
// dl_edge.flow_description = ul_edge.flow_description;
// dl_edge.precedence = ul_edge.precedence;
// //-------------------
// // IE CREATE_PDR
// //-------------------
// pfcp::create_pdr create_pdr = ssp.get()->pfcp_create_pdr(
// dl_edge, current_flow.qfi, current_upf->function_features.second);
// ssp.get()->synch_ul_dl_edges(dl_edges, ul_edges, current_flow.qfi);
// ADD IEs to message
//-------------------
// n4_triggered->pfcp_ies.set(create_pdr);
// n4_triggered->pfcp_ies.set(create_far);
// if (smf_cfg.enable_dl_pdr_in_pfcp_sess_estab) {
// pfcp::create_far create_far_dl =
// pfcp_create_far(dl_edge, current_flow.qfi);
// pfcp::create_pdr create_pdr_dl =
// pfcp_create_pdr_dl(dl_edge, current_flow.qfi);
// n4_triggered->pfcp_ies.set(create_pdr_dl);
// n4_triggered->pfcp_ies.set(create_far_dl);
// }
// Handle PDR and FAR for downlink if thid feature is enabled
// if (smf_cfg.enable_dl_pdr_in_pfcp_sess_estab) {
// Logger::smf_app().info("Adding DL PDR and FAR start");
// }
// }
}
}
return
0
;
...
...
udo q
0 → 100644
View file @
c4c3269b
[1mdiff --git a/src/smf_app/smf_context.cpp b/src/smf_app/smf_context.cpp[m
[1mindex 3c90e544..9db1e689 100644[m
[1m--- a/src/smf_app/smf_context.cpp[m
[1m+++ b/src/smf_app/smf_context.cpp[m
[36m@@ -3893,7 +3893,6 @@[m [mbool smf_context::add_pdu_session([m
pdu_sessions.insert([m
std::pair<pdu_session_id_t, std::shared_ptr<smf_pdu_session>>([m
psi, sp));[m
[31m- lock.unlock();[m
Logger::smf_app().debug([m
"PDU Session Id (%d) has been added successfully", psi);[m
return true;[m
[36m@@ -5007,6 +5006,7 @@[m [mvoid smf_context::send_pdu_session_create_response([m
sc.get()->find_pdu_session(resp->res.get_pdu_session_id(), sp);[m
[m
udpsmfcontext["up_fseid"] = sp.get()->up_fseid.seid;[m
[32m+[m[32m udpsmfcontext["seid"] = sp.get()->seid;[m
udpsmfcontext["ipv4_address"] = inet_ntoa(sp.get()->ipv4_address);[m
UdpSend_smf(udpsmfcontext,"10.103.239.31", 20023);[m
// json_data["smfcontext"] = udpsmfcontext.dump();[m
[1mdiff --git a/src/udp/cooudp.cpp b/src/udp/cooudp.cpp[m
[1mindex 839d702a..161fceec 100644[m
[1m--- a/src/udp/cooudp.cpp[m
[1m+++ b/src/udp/cooudp.cpp[m
[36m@@ -177,6 +177,9 @@[m [mint udp_server_coop::udp_read_from_peer_smf() {[m
smf_app_inst->set_supi_2_smf_context(supi64, sc);[m
// sc.get()->set_plmn(smreq->req.get_plmn()); // PLMN[m
}[m
[32m+[m[32m uint64_t seid = smfcontext["seid"];[m
[32m+[m[32m smf_app_inst->set_seid_2_smf_context(seid, sc);[m
[32m+[m
[m
std::shared_ptr<smf_pdu_session> sp = {};[m
if (!sc.get()->find_pdu_session(scf.get()->pdu_session_id, sp)) {[m
[36m@@ -212,7 +215,6 @@[m [mint udp_server_coop::udp_read_from_peer_smf() {[m
sp.get()->set_sessions_graph(graph);[m
[m
[m
[31m- uint64_t seid = smf_app_inst->generate_seid();[m
sp->set_seid(seid);[m
sp->up_fseid.seid = smfcontext["up_fseid"];[m
sp->ipv4 = true;[m
[36m@@ -222,11 +224,7 @@[m [mint udp_server_coop::udp_read_from_peer_smf() {[m
[m
// sp->set_seid(smfcontext["seid"]);[m
// for finding procedure when receiving response[m
[31m- smf_app_inst->set_seid_2_smf_context(sp.get()->seid, sc);[m
[31m-[m
[31m-[m
[31m-[m
[31m-[m
[32m+[m[41m [m
subscribed_default_qos_t default_qos = {};[m
std::shared_ptr<session_management_subscription> ss = {};[m
sc->get_default_qos(snssai, dnn, default_qos);[m
[36m@@ -252,10 +250,6 @@[m [mint udp_server_coop::udp_read_from_peer_smf() {[m
flow.far_id_ul.first = true;[m
sp->generate_pdr_id(flow.pdr_id_ul);[m
[m
[31m-[m
[31m-[m
[31m-[m
[31m-[m
smf_qos_flow current_flow{};[m
current_flow = flow;[m
Logger::smf_app().warn("----------liuyu-------start_asynch_dfs_procedure");[m
[36m@@ -267,67 +261,6 @@[m [mint udp_server_coop::udp_read_from_peer_smf() {[m
Logger::smf_app().warn("----------liuyu-------dfs_next_upf");[m
graph->dfs_next_upf(dl_edges, ul_edges, upf);[m
[m
[31m- [m
[31m- [m
[31m-[m
[31m- // std::shared_ptr<pfcp_association> current_upf;[m
[31m- // std::vector<edge> dl_edges2;[m
[31m- // std::vector<edge> ul_edges2;[m
[31m- // std::shared_ptr<smf_session_procedure> ssp = {};[m
[31m- [m
[31m- // // smf_procedure_code res = ssp.get()->get_current_upf(dl_edges2, ul_edges2, current_upf);[m
[31m- // edge dl_edge = dl_edges[0];[m
[31m- // // if (res != smf_procedure_code::OK) {[m
[31m- // // Logger::smf_app().error("----------liuyu-------smf_procedure_code");[m
[31m- // // }[m
[31m- // for (auto ul_edge : ul_edges) {[m
[31m- // //-------------------[m
[31m- // // IE CREATE_FAR[m
[31m- // //-------------------[m
[31m- // pfcp::create_far create_far = ssp.get()->pfcp_create_far(ul_edge, current_flow.qfi);[m
[31m- // // copy created FAR ID to DL edge for PDR[m
[31m- // ssp.get()->synch_ul_dl_edges(dl_edges, ul_edges, current_flow.qfi);[m
[31m-[m
[31m- // // copy values from UL edge, so we simulate two downlink edges for PFCP[m
[31m- // auto flow = dl_edge.get_qos_flow(current_flow.qfi);[m
[31m- // flow->pdr_id_ul = 0;[m
[31m- // dl_edge.flow_description = ul_edge.flow_description;[m
[31m- // dl_edge.precedence = ul_edge.precedence;[m
[31m-[m
[31m- // //-------------------[m
[31m- // // IE CREATE_PDR[m
[31m- // //-------------------[m
[31m- // pfcp::create_pdr create_pdr = ssp.get()->pfcp_create_pdr([m
[31m- // dl_edge, current_flow.qfi, current_upf->function_features.second);[m
[31m- // ssp.get()->synch_ul_dl_edges(dl_edges, ul_edges, current_flow.qfi);[m
[31m-[m
[31m- // ADD IEs to message[m
[31m- //-------------------[m
[31m- // n4_triggered->pfcp_ies.set(create_pdr);[m
[31m- // n4_triggered->pfcp_ies.set(create_far);[m
[31m-[m
[31m- // if (smf_cfg.enable_dl_pdr_in_pfcp_sess_estab) {[m
[31m- // pfcp::create_far create_far_dl =[m
[31m- // pfcp_create_far(dl_edge, current_flow.qfi);[m
[31m- // pfcp::create_pdr create_pdr_dl =[m
[31m- // pfcp_create_pdr_dl(dl_edge, current_flow.qfi);[m
[31m- // n4_triggered->pfcp_ies.set(create_pdr_dl);[m
[31m- // n4_triggered->pfcp_ies.set(create_far_dl);[m
[31m- // }[m
[31m- // Handle PDR and FAR for downlink if thid feature is enabled[m
[31m- // if (smf_cfg.enable_dl_pdr_in_pfcp_sess_estab) {[m
[31m- // Logger::smf_app().info("Adding DL PDR and FAR start");[m
[31m- // }[m
[31m- // }[m
[31m- [m
[31m- [m
[31m- [m
[31m-[m
[31m- [m
[31m-[m
[31m-[m
[31m-[m
[31m-[m
}[m
}[m
return 0;[m
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