Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
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
wangjie
OpenXG-RAN
Commits
50365402
Commit
50365402
authored
May 03, 2021
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add create tunnel trace
parent
366118dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
openair3/ocp-gtpu/gtp_itf.cpp
openair3/ocp-gtpu/gtp_itf.cpp
+16
-12
No files found.
openair3/ocp-gtpu/gtp_itf.cpp
View file @
50365402
...
...
@@ -386,7 +386,7 @@ instance_t ocp_gtpv1Init(openAddr_t context) {
return
id
;
}
teid_t
newGtpuCreateTunnel
(
instance_t
instance
,
rnti_t
rnti
,
int
bearer_id
,
teid_t
teid
,
teid_t
newGtpuCreateTunnel
(
instance_t
instance
,
rnti_t
rnti
,
int
bearer_id
,
teid_t
outgoing_
teid
,
transport_layer_addr_t
remoteAddr
,
int
port
,
gtpCallback
callBack
)
{
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
auto
inst
=&
globGtp
.
instances
[
instance
];
...
...
@@ -397,18 +397,18 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int bearer_id, teid
inst
->
ue2te_mapping
.
erase
(
it
);
}
uint32_t
s1u
_teid
=
gtpv1uNewTeid
();
uint32_t
incoming
_teid
=
gtpv1uNewTeid
();
while
(
inst
->
te2ue_mapping
.
find
(
s1u
_teid
)
!=
inst
->
te2ue_mapping
.
end
()
)
{
LOG_W
(
GTPU
,
"generated a random Teid that exists, re-generating (%u)
\n
"
,
s1u
_teid
);
s1u
_teid
=
gtpv1uNewTeid
();
while
(
inst
->
te2ue_mapping
.
find
(
incoming
_teid
)
!=
inst
->
te2ue_mapping
.
end
()
)
{
LOG_W
(
GTPU
,
"generated a random Teid that exists, re-generating (%u)
\n
"
,
incoming
_teid
);
incoming
_teid
=
gtpv1uNewTeid
();
};
inst
->
te2ue_mapping
[
s1u
_teid
].
rnti
=
rnti
;
inst
->
te2ue_mapping
[
incoming
_teid
].
rnti
=
rnti
;
inst
->
te2ue_mapping
[
s1u_teid
].
rb_id
=
teid
;
inst
->
te2ue_mapping
[
incoming_teid
].
rb_id
=
outgoing_
teid
;
inst
->
te2ue_mapping
[
s1u
_teid
].
callBack
=
callBack
;
inst
->
te2ue_mapping
[
incoming
_teid
].
callBack
=
callBack
;
auto
tmp
=&
inst
->
ue2te_mapping
[
rnti
].
bearers
[
bearer_id
];
...
...
@@ -433,12 +433,16 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int bearer_id, teid
default:
AssertFatal
(
false
,
"SGW Address size impossible"
);
}
tmp
->
teid_incoming
=
s1u
_teid
;
tmp
->
teid_incoming
=
incoming
_teid
;
tmp
->
outgoing_port
=
port
;
tmp
->
teid_outgoing
=
teid
;
tmp
->
teid_outgoing
=
outgoing_
teid
;
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
return
s1u_teid
;
LOG_I
(
GTPU
,
"Created tunnel for RNTI %x, teid for DL: %d, teid for UL %d
\n
"
,
rnti
,
tmp
->
teid_incoming
,
tmp
->
teid_outgoing
);
return
incoming_teid
;
}
int
ocp_gtpv1u_create_s1u_tunnel
(
instance_t
instance
,
...
...
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