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-Simple
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
CommunityXG
OpenXG-SMF-Simple
Commits
79655dbd
Commit
79655dbd
authored
Mar 26, 2019
by
gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prepare handling of SPGW-U Failure in PGW-C 3GPP TS 23.007 (17.1A.4 PGW-U Failure)
parent
6a68aff2
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
912 additions
and
15 deletions
+912
-15
src/oai_spgwc/CMakeLists.txt
src/oai_spgwc/CMakeLists.txt
+4
-4
src/pgwc/pgw_pfcp_association.cpp
src/pgwc/pgw_pfcp_association.cpp
+257
-0
src/pgwc/pgw_pfcp_association.hpp
src/pgwc/pgw_pfcp_association.hpp
+144
-0
src/pgwc/pgwc_sxab.cpp
src/pgwc/pgwc_sxab.cpp
+492
-0
src/spgwu/spgwu_pfcp_association.cpp
src/spgwu/spgwu_pfcp_association.cpp
+2
-2
src/spgwu/spgwu_pfcp_association.hpp
src/spgwu/spgwu_pfcp_association.hpp
+11
-7
src/spgwu/spgwu_sx.hpp
src/spgwu/spgwu_sx.hpp
+2
-2
No files found.
src/oai_spgwc/CMakeLists.txt
View file @
79655dbd
...
...
@@ -310,5 +310,5 @@ if(${SGW_AUTOTEST})
SET
(
GTPV1U_LIB GTPV1U
)
endif
(
${
SGW_AUTOTEST
}
)
target_link_libraries
(
spgwc
${
ASAN
}
-Wl,--start-group CN_UTILS SGWC PGWC
${
GTPV1U_LIB
}
GTPV2C PFCP 3GPP_COMMON_TYPES -Wl,--end-group pthread m rt config++ event boost_system
)
target_link_libraries
(
spgwc
${
ASAN
}
-Wl,--start-group CN_UTILS SGWC PGWC
${
GTPV1U_LIB
}
GTPV2C PFCP 3GPP_COMMON_TYPES
gflags glog dl double-conversion folly
-Wl,--end-group pthread m rt config++ event boost_system
)
src/pgwc/pgw_pfcp_association.cpp
0 → 100644
View file @
79655dbd
This diff is collapsed.
Click to expand it.
src/pgwc/pgw_pfcp_association.hpp
0 → 100644
View file @
79655dbd
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file pgw_pfcp_association.hpp
\author Lionel GAUTHIER
\date 2019
\email: lionel.gauthier@eurecom.fr
*/
#ifndef FILE_PGW_PFCP_ASSOCIATION_HPP_SEEN
#define FILE_PGW_PFCP_ASSOCIATION_HPP_SEEN
#include "3gpp_29.244.h"
#include "itti.hpp"
#include <folly/AtomicHashMap.h>
#include <vector>
namespace
oai
::
cn
::
nf
::
pgwc
{
#define PFCP_ASSOCIATION_HEARTBEAT_INTERVAL_SEC 10
#define PFCP_ASSOCIATION_HEARTBEAT_MAX_RETRIES 2
class
pfcp_association
{
public:
oai
::
cn
::
core
::
pfcp
::
node_id_t
node_id
;
std
::
size_t
hash_node_id
;
oai
::
cn
::
core
::
pfcp
::
recovery_time_stamp_t
recovery_time_stamp
;
std
::
pair
<
bool
,
oai
::
cn
::
core
::
pfcp
::
up_function_features_s
>
function_features
;
//
mutable
std
::
mutex
m_sessions
;
std
::
set
<
oai
::
cn
::
core
::
pfcp
::
fseid_t
>
sessions
;
//
oai
::
cn
::
core
::
itti
::
timer_id_t
timer_heartbeat
;
int
num_retries_timer_heartbeat
;
uint64_t
trxn_id_heartbeat
;
oai
::
cn
::
core
::
itti
::
timer_id_t
timer_association
;
explicit
pfcp_association
(
const
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
)
:
node_id
(
node_id
),
recovery_time_stamp
(),
function_features
(),
m_sessions
(),
sessions
()
{
hash_node_id
=
std
::
hash
<
oai
::
cn
::
core
::
pfcp
::
node_id_t
>
{}(
node_id
);
timer_heartbeat
=
ITTI_INVALID_TIMER_ID
;
num_retries_timer_heartbeat
=
0
;
trxn_id_heartbeat
=
0
;
}
pfcp_association
(
const
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
,
oai
::
cn
::
core
::
pfcp
::
recovery_time_stamp_t
&
recovery_time_stamp
)
:
node_id
(
node_id
),
recovery_time_stamp
(
recovery_time_stamp
),
function_features
(),
m_sessions
(),
sessions
()
{
hash_node_id
=
std
::
hash
<
oai
::
cn
::
core
::
pfcp
::
node_id_t
>
{}(
node_id
);
timer_heartbeat
=
ITTI_INVALID_TIMER_ID
;
num_retries_timer_heartbeat
=
0
;
trxn_id_heartbeat
=
0
;
}
pfcp_association
(
const
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
ni
,
oai
::
cn
::
core
::
pfcp
::
recovery_time_stamp_t
&
rts
,
oai
::
cn
::
core
::
pfcp
::
up_function_features_s
&
uff
)
:
node_id
(
ni
),
recovery_time_stamp
(
rts
),
m_sessions
(),
sessions
()
{
hash_node_id
=
std
::
hash
<
oai
::
cn
::
core
::
pfcp
::
node_id_t
>
{}(
node_id
);
function_features
.
first
=
true
;
function_features
.
second
=
uff
;
timer_heartbeat
=
ITTI_INVALID_TIMER_ID
;
num_retries_timer_heartbeat
=
0
;
trxn_id_heartbeat
=
0
;
timer_association
=
{};
}
pfcp_association
(
pfcp_association
const
&
p
)
:
node_id
(
p
.
node_id
),
hash_node_id
(
p
.
hash_node_id
),
recovery_time_stamp
(
p
.
recovery_time_stamp
),
function_features
(
p
.
function_features
),
timer_heartbeat
(
p
.
timer_heartbeat
),
num_retries_timer_heartbeat
(
p
.
num_retries_timer_heartbeat
),
trxn_id_heartbeat
(
p
.
trxn_id_heartbeat
),
timer_association
(
0
)
{}
void
notify_add_session
(
const
oai
::
cn
::
core
::
pfcp
::
fseid_t
&
cp_fseid
);
bool
has_session
(
const
oai
::
cn
::
core
::
pfcp
::
fseid_t
&
cp_fseid
);
void
notify_del_session
(
const
oai
::
cn
::
core
::
pfcp
::
fseid_t
&
cp_fseid
);
//void del_sessions();
void
restore_sx_sessions
();
void
set
(
const
oai
::
cn
::
core
::
pfcp
::
up_function_features_s
&
ff
)
{
function_features
.
first
=
true
;
function_features
.
second
=
ff
;};
};
enum
node_selection_criteria_e
{
NODE_SELECTION_CRITERIA_BEST_MAX_HEARBEAT_RTT
=
0
,
NODE_SELECTION_CRITERIA_MIN_PFCP_SESSIONS
=
1
,
NODE_SELECTION_CRITERIA_MIN_UP_TIME
=
2
,
NODE_SELECTION_CRITERIA_MAX_AVAILABLE_BW
=
3
,
NODE_SELECTION_CRITERIA_NONE
=
4
};
#define PFCP_MAX_ASSOCIATIONS 16
class
pfcp_associations
{
private:
std
::
vector
<
std
::
shared_ptr
<
pfcp_association
>>
pending_associations
;
folly
::
AtomicHashMap
<
int32_t
,
std
::
shared_ptr
<
pfcp_association
>>
associations
;
pfcp_associations
()
:
associations
(
PFCP_MAX_ASSOCIATIONS
),
pending_associations
()
{};
void
trigger_heartbeat_request_procedure
(
std
::
shared_ptr
<
pfcp_association
>&
s
);
public:
static
pfcp_associations
&
get_instance
()
{
static
pfcp_associations
instance
;
return
instance
;
}
pfcp_associations
(
pfcp_associations
const
&
)
=
delete
;
void
operator
=
(
pfcp_associations
const
&
)
=
delete
;
bool
add_association
(
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
,
oai
::
cn
::
core
::
pfcp
::
recovery_time_stamp_t
&
recovery_time_stamp
,
bool
&
restore_sx_sessions
);
bool
add_association
(
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
,
oai
::
cn
::
core
::
pfcp
::
recovery_time_stamp_t
&
recovery_time_stamp
,
oai
::
cn
::
core
::
pfcp
::
up_function_features_s
&
function_features
,
bool
&
restore_sx_sessions
);
bool
get_association
(
const
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
,
std
::
shared_ptr
<
pfcp_association
>&
sa
)
const
;
bool
get_association
(
const
oai
::
cn
::
core
::
pfcp
::
fseid_t
&
cp_fseid
,
std
::
shared_ptr
<
pfcp_association
>&
sa
)
const
;
void
notify_add_session
(
const
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
,
const
oai
::
cn
::
core
::
pfcp
::
fseid_t
&
cp_fseid
);
void
notify_del_session
(
const
oai
::
cn
::
core
::
pfcp
::
fseid_t
&
cp_fseid
);
void
restore_sx_sessions
(
const
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
);
void
initiate_heartbeat_request
(
oai
::
cn
::
core
::
itti
::
timer_id_t
timer_id
,
uint64_t
arg2_user
);
void
timeout_heartbeat_request
(
oai
::
cn
::
core
::
itti
::
timer_id_t
timer_id
,
uint64_t
arg2_user
);
void
handle_receive_heartbeat_response
(
const
uint64_t
trxn_id
);
bool
select_up_node
(
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
,
const
int
node_selection_criteria
);
};
}
#endif
/* FILE_PGW_PFCP_ASSOCIATION_HPP_SEEN */
src/pgwc/pgwc_sxab.cpp
0 → 100644
View file @
79655dbd
This diff is collapsed.
Click to expand it.
src/spgwu/spgwu_pfcp_association.cpp
View file @
79655dbd
...
...
@@ -87,7 +87,7 @@ bool pfcp_associations::add_association(oai::cn::core::pfcp::node_id_t& node_id,
return
false
;
}
//------------------------------------------------------------------------------
bool
pfcp_associations
::
add_association
(
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
,
oai
::
cn
::
core
::
pfcp
::
recovery_time_stamp_t
&
recovery_time_stamp
,
oai
::
cn
::
core
::
pfcp
::
cp_function_features_
t
&
bool
pfcp_associations
::
add_association
(
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
,
oai
::
cn
::
core
::
pfcp
::
recovery_time_stamp_t
&
recovery_time_stamp
,
oai
::
cn
::
core
::
pfcp
::
cp_function_features_
s
&
function_features
)
{
std
::
shared_ptr
<
pfcp_association
>
sa
=
{};
...
...
src/spgwu/spgwu_pfcp_association.hpp
View file @
79655dbd
...
...
@@ -44,7 +44,7 @@ namespace oai::cn::nf::spgwu {
oai
::
cn
::
core
::
pfcp
::
node_id_t
node_id
;
std
::
size_t
hash_node_id
;
oai
::
cn
::
core
::
pfcp
::
recovery_time_stamp_t
recovery_time_stamp
;
std
::
pair
<
bool
,
oai
::
cn
::
core
::
pfcp
::
cp_function_features_
t
>
function_features
;
std
::
pair
<
bool
,
oai
::
cn
::
core
::
pfcp
::
cp_function_features_
s
>
function_features
;
//
mutable
std
::
mutex
m_sessions
;
std
::
set
<
oai
::
cn
::
core
::
pfcp
::
fseid_t
>
sessions
;
...
...
@@ -69,7 +69,7 @@ namespace oai::cn::nf::spgwu {
num_retries_timer_heartbeat
=
0
;
trxn_id_heartbeat
=
0
;
}
pfcp_association
(
const
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
ni
,
oai
::
cn
::
core
::
pfcp
::
recovery_time_stamp_t
&
rts
,
oai
::
cn
::
core
::
pfcp
::
cp_function_features_
t
&
uff
)
:
pfcp_association
(
const
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
ni
,
oai
::
cn
::
core
::
pfcp
::
recovery_time_stamp_t
&
rts
,
oai
::
cn
::
core
::
pfcp
::
cp_function_features_
s
&
uff
)
:
node_id
(
ni
),
recovery_time_stamp
(
rts
),
m_sessions
(),
sessions
()
{
hash_node_id
=
std
::
hash
<
oai
::
cn
::
core
::
pfcp
::
node_id_t
>
{}(
node_id
);
function_features
.
first
=
true
;
...
...
@@ -77,6 +77,7 @@ namespace oai::cn::nf::spgwu {
timer_heartbeat
=
ITTI_INVALID_TIMER_ID
;
num_retries_timer_heartbeat
=
0
;
trxn_id_heartbeat
=
0
;
timer_association
=
{};
}
// pfcp_association(pfcp_association const & p)
// {
...
...
@@ -94,7 +95,7 @@ namespace oai::cn::nf::spgwu {
bool
has_session
(
const
oai
::
cn
::
core
::
pfcp
::
fseid_t
&
cp_fseid
);
void
notify_del_session
(
const
oai
::
cn
::
core
::
pfcp
::
fseid_t
&
cp_fseid
);
void
del_sessions
();
void
set
(
const
oai
::
cn
::
core
::
pfcp
::
cp_function_features_
t
&
ff
)
{
function_features
.
first
=
true
;
function_features
.
second
=
ff
;};
void
set
(
const
oai
::
cn
::
core
::
pfcp
::
cp_function_features_
s
&
ff
)
{
function_features
.
first
=
true
;
function_features
.
second
=
ff
;};
};
#define PFCP_MAX_ASSOCIATIONS 16
...
...
@@ -119,7 +120,7 @@ namespace oai::cn::nf::spgwu {
void
operator
=
(
pfcp_associations
const
&
)
=
delete
;
bool
add_association
(
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
,
oai
::
cn
::
core
::
pfcp
::
recovery_time_stamp_t
&
recovery_time_stamp
);
bool
add_association
(
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
,
oai
::
cn
::
core
::
pfcp
::
recovery_time_stamp_t
&
recovery_time_stamp
,
oai
::
cn
::
core
::
pfcp
::
cp_function_features_
t
&
function_features
);
bool
add_association
(
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
,
oai
::
cn
::
core
::
pfcp
::
recovery_time_stamp_t
&
recovery_time_stamp
,
oai
::
cn
::
core
::
pfcp
::
cp_function_features_
s
&
function_features
);
bool
get_association
(
const
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
,
std
::
shared_ptr
<
pfcp_association
>&
sa
)
const
;
bool
get_association
(
const
oai
::
cn
::
core
::
pfcp
::
fseid_t
&
cp_fseid
,
std
::
shared_ptr
<
pfcp_association
>&
sa
)
const
;
...
...
@@ -127,6 +128,9 @@ namespace oai::cn::nf::spgwu {
void
notify_del_session
(
const
oai
::
cn
::
core
::
pfcp
::
fseid_t
&
cp_fseid
);
bool
add_peer_candidate_node
(
const
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
);
void
restore_sx_sessions
(
const
oai
::
cn
::
core
::
pfcp
::
node_id_t
&
node_id
);
void
initiate_heartbeat_request
(
oai
::
cn
::
core
::
itti
::
timer_id_t
timer_id
,
uint64_t
arg2_user
);
void
timeout_heartbeat_request
(
oai
::
cn
::
core
::
itti
::
timer_id_t
timer_id
,
uint64_t
arg2_user
);
...
...
src/spgwu/spgwu_sx.hpp
View file @
79655dbd
...
...
@@ -50,7 +50,7 @@ private:
std
::
thread
thread
;
uint64_t
recovery_time_stamp
;
//timestamp in seconds
core
::
pfcp
::
up_function_features_
t
up_function_features
;
core
::
pfcp
::
up_function_features_
s
up_function_features
;
void
start_association
(
const
core
::
pfcp
::
node_id_t
&
node_id
);
...
...
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