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
Michael Black
OpenXG-RAN
Commits
2b69a717
Commit
2b69a717
authored
Sep 08, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fix-gtp-u-len-bug' into integration_2022_wk36b
parents
1d4d22e3
bcba0979
Changes
33
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
167 additions
and
156 deletions
+167
-156
ci-scripts/xml_files/benetel_nsa_quectel.xml
ci-scripts/xml_files/benetel_nsa_quectel.xml
+1
-1
ci-scripts/xml_files/benetel_nsa_quectel_longrun.xml
ci-scripts/xml_files/benetel_nsa_quectel_longrun.xml
+1
-1
ci-scripts/xml_files/container_4g_l2sim_tdd.xml
ci-scripts/xml_files/container_4g_l2sim_tdd.xml
+1
-1
ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
+1
-1
ci-scripts/xml_files/container_5g_fdd_rfsim.xml
ci-scripts/xml_files/container_5g_fdd_rfsim.xml
+1
-1
ci-scripts/xml_files/container_5g_l2sim_tdd.xml
ci-scripts/xml_files/container_5g_l2sim_tdd.xml
+1
-1
ci-scripts/xml_files/container_5g_rfsim.xml
ci-scripts/xml_files/container_5g_rfsim.xml
+1
-1
ci-scripts/xml_files/enb_ocp_usrp210_band7_test_05mhz_tm1.xml
...cripts/xml_files/enb_ocp_usrp210_band7_test_05mhz_tm1.xml
+1
-1
ci-scripts/xml_files/enb_ue_usrp210_band7_test_05mhz_tm1.xml
ci-scripts/xml_files/enb_ue_usrp210_band7_test_05mhz_tm1.xml
+1
-1
ci-scripts/xml_files/enb_ue_usrp210_band7_test_05mhz_tm1_fembms_no_s1.xml
...iles/enb_ue_usrp210_band7_test_05mhz_tm1_fembms_no_s1.xml
+1
-1
ci-scripts/xml_files/enb_ue_usrp210_band7_test_05mhz_tm1_mbms_no_s1.xml
..._files/enb_ue_usrp210_band7_test_05mhz_tm1_mbms_no_s1.xml
+1
-1
ci-scripts/xml_files/enb_ue_usrp210_band7_test_05mhz_tm1_s1.xml
...ipts/xml_files/enb_ue_usrp210_band7_test_05mhz_tm1_s1.xml
+1
-1
ci-scripts/xml_files/enb_usrp210_band40_test_05mhz_tm2.xml
ci-scripts/xml_files/enb_usrp210_band40_test_05mhz_tm2.xml
+1
-1
ci-scripts/xml_files/enb_usrp210_band40_test_20mhz_tm1.xml
ci-scripts/xml_files/enb_usrp210_band40_test_20mhz_tm1.xml
+1
-1
ci-scripts/xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xml
...srp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xml
+1
-1
ci-scripts/xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_w_flexran.xml
...usrp210_band7_test_05mhz_tm1_rrc_inactivity_w_flexran.xml
+1
-1
ci-scripts/xml_files/enb_usrp210_band7_test_10mhz_tm1_cdrx.xml
...ripts/xml_files/enb_usrp210_band7_test_10mhz_tm1_cdrx.xml
+1
-1
ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml
ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml
+1
-1
ci-scripts/xml_files/gnb_nr_ue_usrp_run_multi_thread.xml
ci-scripts/xml_files/gnb_nr_ue_usrp_run_multi_thread.xml
+1
-1
ci-scripts/xml_files/gnb_usrp_build.xml
ci-scripts/xml_files/gnb_usrp_build.xml
+1
-1
ci-scripts/xml_files/if4p5_usrp210_band40_test_10mhz.xml
ci-scripts/xml_files/if4p5_usrp210_band40_test_10mhz.xml
+1
-1
ci-scripts/xml_files/if4p5_usrp210_band40_test_20mhz.xml
ci-scripts/xml_files/if4p5_usrp210_band40_test_20mhz.xml
+1
-1
ci-scripts/xml_files/inria/enb_ue_usrp210_band7_test_05mhz_tm1.xml
...s/xml_files/inria/enb_ue_usrp210_band7_test_05mhz_tm1.xml
+1
-1
ci-scripts/xml_files/inria/enb_ue_usrp210_band7_test_05mhz_tm1_nos1.xml
..._files/inria/enb_ue_usrp210_band7_test_05mhz_tm1_nos1.xml
+1
-1
ci-scripts/xml_files/inria/enb_usrp210_band7_x2_ho_test_05Mhz_tm1.xml
...ml_files/inria/enb_usrp210_band7_x2_ho_test_05Mhz_tm1.xml
+1
-1
ci-scripts/xml_files/multi_rru_band38_test_10mhz_tm1.xml
ci-scripts/xml_files/multi_rru_band38_test_10mhz_tm1.xml
+1
-1
ci-scripts/xml_files/nr_ue_usrp_build.xml
ci-scripts/xml_files/nr_ue_usrp_build.xml
+1
-1
ci-scripts/xml_files/ue_band20_test_10mhz_orange.xml
ci-scripts/xml_files/ue_band20_test_10mhz_orange.xml
+1
-1
ci-scripts/xml_files/ue_band20_test_10mhz_sfr.xml
ci-scripts/xml_files/ue_band20_test_10mhz_sfr.xml
+1
-1
ci-scripts/xml_files/x2ho_enb_usrp210_band13_test_05mhz_tm1.xml
...ipts/xml_files/x2ho_enb_usrp210_band13_test_05mhz_tm1.xml
+1
-1
common/config/config_userapi.c
common/config/config_userapi.c
+1
-1
common/utils/ocp_itti/intertask_interface.cpp
common/utils/ocp_itti/intertask_interface.cpp
+2
-0
openair3/ocp-gtpu/gtp_itf.cpp
openair3/ocp-gtpu/gtp_itf.cpp
+134
-125
No files found.
ci-scripts/xml_files/benetel_nsa_quectel.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
TEST-NSA-FR1-TM1
</htmlTabRef>
<htmlTabName>
NSA Ping DL UL with QUECTEL
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
3
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030000
040000
...
...
ci-scripts/xml_files/benetel_nsa_quectel_longrun.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
TEST-NSA-FR1-TM1
</htmlTabRef>
<htmlTabName>
NSA Ping DL UL with QUECTEL
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
3
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030000
040000
...
...
ci-scripts/xml_files/container_4g_l2sim_tdd.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
l2sim-4glte-tdd
</htmlTabRef>
<htmlTabName>
Testing 4G LTE L2 sim - FDD eNB
</htmlTabName>
<htmlTabIcon>
wrench
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
100001
000000
...
...
ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
rfsim-4glte-tdd05mhz
</htmlTabRef>
<htmlTabName>
Monolithic eNB - TDD 05MHz
</htmlTabName>
<htmlTabIcon>
wrench
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
100011
000011
...
...
ci-scripts/xml_files/container_5g_fdd_rfsim.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
rfsim-5gnr-fdd
</htmlTabRef>
<htmlTabName>
Monolithic FDD gNB with SDAP
</htmlTabName>
<htmlTabIcon>
wrench
</htmlTabIcon>
<repeatCount>
4
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
100011
000010
...
...
ci-scripts/xml_files/container_5g_l2sim_tdd.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
l2sim-5gnr-tdd
</htmlTabRef>
<htmlTabName>
Testing 5G NR L2 sim - TDD gNB
</htmlTabName>
<htmlTabIcon>
wrench
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
100001
000000
...
...
ci-scripts/xml_files/container_5g_rfsim.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
rfsim-5gnr-tdd
</htmlTabRef>
<htmlTabName>
Monolithic TDD gNB
</htmlTabName>
<htmlTabIcon>
wrench
</htmlTabIcon>
<repeatCount>
4
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
100001
000000
...
...
ci-scripts/xml_files/enb_ocp_usrp210_band7_test_05mhz_tm1.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-05-tm1
</htmlTabRef>
<htmlTabName>
Test-05MHz-TM1
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
4
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030201
040101
...
...
ci-scripts/xml_files/enb_ue_usrp210_band7_test_05mhz_tm1.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-05-tm1-nos1-tunnel
</htmlTabRef>
<htmlTabName>
Test-05MHz-TM1-noS1-tunnel
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
4
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030201 090109
030101 000001 090101 000002 040501 040502 000001 040601 040602 040641 040642 000001 090109 030201
...
...
ci-scripts/xml_files/enb_ue_usrp210_band7_test_05mhz_tm1_fembms_no_s1.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-05-tm1-fembms-nos1-tunnel
</htmlTabRef>
<htmlTabName>
Test-05MHz-FEMBMS-TM1-noS1-tunnel
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030201 090109
030104 000001 090104 000002 040605 000001 090109 030201
...
...
ci-scripts/xml_files/enb_ue_usrp210_band7_test_05mhz_tm1_mbms_no_s1.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-05-tm1-mbms-nos1-tunnel
</htmlTabRef>
<htmlTabName>
Test-05MHz-MBMS-TM1-noS1-tunnel
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030201 090109
030103 000001 090103 000002 040605 000001 090109 030201
...
...
ci-scripts/xml_files/enb_ue_usrp210_band7_test_05mhz_tm1_s1.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-05-tm1-tunnel
</htmlTabRef>
<htmlTabName>
Test-05MHz-TM1-tunnel
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030201 090109
030102 000001 090102 000002 040503 000001 040603 040604 040643 040644 000001 090109 030201
...
...
ci-scripts/xml_files/enb_usrp210_band40_test_05mhz_tm2.xml
View file @
2b69a717
...
...
@@ -25,7 +25,7 @@
<htmlTabRef>
test-05-tm2
</htmlTabRef>
<htmlTabName>
Test-05MHz-TM2
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestUnstable>
True
</TestUnstable>
<TestMinId>
040608
</TestMinId>
<TestCaseRequestedList>
...
...
ci-scripts/xml_files/enb_usrp210_band40_test_20mhz_tm1.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-20-tm1
</htmlTabRef>
<htmlTabName>
Test-20MHz-TM1
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
4
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestUnstable>
True
</TestUnstable>
<TestMinId>
040623
</TestMinId>
<TestCaseRequestedList>
...
...
ci-scripts/xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-05-tm1-rrc-no-flex
</htmlTabRef>
<htmlTabName>
Test-05MHz-TM1-RRC-Inactivity
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030201
040101
...
...
ci-scripts/xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_w_flexran.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-05-tm1-rrc-w-flex
</htmlTabRef>
<htmlTabName>
Test-05MHz-TM1-RRC-Inactivity-FlexRan
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030201
040101
...
...
ci-scripts/xml_files/enb_usrp210_band7_test_10mhz_tm1_cdrx.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-10-cdrx-tm1
</htmlTabRef>
<htmlTabName>
Test-10MHz-CDRX-TM1
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
4
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030201
040101
...
...
ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
run-oai-gnb-nr-ue
</htmlTabRef>
<htmlTabName>
Run-gNB-and-NR-UE
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
090101 000001 090102 000002 090108 090109
</TestCaseRequestedList>
...
...
ci-scripts/xml_files/gnb_nr_ue_usrp_run_multi_thread.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
run-oai-gnb-nr-ue-tx-write-thread
</htmlTabRef>
<htmlTabName>
Run-gNB-and-NR-UE-TX-Write-Thread
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
090103 000001 090104 000002 090108 090109
</TestCaseRequestedList>
...
...
ci-scripts/xml_files/gnb_usrp_build.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
gnb-build-tab
</htmlTabRef>
<htmlTabName>
Build-gNB
</htmlTabName>
<htmlTabIcon>
wrench
</htmlTabIcon>
<repeatCount>
4
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
010101
</TestCaseRequestedList>
...
...
ci-scripts/xml_files/if4p5_usrp210_band40_test_10mhz.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-10
</htmlTabRef>
<htmlTabName>
Test-10MHz
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestUnstable>
True
</TestUnstable>
<TestMinId>
040612
</TestMinId>
<TestCaseRequestedList>
...
...
ci-scripts/xml_files/if4p5_usrp210_band40_test_20mhz.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-20
</htmlTabRef>
<htmlTabName>
Test-20MHz
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030201
040101
...
...
ci-scripts/xml_files/inria/enb_ue_usrp210_band7_test_05mhz_tm1.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-05-tm1-oai-ue
</htmlTabRef>
<htmlTabName>
Test-05MHz-TM1-OAI-UE
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
4
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030201 090109
030102 000001 090102 000002 040503 000002 040603 040604 040643 040644 000002 090109 000001 030201
...
...
ci-scripts/xml_files/inria/enb_ue_usrp210_band7_test_05mhz_tm1_nos1.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-05-tm1-nos1-tunnel
</htmlTabRef>
<htmlTabName>
Test-05MHz-TM1-noS1-tunnel
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
4
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030201 090109
030101 000001 090101 000002 040501 040502 000001 040601 040602 040641 040642 000001 090109 030201
...
...
ci-scripts/xml_files/inria/enb_usrp210_band7_x2_ho_test_05Mhz_tm1.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-x2-ho-05-tm1
</htmlTabRef>
<htmlTabName>
Test-X2-Handover-05MHz-TM1
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
040101 030201 030202
050102
...
...
ci-scripts/xml_files/multi_rru_band38_test_10mhz_tm1.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-multi-rru-10
</htmlTabRef>
<htmlTabName>
Test-Multi-RRU-10MHz
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
030211 030212 030213
030111 030112 030113
...
...
ci-scripts/xml_files/nr_ue_usrp_build.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
nr-ue-build-tab
</htmlTabRef>
<htmlTabName>
Build-NR-UE
</htmlTabName>
<htmlTabIcon>
wrench
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
010102
</TestCaseRequestedList>
...
...
ci-scripts/xml_files/ue_band20_test_10mhz_orange.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-10mhz-orange
</htmlTabRef>
<htmlTabName>
Test-10Mhz-Orange
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
4
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
090109
090110 000001 090109
...
...
ci-scripts/xml_files/ue_band20_test_10mhz_sfr.xml
View file @
2b69a717
...
...
@@ -24,7 +24,7 @@
<htmlTabRef>
test-10mHz-sfr
</htmlTabRef>
<htmlTabName>
Test-10MHz-SFR
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
4
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
090109
090111 000001 090109
...
...
ci-scripts/xml_files/x2ho_enb_usrp210_band13_test_05mhz_tm1.xml
View file @
2b69a717
...
...
@@ -25,7 +25,7 @@
<htmlTabRef>
test-x2-ho-05-tm1
</htmlTabRef>
<htmlTabName>
Test-X2-HO-FDD-05MHz-TM1
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
2
</repeatCount>
<repeatCount>
1
</repeatCount>
<TestUnstable>
True
</TestUnstable>
<TestCaseRequestedList>
030201 030202
...
...
common/config/config_userapi.c
View file @
2b69a717
...
...
@@ -113,7 +113,7 @@ void config_check_valptr(paramdef_t *cfgoptions, int elt_sz, int nb_elt) {
sz
=
managed_ptr_sz
(
*
cfgoptions
->
strptr
);
else
sz
=
managed_ptr_sz
(
cfgoptions
->
voidptr
);
if
(
sz
!
=
-
1
)
{
if
(
sz
=
=
-
1
)
{
CONFIG_PRINTF_ERROR
(
"[CONFIG] %s NOT SUPPORTED not NULL pointer with array types"
,
cfgoptions
->
optname
);
return
;
}
...
...
common/utils/ocp_itti/intertask_interface.cpp
View file @
2b69a717
...
...
@@ -171,6 +171,8 @@ extern "C" {
AssertFatal
(
epoll_ctl
(
t
->
epoll_fd
,
EPOLL_CTL_ADD
,
fd
,
&
event
)
==
0
,
"epoll_ctl (EPOLL_CTL_ADD) failed for task %s, fd %d: %s!
\n
"
,
itti_get_task_name
(
task_id
),
fd
,
strerror
(
errno
));
eventfd_t
sem_counter
=
1
;
AssertFatal
(
sizeof
(
sem_counter
)
==
write
(
t
->
sem_fd
,
&
sem_counter
,
sizeof
(
sem_counter
)),
""
);
}
void
itti_unsubscribe_event_fd
(
task_id_t
task_id
,
int
fd
)
{
...
...
openair3/ocp-gtpu/gtp_itf.cpp
View file @
2b69a717
...
...
@@ -163,11 +163,46 @@ static teid_t gtpv1uNewTeid(void) {
}
instance_t
legacyInstanceMapping
=
0
;
#define compatInst(a) ((a)==0 || (a)==INSTANCE_DEFAULT?legacyInstanceMapping:a)
#define GTPV1U_HEADER_SIZE (8)
#define compatInst(a) ((a)==0 || (a)==INSTANCE_DEFAULT ? legacyInstanceMapping:a)
#define getInstRetVoid(insT) \
auto instChk=globGtp.instances.find(compatInst(insT)); \
if (instChk == globGtp.instances.end()) { \
LOG_E(GTPU,"try to get a gtp-u not existing output\n"); \
pthread_mutex_unlock(&globGtp.gtp_lock); \
return; \
} \
gtpEndPoint * inst=&instChk->second;
#define getInstRetInt(insT) \
auto instChk=globGtp.instances.find(compatInst(insT)); \
if (instChk == globGtp.instances.end()) { \
LOG_E(GTPU,"try to get a gtp-u not existing output\n"); \
pthread_mutex_unlock(&globGtp.gtp_lock); \
return GTPNOK; \
} \
gtpEndPoint * inst=&instChk->second;
#define getRntiRetVoid(insT, RnTi) \
auto ptrRnti=insT->ue2te_mapping.find(RnTi); \
\
if ( ptrRnti==insT->ue2te_mapping.end() ) { \
LOG_E(GTPU, "[%ld] gtpv1uSend failed: while getting ue rnti %x in hashtable ue_mapping\n", instance, rnti); \
pthread_mutex_unlock(&globGtp.gtp_lock); \
return; \
}
#define HDR_MAX 256 // 256 is supposed to be larger than any gtp header
#define getRntiRetInt(insT, RnTi) \
auto ptrRnti=insT->ue2te_mapping.find(RnTi); \
\
if ( ptrRnti==insT->ue2te_mapping.end() ) { \
LOG_E(GTPU, "[%ld] gtpv1uSend failed: while getting ue rnti %x in hashtable ue_mapping\n", instance, rnti); \
pthread_mutex_unlock(&globGtp.gtp_lock); \
return GTPNOK; \
}
#define HDR_MAX 256 // 256 is supposed to be larger than any gtp header
static
int
gtpv1uCreateAndSendMsg
(
int
h
,
uint32_t
peerIp
,
uint16_t
peerPort
,
...
...
@@ -196,13 +231,11 @@ static int gtpv1uCreateAndSendMsg(int h,
msgHdr
->
PT
=
1
;
msgHdr
->
version
=
1
;
msgHdr
->
msgType
=
msgType
;
msgHdr
->
msgLength
=
htons
(
msgLen
+
extensionHeader_length
);
msgHdr
->
teid
=
htonl
(
teid
);
curPtr
+=
sizeof
(
Gtpv1uMsgHeaderT
);
if
(
seqNumFlag
||
(
extHdrType
!=
NO_MORE_EXT_HDRS
)
||
npduNumFlag
)
{
msgHdr
->
msgLength
+=
htons
(
4
);
*
(
uint16_t
*
)
curPtr
=
seqNumFlag
?
seqNum
:
0x0000
;
curPtr
+=
sizeof
(
uint16_t
);
*
(
uint8_t
*
)
curPtr
=
npduNumFlag
?
npduNum
:
0x00
;
...
...
@@ -229,9 +262,10 @@ static int gtpv1uCreateAndSendMsg(int h,
curPtr
+=
msgLen
;
}
AssertFatal
(
curPtr
-
(
buffer
+
msgLen
)
<
HDR_MAX
,
""
);
msgHdr
->
msgLength
=
htons
(
curPtr
-
(
buffer
+
sizeof
(
Gtpv1uMsgHeaderT
)));
AssertFatal
(
curPtr
-
(
buffer
+
msgLen
)
<
HDR_MAX
,
"fixed max size of all headers too short"
);
// Fix me: add IPv6 support, using flag ipVersion
st
atic
st
ruct
sockaddr_in
to
=
{
0
};
struct
sockaddr_in
to
=
{
0
};
to
.
sin_family
=
AF_INET
;
to
.
sin_port
=
htons
(
peerPort
);
to
.
sin_addr
.
s_addr
=
peerIp
;
...
...
@@ -253,14 +287,8 @@ static void gtpv1uSend(instance_t instance, gtpv1u_enb_tunnel_data_req_t *req, b
rnti_t
rnti
=
req
->
rnti
;
int
rab_id
=
req
->
rab_id
;
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
auto
inst
=&
globGtp
.
instances
[
compatInst
(
instance
)];
auto
ptrRnti
=
inst
->
ue2te_mapping
.
find
(
rnti
);
if
(
ptrRnti
==
inst
->
ue2te_mapping
.
end
()
)
{
LOG_E
(
GTPU
,
"[%ld] gtpv1uSend failed: while getting ue rnti %x in hashtable ue_mapping
\n
"
,
instance
,
rnti
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
return
;
}
getInstRetVoid
(
compatInst
(
instance
));
getRntiRetVoid
(
inst
,
rnti
);
map
<
int
,
gtpv1u_bearer_t
>::
iterator
ptr2
=
ptrRnti
->
second
.
bearers
.
find
(
rab_id
);
...
...
@@ -292,14 +320,8 @@ static void gtpv1uSend2(instance_t instance, gtpv1u_gnb_tunnel_data_req_t *req,
rnti_t
rnti
=
req
->
rnti
;
int
rab_id
=
req
->
pdusession_id
;
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
auto
inst
=&
globGtp
.
instances
[
compatInst
(
instance
)];
auto
ptrRnti
=
inst
->
ue2te_mapping
.
find
(
rnti
);
if
(
ptrRnti
==
inst
->
ue2te_mapping
.
end
()
)
{
LOG_E
(
GTPU
,
"[%ld] GTP-U gtpv1uSend failed: while getting ue rnti %x in hashtable ue_mapping
\n
"
,
instance
,
rnti
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
return
;
}
getInstRetVoid
(
compatInst
(
instance
));
getRntiRetVoid
(
inst
,
rnti
);
map
<
int
,
gtpv1u_bearer_t
>::
iterator
ptr2
=
ptrRnti
->
second
.
bearers
.
find
(
rab_id
);
...
...
@@ -385,14 +407,8 @@ static void gtpv1uSendDlDeliveryStatus(instance_t instance, gtpv1u_DU_buffer_rep
rnti_t
rnti
=
req
->
rnti
;
int
rab_id
=
req
->
pdusession_id
;
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
auto
inst
=&
globGtp
.
instances
[
compatInst
(
instance
)];
auto
ptrRnti
=
inst
->
ue2te_mapping
.
find
(
rnti
);
if
(
ptrRnti
==
inst
->
ue2te_mapping
.
end
()
)
{
LOG_E
(
GTPU
,
"[%ld] GTP-U gtpv1uSend failed: while getting ue rnti %x in hashtable ue_mapping
\n
"
,
instance
,
rnti
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
return
;
}
getInstRetVoid
(
compatInst
(
instance
));
getRntiRetVoid
(
inst
,
rnti
);
map
<
int
,
gtpv1u_bearer_t
>::
iterator
ptr2
=
ptrRnti
->
second
.
bearers
.
find
(
rab_id
);
...
...
@@ -419,14 +435,8 @@ static void gtpv1uEndTunnel(instance_t instance, gtpv1u_enb_tunnel_data_req_t *r
rnti_t
rnti
=
req
->
rnti
;
int
rab_id
=
req
->
rab_id
;
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
auto
inst
=&
globGtp
.
instances
[
compatInst
(
instance
)];
auto
ptrRnti
=
inst
->
ue2te_mapping
.
find
(
rnti
);
if
(
ptrRnti
==
inst
->
ue2te_mapping
.
end
()
)
{
LOG_E
(
GTPU
,
"[%ld] gtpv1uSend failed: while getting ue rnti %x in hashtable ue_mapping
\n
"
,
instance
,
rnti
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
return
;
}
getInstRetVoid
(
compatInst
(
instance
));
getRntiRetVoid
(
inst
,
rnti
);
map
<
int
,
gtpv1u_bearer_t
>::
iterator
ptr2
=
ptrRnti
->
second
.
bearers
.
find
(
rab_id
);
...
...
@@ -571,14 +581,8 @@ instance_t gtpv1Init(openAddr_t context) {
void
GtpuUpdateTunnelOutgoingTeid
(
instance_t
instance
,
rnti_t
rnti
,
ebi_t
bearer_id
,
teid_t
newOutgoingTeid
)
{
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
auto
inst
=&
globGtp
.
instances
[
compatInst
(
instance
)];
auto
ptrRnti
=
inst
->
ue2te_mapping
.
find
(
rnti
);
if
(
ptrRnti
==
inst
->
ue2te_mapping
.
end
()
)
{
LOG_E
(
GTPU
,
"[%ld] Update tunnel for a not existing rnti %x
\n
"
,
instance
,
rnti
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
return
;
}
getInstRetVoid
(
compatInst
(
instance
));
getRntiRetVoid
(
inst
,
rnti
);
map
<
int
,
gtpv1u_bearer_t
>::
iterator
ptr2
=
ptrRnti
->
second
.
bearers
.
find
(
bearer_id
);
...
...
@@ -605,8 +609,7 @@ teid_t newGtpuCreateTunnel(instance_t instance,
gtpCallback
callBack
,
gtpCallbackSDAP
callBackSDAP
)
{
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
instance
=
compatInst
(
instance
);
auto
inst
=&
globGtp
.
instances
[
instance
];
getInstRetInt
(
compatInst
(
instance
));
auto
it
=
inst
->
ue2te_mapping
.
find
(
rnti
);
if
(
it
!=
inst
->
ue2te_mapping
.
end
()
&&
it
->
second
.
bearers
.
find
(
outgoing_bearer_id
)
!=
it
->
second
.
bearers
.
end
())
{
...
...
@@ -682,8 +685,14 @@ int gtpv1u_create_s1u_tunnel(instance_t instance,
create_tunnel_req
->
rnti
,
create_tunnel_req
->
num_tunnels
,
create_tunnel_req
->
sgw_S1u_teid
[
0
]);
tcp_udp_port_t
dstport
=
globGtp
.
instances
[
compatInst
(
instance
)].
get_dstport
();
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
getInstRetInt
(
compatInst
(
instance
));
tcp_udp_port_t
dstport
=
inst
->
get_dstport
();
uint8_t
addr
[
inst
->
foundAddrLen
];
memcpy
(
addr
,
inst
->
foundAddr
,
inst
->
foundAddrLen
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
for
(
int
i
=
0
;
i
<
create_tunnel_req
->
num_tunnels
;
i
++
)
{
AssertFatal
(
create_tunnel_req
->
eps_bearer_id
[
i
]
>
4
,
"From legacy code not clear, seems impossible (bearer=%d)
\n
"
,
...
...
@@ -704,9 +713,8 @@ int gtpv1u_create_s1u_tunnel(instance_t instance,
create_tunnel_resp
->
num_tunnels
=
create_tunnel_req
->
num_tunnels
;
create_tunnel_resp
->
enb_S1u_teid
[
i
]
=
teid
;
create_tunnel_resp
->
eps_bearer_id
[
i
]
=
create_tunnel_req
->
eps_bearer_id
[
i
];
memcpy
(
create_tunnel_resp
->
enb_addr
.
buffer
,
globGtp
.
instances
[
compatInst
(
instance
)].
foundAddr
,
globGtp
.
instances
[
compatInst
(
instance
)].
foundAddrLen
);
create_tunnel_resp
->
enb_addr
.
length
=
globGtp
.
instances
[
compatInst
(
instance
)].
foundAddrLen
;
memcpy
(
create_tunnel_resp
->
enb_addr
.
buffer
,
addr
,
sizeof
(
addr
));
create_tunnel_resp
->
enb_addr
.
length
=
sizeof
(
addr
);
}
return
!
GTPNOK
;
...
...
@@ -725,10 +733,11 @@ int gtpv1u_update_s1u_tunnel(
create_tunnel_req
->
sgw_S1u_teid
[
0
],
create_tunnel_req
->
eps_bearer_id
[
0
]);
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
auto
inst
=&
globGtp
.
instances
[
compatInst
(
instance
)]
;
getInstRetInt
(
compatInst
(
instance
))
;
if
(
inst
->
ue2te_mapping
.
find
(
create_tunnel_req
->
rnti
)
==
inst
->
ue2te_mapping
.
end
()
)
{
LOG_E
(
GTPU
,
"[%ld] Update not already existing tunnel (new rnti %x, old rnti %x)
\n
"
,
instance
,
create_tunnel_req
->
rnti
,
prior_rnti
);
LOG_E
(
GTPU
,
"[%ld] Update not already existing tunnel (new rnti %x, old rnti %x)
\n
"
,
instance
,
create_tunnel_req
->
rnti
,
prior_rnti
);
}
auto
it
=
inst
->
ue2te_mapping
.
find
(
prior_rnti
);
...
...
@@ -755,7 +764,13 @@ int gtpv1u_create_ngu_tunnel( const instance_t instance,
create_tunnel_req
->
rnti
,
create_tunnel_req
->
num_tunnels
,
create_tunnel_req
->
outgoing_teid
[
0
]);
tcp_udp_port_t
dstport
=
globGtp
.
instances
[
compatInst
(
instance
)].
get_dstport
();
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
getInstRetInt
(
compatInst
(
instance
));
tcp_udp_port_t
dstport
=
inst
->
get_dstport
();
uint8_t
addr
[
inst
->
foundAddrLen
];
memcpy
(
addr
,
inst
->
foundAddr
,
inst
->
foundAddrLen
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
for
(
int
i
=
0
;
i
<
create_tunnel_req
->
num_tunnels
;
i
++
)
{
teid_t
teid
=
newGtpuCreateTunnel
(
instance
,
create_tunnel_req
->
rnti
,
...
...
@@ -771,9 +786,8 @@ int gtpv1u_create_ngu_tunnel( const instance_t instance,
create_tunnel_resp
->
rnti
=
create_tunnel_req
->
rnti
;
create_tunnel_resp
->
num_tunnels
=
create_tunnel_req
->
num_tunnels
;
create_tunnel_resp
->
gnb_NGu_teid
[
i
]
=
teid
;
memcpy
(
create_tunnel_resp
->
gnb_addr
.
buffer
,
globGtp
.
instances
[
compatInst
(
instance
)].
foundAddr
,
globGtp
.
instances
[
compatInst
(
instance
)].
foundAddrLen
);
create_tunnel_resp
->
gnb_addr
.
length
=
globGtp
.
instances
[
compatInst
(
instance
)].
foundAddrLen
;
memcpy
(
create_tunnel_resp
->
gnb_addr
.
buffer
,
addr
,
sizeof
(
addr
));
create_tunnel_resp
->
gnb_addr
.
length
=
sizeof
(
addr
);
}
return
!
GTPNOK
;
...
...
@@ -799,25 +813,19 @@ int newGtpuDeleteAllTunnels(instance_t instance, rnti_t rnti) {
LOG_D
(
GTPU
,
"[%ld] Start delete tunnels for RNTI %x
\n
"
,
instance
,
rnti
);
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
auto
inst
=&
globGtp
.
instances
[
compatInst
(
instance
)];
auto
it
=
inst
->
ue2te_mapping
.
find
(
rnti
);
if
(
it
==
inst
->
ue2te_mapping
.
end
()
)
{
LOG_W
(
GTPU
,
"[%ld] Delete GTP tunnels for rnti: %x, but no tunnel exits
\n
"
,
instance
,
rnti
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
return
-
1
;
}
getInstRetInt
(
compatInst
(
instance
));
getRntiRetInt
(
inst
,
rnti
);
int
nb
=
0
;
for
(
auto
j
=
it
->
second
.
bearers
.
begin
();
j
!=
it
->
second
.
bearers
.
end
();
for
(
auto
j
=
ptrRnti
->
second
.
bearers
.
begin
();
j
!=
ptrRnti
->
second
.
bearers
.
end
();
++
j
)
{
inst
->
te2ue_mapping
.
erase
(
j
->
second
.
teid_incoming
);
nb
++
;
}
inst
->
ue2te_mapping
.
erase
(
it
);
inst
->
ue2te_mapping
.
erase
(
ptrRnti
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
LOG_I
(
GTPU
,
"[%ld] Deleted all tunnels for RNTI %x (%d tunnels deleted)
\n
"
,
instance
,
rnti
,
nb
);
return
!
GTPNOK
;
...
...
@@ -834,21 +842,14 @@ int newGtpuDeleteTunnels(instance_t instance, rnti_t rnti, int nbTunnels, pduses
LOG_D
(
GTPU
,
"[%ld] Start delete tunnels for RNTI %x
\n
"
,
instance
,
rnti
);
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
auto
inst
=&
globGtp
.
instances
[
compatInst
(
instance
)];
auto
ptrRNTI
=
inst
->
ue2te_mapping
.
find
(
rnti
);
if
(
ptrRNTI
==
inst
->
ue2te_mapping
.
end
()
)
{
LOG_W
(
GTPU
,
"[%ld] Delete GTP tunnels for rnti: %x, but no tunnel exits
\n
"
,
instance
,
rnti
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
return
-
1
;
}
getInstRetInt
(
compatInst
(
instance
));
getRntiRetInt
(
inst
,
rnti
);
int
nb
=
0
;
for
(
int
i
=
0
;
i
<
nbTunnels
;
i
++
)
{
auto
ptr2
=
ptrR
NTI
->
second
.
bearers
.
find
(
pdusession_id
[
i
]);
auto
ptr2
=
ptrR
nti
->
second
.
bearers
.
find
(
pdusession_id
[
i
]);
if
(
ptr2
==
ptrR
NTI
->
second
.
bearers
.
end
()
)
{
if
(
ptr2
==
ptrR
nti
->
second
.
bearers
.
end
()
)
{
LOG_E
(
GTPU
,
"[%ld] GTP-U instance: delete of not existing tunnel RNTI:RAB: %x/%x
\n
"
,
instance
,
rnti
,
pdusession_id
[
i
]);
}
else
{
inst
->
te2ue_mapping
.
erase
(
ptr2
->
second
.
teid_incoming
);
...
...
@@ -856,9 +857,9 @@ int newGtpuDeleteTunnels(instance_t instance, rnti_t rnti, int nbTunnels, pduses
}
}
if
(
ptrR
NTI
->
second
.
bearers
.
size
()
==
0
)
if
(
ptrR
nti
->
second
.
bearers
.
size
()
==
0
)
// no tunnels on this rnti, erase the ue entry
inst
->
ue2te_mapping
.
erase
(
ptrR
NTI
);
inst
->
ue2te_mapping
.
erase
(
ptrR
nti
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
LOG_I
(
GTPU
,
"[%ld] Deleted all tunnels for RNTI %x (%d tunnels deleted)
\n
"
,
instance
,
rnti
,
nb
);
...
...
@@ -936,7 +937,8 @@ static int Gtpv1uHandleEndMarker(int h,
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
// the socket Linux file handler is the instance id
auto
inst
=&
globGtp
.
instances
[
h
];
getInstRetInt
(
h
);
auto
tunnel
=
inst
->
te2ue_mapping
.
find
(
ntohl
(
msgHdr
->
teid
));
if
(
tunnel
==
inst
->
te2ue_mapping
.
end
()
)
{
...
...
@@ -996,7 +998,8 @@ static int Gtpv1uHandleGpdu(int h,
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
// the socket Linux file handler is the instance id
auto
inst
=&
globGtp
.
instances
[
h
];
getInstRetInt
(
h
);
auto
tunnel
=
inst
->
te2ue_mapping
.
find
(
ntohl
(
msgHdr
->
teid
));
if
(
tunnel
==
inst
->
te2ue_mapping
.
end
()
)
{
...
...
@@ -1007,7 +1010,7 @@ static int Gtpv1uHandleGpdu(int h,
/* see TS 29.281 5.1 */
//Minimum length of GTP-U header if non of the optional fields are present
int
offset
=
sizeof
(
Gtpv1uMsgHeaderT
);
unsigned
int
offset
=
sizeof
(
Gtpv1uMsgHeaderT
);
uint8_t
qfi
=
-
1
;
bool
rqi
=
false
;
...
...
@@ -1025,12 +1028,20 @@ static int Gtpv1uHandleGpdu(int h,
extension_header_length
=
msgBuf
[
offset
];
switch
(
next_extension_header_type
)
{
case
PDU_SESSION_CONTAINER
:
{
if
(
offset
+
sizeof
(
PDUSessionContainerT
)
>
msgBufLen
)
{
LOG_E
(
GTPU
,
"gtp-u received header is malformed, ignore gtp packet
\n
"
);
return
GTPNOK
;
}
PDUSessionContainerT
*
pdusession_cntr
=
(
PDUSessionContainerT
*
)(
msgBuf
+
offset
+
1
);
qfi
=
pdusession_cntr
->
QFI
;
rqi
=
pdusession_cntr
->
Reflective_QoS_activation
;
break
;
}
case
NR_RAN_CONTAINER
:
{
if
(
offset
+
1
>
msgBufLen
)
{
LOG_E
(
GTPU
,
"gtp-u received header is malformed, ignore gtp packet
\n
"
);
return
GTPNOK
;
}
uint8_t
PDU_type
=
(
msgBuf
[
offset
+
1
]
>>
4
)
&
0x0f
;
if
(
PDU_type
==
0
){
//DL USER Data Format
int
additional_offset
=
6
;
//Additional offset capturing the first non-mandatory octet (TS 38.425, Figure 5.5.2.1-1)
...
...
@@ -1057,10 +1068,14 @@ static int Gtpv1uHandleGpdu(int h,
}
default:
LOG_W
(
GTPU
,
"unhandled extension 0x%2.2x, skipping
\n
"
,
next_extension_header_type
);
break
;
break
;
}
offset
+=
extension_header_length
*
EXT_HDR_LNTH_OCTET_UNITS
;
if
(
offset
>
msgBufLen
)
{
LOG_E
(
GTPU
,
"gtp-u received header is malformed, ignore gtp packet
\n
"
);
return
GTPNOK
;
}
next_extension_header_type
=
msgBuf
[
offset
-
1
];
}
}
...
...
@@ -1081,40 +1096,21 @@ static int Gtpv1uHandleGpdu(int h,
const
rb_id_t
rb_id
=
tunnel
->
second
.
incoming_rb_id
;
const
mui_t
mui
=
RLC_MUI_UNDEFINED
;
const
confirm_t
confirm
=
RLC_SDU_CONFIRM_NO
;
const
sdu_size_t
sdu_buffer_size
=
msgBufLen
-
offset
;
const
sdu_size_t
sdu_buffer_size
=
msgBufLen
-
offset
;
unsigned
char
*
const
sdu_buffer
=
msgBuf
+
offset
;
const
pdcp_transmission_mode_t
mode
=
PDCP_TRANSMISSION_MODE_DATA
;
const
uint32_t
sourceL2Id
=
0
;
const
uint32_t
destinationL2Id
=
0
;
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
if
(
qfi
!=
-
1
&&
tunnel
->
second
.
callBackSDAP
)
{
if
(
!
tunnel
->
second
.
callBackSDAP
(
&
ctxt
,
srb_flag
,
rb_id
,
mui
,
confirm
,
sdu_buffer_size
,
sdu_buffer
,
mode
,
&
sourceL2Id
,
&
destinationL2Id
,
qfi
,
rqi
,
tunnel
->
second
.
pdusession_id
)
)
LOG_E
(
GTPU
,
"[%d] down layer refused incoming packet
\n
"
,
h
);
}
else
{
if
(
!
tunnel
->
second
.
callBack
(
&
ctxt
,
srb_flag
,
rb_id
,
mui
,
confirm
,
sdu_buffer_size
,
sdu_buffer
,
mode
,
&
sourceL2Id
,
&
destinationL2Id
)
)
LOG_E
(
GTPU
,
"[%d] down layer refused incoming packet
\n
"
,
h
);
if
(
sdu_buffer_size
>
0
)
{
if
(
qfi
!=
-
1
&&
tunnel
->
second
.
callBackSDAP
)
{
if
(
!
tunnel
->
second
.
callBackSDAP
(
&
ctxt
,
srb_flag
,
rb_id
,
mui
,
confirm
,
sdu_buffer_size
,
sdu_buffer
,
mode
,
&
sourceL2Id
,
&
destinationL2Id
,
qfi
,
rqi
,
tunnel
->
second
.
pdusession_id
))
LOG_E
(
GTPU
,
"[%d] down layer refused incoming packet
\n
"
,
h
);
}
else
{
if
(
!
tunnel
->
second
.
callBack
(
&
ctxt
,
srb_flag
,
rb_id
,
mui
,
confirm
,
sdu_buffer_size
,
sdu_buffer
,
mode
,
&
sourceL2Id
,
&
destinationL2Id
))
LOG_E
(
GTPU
,
"[%d] down layer refused incoming packet
\n
"
,
h
);
}
}
if
(
NR_PDCP_PDU_SN
>
0
&&
NR_PDCP_PDU_SN
%
5
==
0
){
...
...
@@ -1139,7 +1135,10 @@ static int Gtpv1uHandleGpdu(int h,
extensionHeader
->
buffer
[
offset
]
=
(
NR_PDCP_PDU_SN
>>
16
)
&
0xff
;
extensionHeader
->
buffer
[
offset
+
1
]
=
(
NR_PDCP_PDU_SN
>>
8
)
&
0xff
;
extensionHeader
->
buffer
[
offset
+
2
]
=
NR_PDCP_PDU_SN
&
0xff
;
LOG_D
(
GTPU
,
"Octets reporting NR_PDCP_PDU_SN, extensionHeader->buffer[offset]: %u, extensionHeader->buffer[offset+1]:%u, extensionHeader->buffer[offset+2]:%u
\n
"
,
extensionHeader
->
buffer
[
offset
],
extensionHeader
->
buffer
[
offset
+
1
],
extensionHeader
->
buffer
[
offset
+
2
]);
LOG_D
(
GTPU
,
"Octets reporting NR_PDCP_PDU_SN, extensionHeader-> %u:%u:%u
\n
"
,
extensionHeader
->
buffer
[
offset
],
extensionHeader
->
buffer
[
offset
+
1
],
extensionHeader
->
buffer
[
offset
+
2
]);
extensionHeader
->
buffer
[
offset
+
3
]
=
0x00
;
//Padding octet
extensionHeader
->
buffer
[
offset
+
4
]
=
0x00
;
//No more extension headers
/*Total size of DDD_status PDU = size of mandatory part +
...
...
@@ -1148,7 +1147,10 @@ static int Gtpv1uHandleGpdu(int h,
* according to TS 38.425: Fig. 5.5.2.2-1 and section 5.5.3.24*/
extensionHeader
->
length
=
1
+
sizeof
(
DlDataDeliveryStatus_flagsT
)
+
3
+
1
+
1
;
gtpv1uCreateAndSendMsg
(
h
,
peerIp
,
peerPort
,
GTP_GPDU
,
inst
->
te2ue_mapping
[
ntohl
(
msgHdr
->
teid
)].
outgoing_teid
,
NULL
,
0
,
false
,
false
,
0
,
0
,
NR_RAN_CONTAINER
,
extensionHeader
->
buffer
,
extensionHeader
->
length
);
h
,
peerIp
,
peerPort
,
GTP_GPDU
,
inst
->
te2ue_mapping
[
ntohl
(
msgHdr
->
teid
)].
outgoing_teid
,
NULL
,
0
,
false
,
false
,
0
,
0
,
NR_RAN_CONTAINER
,
extensionHeader
->
buffer
,
extensionHeader
->
length
);
}
LOG_D
(
GTPU
,
"[%d] Received a %d bytes packet for: teid:%x
\n
"
,
h
,
...
...
@@ -1158,7 +1160,7 @@ static int Gtpv1uHandleGpdu(int h,
}
void
gtpv1uReceiver
(
int
h
)
{
uint8_t
udpData
[
65536
];
uint8_t
udpData
[
65536
];
int
udpDataLen
;
socklen_t
from_len
;
struct
sockaddr_in
addr
;
...
...
@@ -1172,10 +1174,17 @@ void gtpv1uReceiver(int h) {
LOG_W
(
GTPU
,
"[%d] Recvfrom returned 0
\n
"
,
h
);
return
;
}
else
{
uint8_t
msgType
=
*
((
uint8_t
*
)(
udpData
+
1
));
LOG_D
(
GTPU
,
"[%d] Received GTP data, msg type: %x
\n
"
,
h
,
msgType
);
switch
(
msgType
)
{
if
(
udpDataLen
<
(
int
)
sizeof
(
Gtpv1uMsgHeaderT
)
)
{
LOG_W
(
GTPU
,
"[%d] received malformed gtp packet
\n
"
,
h
);
return
;
}
Gtpv1uMsgHeaderT
*
msg
=
(
Gtpv1uMsgHeaderT
*
)
udpData
;
if
(
(
int
)(
ntohs
(
msg
->
msgLength
)
+
sizeof
(
Gtpv1uMsgHeaderT
))
!=
udpDataLen
)
{
LOG_W
(
GTPU
,
"[%d] received malformed gtp packet length
\n
"
,
h
);
return
;
}
LOG_D
(
GTPU
,
"[%d] Received GTP data, msg type: %x
\n
"
,
h
,
msg
->
msgType
);
switch
(
msg
->
msgType
)
{
case
GTP_ECHO_RSP
:
break
;
...
...
@@ -1200,7 +1209,7 @@ void gtpv1uReceiver(int h) {
break
;
default:
LOG_E
(
GTPU
,
"[%d] Received a GTP packet of unknown type: %d
\n
"
,
h
,
msgType
);
LOG_E
(
GTPU
,
"[%d] Received a GTP packet of unknown type: %d
\n
"
,
h
,
msg
->
msg
Type
);
break
;
}
}
...
...
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