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
ca1b91c0
Commit
ca1b91c0
authored
Dec 19, 2023
by
liuyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
concourrence is ok
parent
c4c3269b
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
414 additions
and
10 deletions
+414
-10
smf.log
smf.log
+393
-0
src/common/smf.h
src/common/smf.h
+2
-2
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+2
-2
src/smf_app/smf_context.hpp
src/smf_app/smf_context.hpp
+0
-1
src/udp/cooudp.cpp
src/udp/cooudp.cpp
+17
-5
No files found.
smf.log
0 → 100644
View file @
ca1b91c0
This diff is collapsed.
Click to expand it.
src/common/smf.h
View file @
ca1b91c0
...
...
@@ -288,7 +288,7 @@ typedef struct qos_profile_s {
#define NNRF_NF_STATUS_NOTIFY_BASE "/nsmf-nfstatus-notify/"
// for CURL
#define NF_CURL_TIMEOUT_MS 100L
#define NF_CURL_TIMEOUT_MS 100
0
L
#define MAX_WAIT_MSECS 10000 // 1 second
#define AMF_NUMBER_RETRIES 3
#define UDM_NUMBER_RETRIES 3
...
...
@@ -298,7 +298,7 @@ constexpr auto CURL_MIME_BOUNDARY = "----Boundary";
#define BUF_LEN 512
// FOR FUTURE PROMISE
#define FUTURE_STATUS_TIMEOUT_MS 100
#define FUTURE_STATUS_TIMEOUT_MS 100
0
// for PFCP
constexpr
uint64_t
SECONDS_SINCE_FIRST_EPOCH
=
2208988800
;
...
...
src/smf_app/smf_context.cpp
View file @
ca1b91c0
...
...
@@ -3850,13 +3850,13 @@ bool smf_context::find_pdu_session(
const
pdu_session_id_t
&
psi
,
std
::
shared_ptr
<
smf_pdu_session
>&
sp
)
const
{
Logger
::
smf_app
().
info
(
"Find PDU Session with ID %d"
,
psi
);
std
::
shared_lock
lock
(
m_pdu_sessions_mutex
);
Logger
::
smf_app
().
warn
(
"---liuyu----pdu_sessions.count %d------------"
,
pdu_sessions
.
count
(
psi
));
if
(
pdu_sessions
.
count
(
psi
)
>
0
)
{
sp
=
pdu_sessions
.
at
(
psi
);
if
(
sp
)
return
true
;
}
return
false
;
}
//-----------------------------------------------------------------------------
bool
smf_context
::
find_pdu_session
(
const
pfcp
::
pdr_id_t
&
pdr_id
,
pfcp
::
qfi_t
&
qfi
,
...
...
@@ -3893,6 +3893,7 @@ bool smf_context::add_pdu_session(
pdu_sessions
.
insert
(
std
::
pair
<
pdu_session_id_t
,
std
::
shared_ptr
<
smf_pdu_session
>>
(
psi
,
sp
));
Logger
::
smf_app
().
debug
(
"PDU Session Id (%d) has been added successfully"
,
psi
);
return
true
;
...
...
@@ -5009,7 +5010,6 @@ void smf_context::send_pdu_session_create_response(
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();
resp
->
res
.
set_json_data
(
json_data
);
...
...
src/smf_app/smf_context.hpp
View file @
ca1b91c0
...
...
@@ -59,7 +59,6 @@ extern "C" {
}
using
namespace
boost
::
placeholders
;
namespace
smf
{
class
smf_pdu_session
:
public
std
::
enable_shared_from_this
<
smf_pdu_session
>
{
...
...
src/udp/cooudp.cpp
View file @
ca1b91c0
...
...
@@ -166,8 +166,13 @@ int udp_server_coop::udp_read_from_peer_smf() {
scf
.
get
()
->
pdu_session_id
=
smfcontext
[
"pdu_session_id"
];
smf_app_inst
->
set_scid_2_smf_context
(
scid
,
scf
);
}
else
{
scf
=
smf_app_inst
->
scid_2_smf_context
(
scid
);
}
supi64_t
supi64
=
smf_supi_to_u64
(
supi
);
uint64_t
seid
=
smfcontext
[
"seid"
];
std
::
shared_ptr
<
smf_context
>
sc
=
{};
if
(
!
smf_app_inst
->
is_supi_2_smf_context
(
supi64
))
{
Logger
::
smf_app
().
debug
(
"Create a new SMF context with SUPI "
SUPI_64_FMT
""
,
supi64
);
...
...
@@ -176,10 +181,14 @@ int udp_server_coop::udp_read_from_peer_smf() {
// sc.get()->set_supi_prefix(supi_prefix);
smf_app_inst
->
set_supi_2_smf_context
(
supi64
,
sc
);
// sc.get()->set_plmn(smreq->req.get_plmn()); // PLMN
smf_app_inst
->
set_seid_2_smf_context
(
seid
,
sc
);
}
uint64_t
seid
=
smfcontext
[
"seid"
];
smf_app_inst
->
set_seid_2_smf_context
(
seid
,
sc
);
else
{
sc
=
smf_app_inst
->
supi_2_smf_context
(
supi64
);
}
std
::
shared_ptr
<
smf_pdu_session
>
sp
=
{};
if
(
!
sc
.
get
()
->
find_pdu_session
(
scf
.
get
()
->
pdu_session_id
,
sp
))
{
...
...
@@ -187,7 +196,7 @@ int udp_server_coop::udp_read_from_peer_smf() {
sp
=
std
::
shared_ptr
<
smf_pdu_session
>
(
new
smf_pdu_session
(
scf
.
get
()
->
pdu_session_id
));
sp
.
get
()
->
pdu_session_type
.
pdu_session_type
=
smfcontext
[
"pdu_session_type"
];
sc
.
get
()
->
add_pdu_session
(
scf
.
get
()
->
pdu_session_id
,
sp
);
}
std
::
string
dnn
=
smfcontext
[
"dnn"
];
snssai_t
snssai
=
{};
...
...
@@ -260,7 +269,10 @@ int udp_server_coop::udp_read_from_peer_smf() {
// Get next UPF for the first N4 session establishment
Logger
::
smf_app
().
warn
(
"----------liuyu-------dfs_next_upf"
);
graph
->
dfs_next_upf
(
dl_edges
,
ul_edges
,
upf
);
}
else
{
Logger
::
smf_app
().
warn
(
"Could not retrieve the corresponding SMF PDU Session context!"
);
}
}
}
return
0
;
...
...
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