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
promise
OpenXG-RAN
Commits
b8181d06
Commit
b8181d06
authored
Apr 04, 2016
by
Navid Nikaein
Browse files
Options
Browse Files
Download
Plain Diff
merge with the develop
parents
0f8c20f2
15d50959
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
476 additions
and
133 deletions
+476
-133
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+47
-4
cmake_targets/autotests/run_compilation_autotests.bash
cmake_targets/autotests/run_compilation_autotests.bash
+3
-3
cmake_targets/tools/fix_asn1
cmake_targets/tools/fix_asn1
+177
-0
cmake_targets/tools/fix_asn1.data/RRC.rel10/SystemInformation-r8-IEs.h.diff
...s/fix_asn1.data/RRC.rel10/SystemInformation-r8-IEs.h.diff
+23
-0
cmake_targets/tools/fix_asn1.data/S1AP.rel10.5/NativeInteger.c.diff
...ets/tools/fix_asn1.data/S1AP.rel10.5/NativeInteger.c.diff
+8
-0
cmake_targets/tools/fix_asn1.data/S1AP.rel10.5/constr_SET_OF.c.diff
...ets/tools/fix_asn1.data/S1AP.rel10.5/constr_SET_OF.c.diff
+4
-0
cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/NativeInteger.c.diff
...ets/tools/fix_asn1.data/X2AP.rel11.2/NativeInteger.c.diff
+8
-0
cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/X2ap-CriticalityDiagnostics-IE-List.h.diff
...a/X2AP.rel11.2/X2ap-CriticalityDiagnostics-IE-List.h.diff
+15
-0
cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/constr_SET_OF.c.diff
...ets/tools/fix_asn1.data/X2AP.rel11.2/constr_SET_OF.c.diff
+4
-0
cmake_targets/tools/test_helper
cmake_targets/tools/test_helper
+1
-1
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+73
-55
openair2/RRC/LITE/defs.h
openair2/RRC/LITE/defs.h
+1
-0
openair2/RRC/LITE/rrc_eNB.c
openair2/RRC/LITE/rrc_eNB.c
+5
-2
openair2/RRC/LITE/rrc_eNB_S1AP.c
openair2/RRC/LITE/rrc_eNB_S1AP.c
+67
-51
openair2/RRC/LITE/rrc_eNB_S1AP.h
openair2/RRC/LITE/rrc_eNB_S1AP.h
+19
-0
targets/ARCH/COMMON/common_lib.c
targets/ARCH/COMMON/common_lib.c
+11
-6
targets/ARCH/LMSSDR/USERSPACE/LIB/Si5351C/CMakeLists.txt
targets/ARCH/LMSSDR/USERSPACE/LIB/Si5351C/CMakeLists.txt
+1
-1
targets/ARCH/LMSSDR/USERSPACE/LIB/lms7002m/CMakeLists.txt
targets/ARCH/LMSSDR/USERSPACE/LIB/lms7002m/CMakeLists.txt
+1
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.usrpb210.conf
...ROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.usrpb210.conf
+3
-3
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.bladerfx40.conf
.../GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.bladerfx40.conf
+4
-4
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf
...ENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf
+1
-2
No files found.
cmake_targets/CMakeLists.txt
View file @
b8181d06
...
@@ -43,7 +43,6 @@ set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
...
@@ -43,7 +43,6 @@ set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
project
(
OpenAirInterface
)
project
(
OpenAirInterface
)
#add_definitions("-DEMIT_ASN_DEBUG=1")
#add_definitions("-DEMIT_ASN_DEBUG=1")
add_subdirectory
(
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/lms7002m lms7002m
)
add_subdirectory
(
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/lms7002m lms7002m
)
add_subdirectory
(
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR lmsSDR
)
add_subdirectory
(
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR lmsSDR
)
add_subdirectory
(
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/Si5351C Si5351C
)
add_subdirectory
(
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/Si5351C Si5351C
)
...
@@ -277,6 +276,7 @@ endif (${RTAI})
...
@@ -277,6 +276,7 @@ endif (${RTAI})
# New C code source file, cmake must be re-run (instead of re-running make only)
# New C code source file, cmake must be re-run (instead of re-running make only)
#############
#############
set
(
asn1c_call
"
${
OPENAIR_CMAKE
}
/tools/generate_asn1"
)
set
(
asn1c_call
"
${
OPENAIR_CMAKE
}
/tools/generate_asn1"
)
set
(
fix_asn1c_call
"
${
OPENAIR_CMAKE
}
/tools/fix_asn1"
)
set
(
asn1_generated_dir
${
OPENAIR_BIN_DIR
}
)
set
(
asn1_generated_dir
${
OPENAIR_BIN_DIR
}
)
set
(
protoc_call
"
${
OPENAIR_CMAKE
}
/tools/generate_protobuf"
)
set
(
protoc_call
"
${
OPENAIR_CMAKE
}
/tools/generate_protobuf"
)
...
@@ -298,7 +298,19 @@ set (RRC_FULL_DIR ${asn1_generated_dir}/${RRC_ASN1_VERSION})
...
@@ -298,7 +298,19 @@ set (RRC_FULL_DIR ${asn1_generated_dir}/${RRC_ASN1_VERSION})
if
(
NOT EXISTS
${
asn1c_call
}
)
if
(
NOT EXISTS
${
asn1c_call
}
)
message
(
FATAL_ERROR
"The script
${
asn1c_call
}
must be present"
)
message
(
FATAL_ERROR
"The script
${
asn1c_call
}
must be present"
)
endif
(
NOT EXISTS
${
asn1c_call
}
)
endif
(
NOT EXISTS
${
asn1c_call
}
)
execute_process
(
COMMAND
${
asn1c_call
}
${
RRC_FULL_DIR
}
${
RRC_GRAMMAR
}
)
execute_process
(
COMMAND
${
asn1c_call
}
${
RRC_FULL_DIR
}
${
RRC_GRAMMAR
}
RESULT_VARIABLE ret
)
if
(
NOT
${
ret
}
STREQUAL 0
)
message
(
FATAL_ERROR
"
${
asn1c_call
}
: error"
)
endif
(
NOT
${
ret
}
STREQUAL 0
)
if
(
NOT EXISTS
${
fix_asn1c_call
}
)
message
(
FATAL_ERROR
"The script
${
fix_asn1c_call
}
must be present"
)
endif
(
NOT EXISTS
${
fix_asn1c_call
}
)
execute_process
(
COMMAND
${
fix_asn1c_call
}
${
RRC_FULL_DIR
}
RRC
${
RRC_ASN1_VERSION
}
RESULT_VARIABLE ret
)
if
(
NOT
${
ret
}
STREQUAL 0
)
message
(
FATAL_ERROR
"
${
fix_asn1c_call
}
: error"
)
endif
(
NOT
${
ret
}
STREQUAL 0
)
file
(
GLOB rrc_source
${
RRC_FULL_DIR
}
/*.c
)
file
(
GLOB rrc_source
${
RRC_FULL_DIR
}
/*.c
)
set
(
rrc_source
${
rrc_source
}
${
OPENAIR2_DIR
}
/RRC/LITE/MESSAGES/asn1_msg.c
)
set
(
rrc_source
${
rrc_source
}
${
OPENAIR2_DIR
}
/RRC/LITE/MESSAGES/asn1_msg.c
)
file
(
GLOB rrc_h
${
RRC_FULL_DIR
}
/*.h
)
file
(
GLOB rrc_h
${
RRC_FULL_DIR
}
/*.h
)
...
@@ -312,6 +324,7 @@ include_directories ("${RRC_FULL_DIR}")
...
@@ -312,6 +324,7 @@ include_directories ("${RRC_FULL_DIR}")
add_custom_command
(
add_custom_command
(
OUTPUT
${
RRC_FULL_DIR
}
/asn1_constants.h
OUTPUT
${
RRC_FULL_DIR
}
/asn1_constants.h
COMMAND
${
asn1c_call
}
${
RRC_FULL_DIR
}
${
RRC_GRAMMAR
}
COMMAND
${
asn1c_call
}
${
RRC_FULL_DIR
}
${
RRC_GRAMMAR
}
COMMAND
${
fix_asn1c_call
}
${
RRC_FULL_DIR
}
RRC
${
RRC_ASN1_VERSION
}
DEPENDS
${
RRC_GRAMMAR
}
DEPENDS
${
RRC_GRAMMAR
}
)
)
...
@@ -340,7 +353,21 @@ set(S1AP_ASN_FILES
...
@@ -340,7 +353,21 @@ set(S1AP_ASN_FILES
)
)
set
(
S1AP_C_DIR
${
asn1_generated_dir
}
/
${
ASN1RELDIR
}
)
set
(
S1AP_C_DIR
${
asn1_generated_dir
}
/
${
ASN1RELDIR
}
)
#message("calling ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES}")
#message("calling ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES}")
execute_process
(
COMMAND
${
asn1c_call
}
${
S1AP_C_DIR
}
${
S1AP_ASN_FILES
}
)
execute_process
(
COMMAND
${
asn1c_call
}
${
S1AP_C_DIR
}
${
S1AP_ASN_FILES
}
RESULT_VARIABLE ret
)
if
(
NOT
${
ret
}
STREQUAL 0
)
message
(
FATAL_ERROR
"
${
asn1c_call
}
: error"
)
endif
(
NOT
${
ret
}
STREQUAL 0
)
execute_process
(
COMMAND python
${
S1AP_DIR
}
/MESSAGES/ASN1/asn1tostruct.py -f
${
S1AP_ASN_DIR
}
/S1AP-PDU-Contents.asn -o
${
S1AP_C_DIR
}
RESULT_VARIABLE ret
)
if
(
NOT
${
ret
}
STREQUAL 0
)
message
(
FATAL_ERROR
"asn1tostruct.py: error"
)
endif
(
NOT
${
ret
}
STREQUAL 0
)
execute_process
(
COMMAND
${
fix_asn1c_call
}
${
S1AP_C_DIR
}
S1AP
${
S1AP_VERSION
}
RESULT_VARIABLE ret
)
if
(
NOT
${
ret
}
STREQUAL 0
)
message
(
FATAL_ERROR
"
${
fix_asn1c_call
}
: error"
)
endif
(
NOT
${
ret
}
STREQUAL 0
)
file
(
GLOB S1AP_source
${
S1AP_C_DIR
}
/*.c
)
file
(
GLOB S1AP_source
${
S1AP_C_DIR
}
/*.c
)
set
(
S1AP_OAI_generated
set
(
S1AP_OAI_generated
...
@@ -357,6 +384,7 @@ add_custom_command (
...
@@ -357,6 +384,7 @@ add_custom_command (
OUTPUT
${
S1AP_OAI_generated
}
OUTPUT
${
S1AP_OAI_generated
}
COMMAND
${
asn1c_call
}
${
S1AP_C_DIR
}
${
S1AP_ASN_FILES
}
COMMAND
${
asn1c_call
}
${
S1AP_C_DIR
}
${
S1AP_ASN_FILES
}
COMMAND python
${
S1AP_DIR
}
/MESSAGES/ASN1/asn1tostruct.py -f
${
S1AP_ASN_DIR
}
/S1AP-PDU-Contents.asn -o
${
S1AP_C_DIR
}
COMMAND python
${
S1AP_DIR
}
/MESSAGES/ASN1/asn1tostruct.py -f
${
S1AP_ASN_DIR
}
/S1AP-PDU-Contents.asn -o
${
S1AP_C_DIR
}
COMMAND
${
fix_asn1c_call
}
${
S1AP_C_DIR
}
S1AP
${
S1AP_VERSION
}
DEPENDS
${
S1AP_ASN_FILES
}
DEPENDS
${
S1AP_ASN_FILES
}
)
)
add_library
(
S1AP_LIB
add_library
(
S1AP_LIB
...
@@ -408,7 +436,21 @@ set(X2AP_ASN_FILES
...
@@ -408,7 +436,21 @@ set(X2AP_ASN_FILES
set
(
X2AP_C_DIR
${
asn1_generated_dir
}
/
${
ASN1RELDIR
}
)
set
(
X2AP_C_DIR
${
asn1_generated_dir
}
/
${
ASN1RELDIR
}
)
#message("calling ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES}")
#message("calling ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES}")
execute_process
(
COMMAND
${
asn1c_call
}
${
X2AP_C_DIR
}
${
X2AP_ASN_FILES
}
)
execute_process
(
COMMAND
${
asn1c_call
}
${
X2AP_C_DIR
}
${
X2AP_ASN_FILES
}
RESULT_VARIABLE ret
)
if
(
NOT
${
ret
}
STREQUAL 0
)
message
(
FATAL_ERROR
"
${
asn1c_call
}
: error"
)
endif
(
NOT
${
ret
}
STREQUAL 0
)
execute_process
(
COMMAND python
${
X2AP_DIR
}
/MESSAGES/ASN1/asn1tostruct.py -f
${
X2AP_ASN_DIR
}
/X2AP-PDU-Contents.asn -o
${
X2AP_C_DIR
}
RESULT_VARIABLE ret
)
if
(
NOT
${
ret
}
STREQUAL 0
)
message
(
FATAL_ERROR
"asn1tostruct.py: error"
)
endif
(
NOT
${
ret
}
STREQUAL 0
)
execute_process
(
COMMAND
${
fix_asn1c_call
}
${
X2AP_C_DIR
}
X2AP
${
X2AP_VERSION
}
RESULT_VARIABLE ret
)
if
(
NOT
${
ret
}
STREQUAL 0
)
message
(
FATAL_ERROR
"
${
fix_asn1c_call
}
: error"
)
endif
(
NOT
${
ret
}
STREQUAL 0
)
file
(
GLOB X2AP_source
${
X2AP_C_DIR
}
/*.c
)
file
(
GLOB X2AP_source
${
X2AP_C_DIR
}
/*.c
)
set
(
X2AP_OAI_generated
set
(
X2AP_OAI_generated
...
@@ -425,6 +467,7 @@ add_custom_command (
...
@@ -425,6 +467,7 @@ add_custom_command (
OUTPUT
${
X2AP_OAI_generated
}
OUTPUT
${
X2AP_OAI_generated
}
COMMAND
${
asn1c_call
}
${
X2AP_C_DIR
}
${
X2AP_ASN_FILES
}
COMMAND
${
asn1c_call
}
${
X2AP_C_DIR
}
${
X2AP_ASN_FILES
}
COMMAND python
${
X2AP_DIR
}
/MESSAGES/ASN1/asn1tostruct.py -f
${
X2AP_ASN_DIR
}
/X2AP-PDU-Contents.asn -o
${
X2AP_C_DIR
}
COMMAND python
${
X2AP_DIR
}
/MESSAGES/ASN1/asn1tostruct.py -f
${
X2AP_ASN_DIR
}
/X2AP-PDU-Contents.asn -o
${
X2AP_C_DIR
}
COMMAND
${
fix_asn1c_call
}
${
X2AP_C_DIR
}
X2AP
${
X2AP_VERSION
}
DEPENDS
${
X2AP_ASN_FILES
}
DEPENDS
${
X2AP_ASN_FILES
}
)
)
...
...
cmake_targets/autotests/run_compilation_autotests.bash
View file @
b8181d06
...
@@ -20,7 +20,7 @@ test_compile() {
...
@@ -20,7 +20,7 @@ test_compile() {
compile_prog
=
$2
compile_prog
=
$2
exec_prog
=
$3
exec_prog
=
$3
build_dir
=
$tdir
/
$1
/build
build_dir
=
$tdir
/
$1
/build
log_file
=
$tdir
/log/test.
$1
.txt
log_file
=
$tdir
/log/test.
$1
.
$2
.
$5
.
txt
target
=
$5
target
=
$5
echo
"Compiling test case
$test_name
. Log file =
$log_file
"
echo
"Compiling test case
$test_name
. Log file =
$log_file
"
rm
-fr
$build_dir
rm
-fr
$build_dir
...
@@ -34,10 +34,10 @@ test_compile() {
...
@@ -34,10 +34,10 @@ test_compile() {
if
[
-s
$exec_prog
]
;
then
if
[
-s
$exec_prog
]
;
then
cp
$exec_prog
$tdir
/bin/
`
basename
$exec_prog
`
.
$target
.
$test_name
cp
$exec_prog
$tdir
/bin/
`
basename
$exec_prog
`
.
$target
.
$test_name
echo_success
"
$test_name
$exec_prog
$target
compiled"
echo_success
"
$test_name
$exec_prog
$target
compiled"
xUnit_success
"compilation"
$test_name
"PASS"
1
xUnit_success
"compilation"
$test_name
"PASS"
1
"
$results_file
"
else
else
echo_error
"
$test_name
$exec_prog
$target
compilation failed"
echo_error
"
$test_name
$exec_prog
$target
compilation failed"
xUnit_fail
"compilation"
$test_name
"FAIL"
1
xUnit_fail
"compilation"
$test_name
"FAIL"
1
"
$results_file
"
fi
fi
}
}
...
...
cmake_targets/tools/fix_asn1
0 → 100755
View file @
b8181d06
#!/bin/bash
# in those arrays, each line is:
# <file> <sha1sum of file (without line 4 which changes depending on the location of the files)> <patch to apply to file>
RRC_Rel10
=(
"SystemInformation-r8-IEs.h"
603cd6615cff36ec7020692d72c0d6de7c4859cb
"fix_asn1.data/RRC.rel10/SystemInformation-r8-IEs.h.diff"
)
X2AP_Rel11_2
=(
"X2ap-CriticalityDiagnostics-IE-List.h"
ae96308b37fcbcbf39da5012e42968135fc5f27b
"fix_asn1.data/X2AP.rel11.2/X2ap-CriticalityDiagnostics-IE-List.h.diff"
"NativeInteger.c"
9f173e87daa1e7378618dbb060a10aae752d74be
"fix_asn1.data/X2AP.rel11.2/NativeInteger.c.diff"
"constr_SET_OF.c"
5c8765a1e0fc44a48e406d0aa7628004bf3aac2a
"fix_asn1.data/X2AP.rel11.2/constr_SET_OF.c.diff"
)
S1AP_Rel10_5
=(
"NativeInteger.c"
9f173e87daa1e7378618dbb060a10aae752d74be
"fix_asn1.data/S1AP.rel10.5/NativeInteger.c.diff"
"constr_SET_OF.c"
5c8765a1e0fc44a48e406d0aa7628004bf3aac2a
"fix_asn1.data/S1AP.rel10.5/constr_SET_OF.c.diff"
)
red_color
=
"
$(
tput setaf 1
)
"
green_color
=
"
$(
tput setaf 2
)
"
reset_color
=
"
$(
tput sgr0
)
"
function
error
()
{
echo
-e
"
$red_color
"
ERROR:
"
$@
""
$reset_color
"
exit
1
}
function
check_sha1
()
{
local
file
=
"
$1
"
local
target_sha1
=
"
$2
"
if
[
!
-f
"
$file
"
]
then
error
"
$file
: no such file"
fi
# we don't use the line 4 of the file
# it contains the location of the ASN1 grammar
# and this location is not the same on every
# installation (this is for *.h files, for *.c
# files it's no big deal to skip that line)
local
computed_sha1
=
$(
sed
4d
"
$file
"
|
sha1sum
|
cut
-f
1
-d
' '
)
if
[
"
$target_sha1
"
!=
"
$computed_sha1
"
]
then
error
"
$file
: wrong SHA1"
fi
}
function
patch_file
()
{
local
patch
=
"
$1
"
local
file
=
"
$2
"
echo
-e
"
$green_color
""patch file
$file
with
$OPENAIR_DIR
/cmake_targets/tools/
$patch
""
$reset_color
"
patch
"
$file
"
"
$OPENAIR_DIR
/cmake_targets/tools/
$patch
"
if
[
$?
-ne
0
]
then
error
"patching of
$file
with
$OPENAIR_DIR
/cmake_targets/tools/
$patch
failed"
fi
}
function
apply_patches
()
{
local
directory
=
"
$1
"
local
array
=
$2
local
len
=
$3
# the length could be computed locally but the way to do it is not clear to me [CROUX]
local
i
local
file
local
sha1
local
patch
local
item
for
((
i
=
0
;
i <
$len
;
i +
=
3
))
do
# special bash syntax to access the array
item
=
$array
[
$i
]
;
file
=
${
!item
}
item
=
$array
[
$((
i+1
))
]
;
sha1
=
${
!item
}
item
=
$array
[
$((
i+2
))
]
;
patch
=
${
!item
}
check_sha1
"
$directory
/
$file
"
"
$sha1
"
patch_file
"
$patch
"
"
$directory
/
$file
"
done
}
function
patch_rrc
()
{
local
directory
=
"
$1
"
local
version
=
"
$2
"
case
"
$version
"
in
Rel10
)
echo
"patching RRC files release 10"
apply_patches
"
$directory
"
RRC_Rel10
${#
RRC_Rel10
[*]
}
;;
Rel8
)
echo
"patching RRC files release 8 TODO?"
;;
*
)
error unknwon/unhandled RRC version
\'
"
$version
"
\'
;;
esac
}
function
patch_x2ap
()
{
local
directory
=
"
$1
"
local
version
=
"
$2
"
case
"
$version
"
in
R11
)
echo
"patching X2AP files release 11.2"
apply_patches
"
$directory
"
X2AP_Rel11_2
${#
X2AP_Rel11_2
[*]
}
;;
*
)
error unknwon/unhandled X2AP version
\'
"
$version
"
\'
;;
esac
}
function
patch_s1ap
()
{
local
directory
=
"
$1
"
local
version
=
"
$2
"
case
"
$version
"
in
R10
)
echo
"patching S1AP files release 10.5"
apply_patches
"
$directory
"
S1AP_Rel10_5
${#
S1AP_Rel10_5
[*]
}
;;
*
)
error unknwon/unhandled S1AP version
\'
"
$version
"
\'
;;
esac
}
function
main
()
{
if
[
$#
-ne
3
]
then
echo
"ERROR: pass <output directory> <module> <version>"
exit
1
fi
if
[
x
"
$OPENAIR_DIR
"
=
x
]
then
error
"the variable OPENAIR_DIR is not set"
fi
local
directory
=
"
$1
"
local
module
=
"
$2
"
local
version
=
"
$3
"
case
"
$module
"
in
RRC
)
patch_rrc
"
$directory
"
"
$version
"
;;
X2AP
)
patch_x2ap
"
$directory
"
"
$version
"
;;
S1AP
)
patch_s1ap
"
$directory
"
"
$version
"
;;
*
)
error unknown module
"
$module
"
;;
esac
exit
0
}
main
"
$@
"
cmake_targets/tools/fix_asn1.data/RRC.rel10/SystemInformation-r8-IEs.h.diff
0 → 100644
View file @
b8181d06
57,61d56
< /* SystemInformation-r8-IEs */
< typedef struct SystemInformation_r8_IEs {
< struct SystemInformation_r8_IEs__sib_TypeAndInfo {
< A_SEQUENCE_OF(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member {
< SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR present;
79c74,78
< } choice;
---
> };
>
> struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member {
> SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR present;
> union SystemInformation_r8_IEs__sib_TypeAndInfo__Member_u choice;
83c82,87
< } ) list;
---
> };
>
> /* SystemInformation-r8-IEs */
> typedef struct SystemInformation_r8_IEs {
> struct SystemInformation_r8_IEs__sib_TypeAndInfo {
> A_SEQUENCE_OF(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member) list;
cmake_targets/tools/fix_asn1.data/S1AP.rel10.5/NativeInteger.c.diff
0 → 100644
View file @
b8181d06
283c283
< int dynamic = 0;
---
> //int dynamic = 0;
290c290
< dynamic = 1;
---
> //dynamic = 1;
cmake_targets/tools/fix_asn1.data/S1AP.rel10.5/constr_SET_OF.c.diff
0 → 100644
View file @
b8181d06
1007c1007
< (int)nelems, (int)ct ? ct->effective_bits : -1);
---
> (int)nelems, ct ? ct->effective_bits : -1);
cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/NativeInteger.c.diff
0 → 100644
View file @
b8181d06
283c283
< int dynamic = 0;
---
> //int dynamic = 0;
290c290
< dynamic = 1;
---
> //dynamic = 1;
cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/X2ap-CriticalityDiagnostics-IE-List.h.diff
0 → 100644
View file @
b8181d06
29,31c29
< /* X2ap-CriticalityDiagnostics-IE-List */
< typedef struct X2ap_CriticalityDiagnostics_IE_List {
< A_SEQUENCE_OF(struct X2ap_CriticalityDiagnostics_IE_List__Member {
---
> struct X2ap_CriticalityDiagnostics_IE_List__Member {
43c41,46
< } ) list;
---
> };
>
> /* X2ap-CriticalityDiagnostics-IE-List */
> typedef struct X2ap_CriticalityDiagnostics_IE_List {
> A_SEQUENCE_OF(struct X2ap_CriticalityDiagnostics_IE_List__Member
> ) list;
cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/constr_SET_OF.c.diff
0 → 100644
View file @
b8181d06
1007c1007
< (int)nelems, (int)ct ? ct->effective_bits : -1);
---
> (int)nelems, ct ? ct->effective_bits : -1);
cmake_targets/tools/test_helper
View file @
b8181d06
...
@@ -35,7 +35,7 @@ xUnit_fail() {
...
@@ -35,7 +35,7 @@ xUnit_fail() {
currtime=$(date +%s.%N)
currtime=$(date +%s.%N)
time=$(echo "$currtime - $XUNIT_START" | bc -l)
time=$(echo "$currtime - $XUNIT_START" | bc -l)
xml="<testcase classname='$class' name='$test_case' Run_result='$run_result' time='$time s' RESULT='$result'></testcase>"
xml="<testcase classname='$class' name='$test_case' Run_result='$run_result' time='$time s' RESULT='$result'></testcase>"
echo -e
$xml >> $xmlfile_testcase
echo -e
"$xml" >> "$xmlfile_testcase"
XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml"
XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml"
XUNIT_FAILED=$((XUNIT_FAILED+1))
XUNIT_FAILED=$((XUNIT_FAILED+1))
}
}
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
b8181d06
...
@@ -226,8 +226,13 @@ void rx_sdu(const module_id_t enb_mod_idP,
...
@@ -226,8 +226,13 @@ void rx_sdu(const module_id_t enb_mod_idP,
for
(
i
=
0
;
i
<
num_sdu
;
i
++
)
{
for
(
i
=
0
;
i
<
num_sdu
;
i
++
)
{
LOG_D
(
MAC
,
"SDU Number %d MAC Subheader SDU_LCID %d, length %d
\n
"
,
i
,
rx_lcids
[
i
],
rx_lengths
[
i
]);
LOG_D
(
MAC
,
"SDU Number %d MAC Subheader SDU_LCID %d, length %d
\n
"
,
i
,
rx_lcids
[
i
],
rx_lengths
[
i
]);
if
(
rx_lcids
[
i
]
==
CCCH
)
{
switch
(
rx_lcids
[
i
])
{
case
CCCH
:
if
(
rx_lengths
[
i
]
>
CCCH_PAYLOAD_SIZE_MAX
)
{
LOG_E
(
MAC
,
"[eNB %d/%d] frame %d received CCCH of size %d (too big, maximum allowed is %d), dropping packet
\n
"
,
enb_mod_idP
,
CC_idP
,
frameP
,
rx_lengths
[
i
],
CCCH_PAYLOAD_SIZE_MAX
);
break
;
}
LOG_I
(
MAC
,
"[eNB %d][RAPROC] CC_id %d Frame %d, Received CCCH: %x.%x.%x.%x.%x.%x, Terminating RA procedure for UE rnti %x
\n
"
,
LOG_I
(
MAC
,
"[eNB %d][RAPROC] CC_id %d Frame %d, Received CCCH: %x.%x.%x.%x.%x.%x, Terminating RA procedure for UE rnti %x
\n
"
,
enb_mod_idP
,
CC_idP
,
frameP
,
enb_mod_idP
,
CC_idP
,
frameP
,
payload_ptr
[
0
],
payload_ptr
[
1
],
payload_ptr
[
2
],
payload_ptr
[
3
],
payload_ptr
[
4
],
payload_ptr
[
5
],
rntiP
);
payload_ptr
[
0
],
payload_ptr
[
1
],
payload_ptr
[
2
],
payload_ptr
[
3
],
payload_ptr
[
4
],
payload_ptr
[
5
],
rntiP
);
...
@@ -283,9 +288,11 @@ void rx_sdu(const module_id_t enb_mod_idP,
...
@@ -283,9 +288,11 @@ void rx_sdu(const module_id_t enb_mod_idP,
}
// if process is active
}
// if process is active
}
// loop on RA processes
}
// loop on RA processes
break
;
case
DCCH
:
}
else
if
((
rx_lcids
[
i
]
==
DCCH
)
||
(
rx_lcids
[
i
]
==
DCCH1
))
{
case
DCCH1
:
// if(eNB_mac_inst[module_idP][CC_idP].Dcch_lchan[UE_id].Active==1){
// if(eNB_mac_inst[module_idP][CC_idP].Dcch_lchan[UE_id].Active==1){
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
...
@@ -297,31 +304,32 @@ void rx_sdu(const module_id_t enb_mod_idP,
...
@@ -297,31 +304,32 @@ void rx_sdu(const module_id_t enb_mod_idP,
#endif
#endif
if
(
UE_id
!=
-
1
)
{
if
(
UE_id
!=
-
1
)
{
// This check is just to make sure we didn't get a bogus SDU length, to be removed ...
LOG_D
(
MAC
,
"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DCCH, received %d bytes form UE %d on LCID %d
\n
"
,
if
(
rx_lengths
[
i
]
<
CCCH_PAYLOAD_SIZE_MAX
)
{
enb_mod_idP
,
CC_idP
,
frameP
,
rx_lengths
[
i
],
UE_id
,
rx_lcids
[
i
]);
LOG_D
(
MAC
,
"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DCCH%d, received %d bytes form UE %d
\n
"
,
enb_mod_idP
,
CC_idP
,
frameP
,
rx_lcids
[
i
],
rx_lengths
[
i
],
UE_id
);
mac_rlc_data_ind
(
enb_mod_idP
,
mac_rlc_data_ind
(
rntiP
,
enb_mod_idP
,
enb_mod_idP
,
rntiP
,
frameP
,
enb_mod_idP
,
ENB_FLAG_YES
,
frameP
,
MBMS_FLAG_NO
,
ENB_FLAG_YES
,
rx_lcids
[
i
],
MBMS_FLAG_NO
,
(
char
*
)
payload_ptr
,
rx_lcids
[
i
],
rx_lengths
[
i
],
(
char
*
)
payload_ptr
,
1
,
rx_lengths
[
i
],
NULL
);
//(unsigned int*)crc_status);
1
,
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_pdu_rx
[
rx_lcids
[
i
]]
+=
1
;
NULL
);
//(unsigned int*)crc_status);
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_bytes_rx
[
rx_lcids
[
i
]]
+=
rx_lengths
[
i
];
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_pdu_rx
[
rx_lcids
[
i
]]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_bytes_rx
[
rx_lcids
[
i
]]
+=
rx_lengths
[
i
];
}
}
/* UE_id != -1 */
}
/* UE_id != -1 */
}
else
if
((
rx_lcids
[
i
]
<
NB_RB_MAX
)
&&
(
rx_lcids
[
i
]
>
DCCH1
))
{
// }
LOG_I
(
MAC
,
"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DTCH%d, received %d bytes form UE %d
\n
"
,
break
;
enb_mod_idP
,
CC_idP
,
frameP
,
rx_lcids
[
i
],
rx_lengths
[
i
],
UE_id
);
// all the DRBS
case
DTCH
:
default
:
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
LOG_T
(
MAC
,
"offset: %d
\n
"
,(
unsigned
char
)((
unsigned
char
*
)
payload_ptr
-
sduP
));
LOG_T
(
MAC
,
"offset: %d
\n
"
,(
unsigned
char
)((
unsigned
char
*
)
payload_ptr
-
sduP
));
...
@@ -330,34 +338,44 @@ void rx_sdu(const module_id_t enb_mod_idP,
...
@@ -330,34 +338,44 @@ void rx_sdu(const module_id_t enb_mod_idP,
}
}
LOG_T
(
MAC
,
"
\n
"
);
LOG_T
(
MAC
,
"
\n
"
);
#endif
#endif
if
(
rx_lcids
[
i
]
<
NB_RB_MAX
)
{
if
(
UE_id
!=
-
1
)
{
LOG_D
(
MAC
,
"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DTCH, received %d bytes from UE %d for lcid %d
\n
"
,
if
((
rx_lengths
[
i
]
<
SCH_PAYLOAD_SIZE_MAX
)
&&
(
rx_lengths
[
i
]
>
0
)
)
{
// MAX SIZE OF transport block
enb_mod_idP
,
CC_idP
,
frameP
,
rx_lengths
[
i
],
UE_id
,
rx_lcids
[
i
]);
mac_rlc_data_ind
(
enb_mod_idP
,
if
(
UE_id
!=
-
1
)
{
rntiP
,
if
((
rx_lengths
[
i
]
<
SCH_PAYLOAD_SIZE_MAX
)
&&
(
rx_lengths
[
i
]
>
0
)
)
{
// MAX SIZE OF transport block
enb_mod_idP
,
mac_rlc_data_ind
(
frameP
,
enb_mod_idP
,
ENB_FLAG_YES
,
rntiP
,
MBMS_FLAG_NO
,
enb_mod_idP
,
rx_lcids
[
i
],
frameP
,
(
char
*
)
payload_ptr
,
ENB_FLAG_YES
,
rx_lengths
[
i
],
MBMS_FLAG_NO
,
1
,
rx_lcids
[
i
],
NULL
);
//(unsigned int*)crc_status);
(
char
*
)
payload_ptr
,
rx_lengths
[
i
],
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_pdu_rx
[
rx_lcids
[
i
]]
+=
1
;
1
,
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_bytes_rx
[
rx_lcids
[
i
]]
+=
rx_lengths
[
i
];
NULL
);
//(unsigned int*)crc_status);
}
}
else
{
/* UE_id != -1 */
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_pdu_rx
[
rx_lcids
[
i
]]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_errors_rx
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_bytes_rx
[
rx_lcids
[
i
]]
+=
rx_lengths
[
i
];
}
}
}
else
{
else
{
/* rx_length[i] */
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_errors_rx
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_errors_rx
+=
1
;
LOG_E
(
MAC
,
"[eNB %d] CC_id %d Frame %d : received unsupported or unknown LCID %d from UE %d "
,
LOG_E
(
MAC
,
"[eNB %d] CC_id %d Frame %d : Max size of transport block reached LCID %d from UE %d "
,
enb_mod_idP
,
CC_idP
,
frameP
,
rx_lcids
[
i
],
UE_id
);
enb_mod_idP
,
CC_idP
,
frameP
,
rx_lcids
[
i
],
UE_id
);
}
}
else
{
/*(UE_id != -1*/
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_errors_rx
+=
1
;
LOG_E
(
MAC
,
"[eNB %d] CC_id %d Frame %d : received unsupported or unknown LCID %d from UE %d "
,
enb_mod_idP
,
CC_idP
,
frameP
,
rx_lcids
[
i
],
UE_id
);
}
}
break
;
}
}
payload_ptr
+=
rx_lengths
[
i
];
payload_ptr
+=
rx_lengths
[
i
];
}
}
...
...
openair2/RRC/LITE/defs.h
View file @
b8181d06
...
@@ -228,6 +228,7 @@ typedef enum e_rab_satus_e {
...
@@ -228,6 +228,7 @@ typedef enum e_rab_satus_e {
typedef
struct
e_rab_param_s
{
typedef
struct
e_rab_param_s
{
e_rab_t
param
;
e_rab_t
param
;
uint8_t
status
;
uint8_t
status
;
uint8_t
xid
;
// transaction_id
}
__attribute__
((
__packed__
))
e_rab_param_t
;
}
__attribute__
((
__packed__
))
e_rab_param_t
;
#endif
#endif
...
...
openair2/RRC/LITE/rrc_eNB.c
View file @
b8181d06
...
@@ -1280,6 +1280,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
...
@@ -1280,6 +1280,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
}
}
ue_context_pP
->
ue_context
.
e_rab
[
i
].
status
=
E_RAB_STATUS_DONE
;
ue_context_pP
->
ue_context
.
e_rab
[
i
].
status
=
E_RAB_STATUS_DONE
;
ue_context_pP
->
ue_context
.
e_rab
[
i
].
xid
=
rrc_eNB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
);
//Transaction_id,
}
}
...
@@ -1287,7 +1288,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
...
@@ -1287,7 +1288,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
size
=
do_RRCConnectionReconfiguration
(
ctxt_pP
,
size
=
do_RRCConnectionReconfiguration
(
ctxt_pP
,
buffer
,
buffer
,
rrc_eNB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
),
//Transaction_
id,
ue_context_pP
->
ue_context
.
e_rab
[
i
].
x
id
,
(
SRB_ToAddModList_t
*
)
NULL
,
(
SRB_ToAddModList_t
*
)
NULL
,
(
DRB_ToAddModList_t
*
)
*
DRB_configList
,
(
DRB_ToAddModList_t
*
)
*
DRB_configList
,
(
DRB_ToReleaseList_t
*
)
NULL
,
// DRB2_list,
(
DRB_ToReleaseList_t
*
)
NULL
,
// DRB2_list,
...
@@ -4244,6 +4245,7 @@ rrc_eNB_decode_dcch(
...
@@ -4244,6 +4245,7 @@ rrc_eNB_decode_dcch(
rrcConnectionReconfigurationComplete
.
rrcConnectionReconfigurationComplete
.
criticalExtensions
.
choice
.
criticalExtensions
.
choice
.
rrcConnectionReconfigurationComplete_r8
);
rrcConnectionReconfigurationComplete_r8
);
/*NN: revise the condition */
if
(
ue_context_p
->
ue_context
.
Status
==
RRC_RECONFIGURED
){
if
(
ue_context_p
->
ue_context
.
Status
==
RRC_RECONFIGURED
){
dedicated_DRB
=
1
;
dedicated_DRB
=
1
;
LOG_I
(
RRC
,
LOG_I
(
RRC
,
...
@@ -4261,7 +4263,8 @@ rrc_eNB_decode_dcch(
...
@@ -4261,7 +4263,8 @@ rrc_eNB_decode_dcch(
if
(
EPC_MODE_ENABLED
==
1
)
{
if
(
EPC_MODE_ENABLED
==
1
)
{
if
(
dedicated_DRB
==
1
){
if
(
dedicated_DRB
==
1
){
rrc_eNB_send_S1AP_E_RAB_SETUP_RESP
(
ctxt_pP
,
rrc_eNB_send_S1AP_E_RAB_SETUP_RESP
(
ctxt_pP
,
ue_context_p
);
ue_context_p
,
ul_dcch_msg
->
message
.
choice
.
c1
.
choice
.
rrcConnectionReconfigurationComplete
.
rrc_TransactionIdentifier
);
}
else
{
}
else
{
rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP
(
ctxt_pP
,
rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP
(
ctxt_pP
,
ue_context_p
);
ue_context_p
);
...
...
openair2/RRC/LITE/rrc_eNB_S1AP.c
View file @
b8181d06
/*******************************************************************************
/*******************************************************************************
OpenAirInterface
OpenAirInterface
Copyright(c) 1999 - 201
4
Eurecom
Copyright(c) 1999 - 201
6
Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
@@ -28,8 +28,8 @@
...
@@ -28,8 +28,8 @@
*******************************************************************************/
*******************************************************************************/
/*! \file rrc_eNB_S1AP.c
/*! \file rrc_eNB_S1AP.c
* \brief rrc S1AP procedures for eNB
* \brief rrc S1AP procedures for eNB
* \author Laurent Winckel
and Sebastien ROUX and
Navid Nikaein and Lionel GAUTHIER
* \author Laurent Winckel
, Sebastien ROUX,
Navid Nikaein and Lionel GAUTHIER
* \date 2013-201
4
* \date 2013-201
6
* \version 1.0
* \version 1.0
* \company Eurecom
* \company Eurecom
* \email: navid.nikaein@eurecom.fr
* \email: navid.nikaein@eurecom.fr
...
@@ -1325,8 +1325,10 @@ int rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(MessageDef *msg_p, const char *msg_name
...
@@ -1325,8 +1325,10 @@ int rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(MessageDef *msg_p, const char *msg_name
}
}
}
}
rrc_eNB_send_S1AP_E_RAB_SETUP_RESP
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
/*NN: careful about the typcast of xid (long -> uint8_t*/
rrc_eNB_ue_context_t
*
const
ue_context_pP
){
int
rrc_eNB_send_S1AP_E_RAB_SETUP_RESP
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_eNB_ue_context_t
*
const
ue_context_pP
,
uint8_t
xid
){
MessageDef
*
msg_p
=
NULL
;
MessageDef
*
msg_p
=
NULL
;
int
e_rab
;
int
e_rab
;
...
@@ -1337,58 +1339,72 @@ rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(const protocol_ctxt_t* const ctxt_pP,
...
@@ -1337,58 +1339,72 @@ rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(const protocol_ctxt_t* const ctxt_pP,
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
eNB_ue_s1ap_id
=
ue_context_pP
->
ue_context
.
eNB_ue_s1ap_id
;
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
eNB_ue_s1ap_id
=
ue_context_pP
->
ue_context
.
eNB_ue_s1ap_id
;
for
(
e_rab
=
0
;
e_rab
<
ue_context_pP
->
ue_context
.
setup_e_rabs
;
e_rab
++
)
{
for
(
e_rab
=
0
;
e_rab
<
ue_context_pP
->
ue_context
.
setup_e_rabs
;
e_rab
++
)
{
/* only respond to the corresponding transaction */
if
(
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
==
E_RAB_STATUS_DONE
)
{
if
(
xid
==
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
xid
)
{
if
(
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
==
E_RAB_STATUS_DONE
)
{
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
e_rab_id
=
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
param
.
e_rab_id
;
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
e_rab_id
=
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
param
.
e_rab_id
;
// TODO add other information from S1-U when it will be integrated
// TODO add other information from S1-U when it will be integrated
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
gtp_teid
=
ue_context_pP
->
ue_context
.
enb_gtp_teid
[
e_rab
];
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
gtp_teid
=
ue_context_pP
->
ue_context
.
enb_gtp_teid
[
e_rab
];
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
eNB_addr
=
ue_context_pP
->
ue_context
.
enb_gtp_addrs
[
e_rab
];
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
eNB_addr
=
ue_context_pP
->
ue_context
.
enb_gtp_addrs
[
e_rab
];
//S1AP_E_RAB_SETUP_RESP (msg_p).e_rabs[e_rab].eNB_addr.length += 4;
//S1AP_E_RAB_SETUP_RESP (msg_p).e_rabs[e_rab].eNB_addr.length += 4;
ue_context_pP
->
ue_context
.
e_rab
[
e_rabs_done
].
status
=
E_RAB_STATUS_ESTABLISHED
;
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
=
E_RAB_STATUS_ESTABLISHED
;
LOG_I
(
RRC
,
"enb_gtp_addr (msg index %d, context index %d, status %d, xid %d): nb_of_e_rabs %d, e_rab_id %d, teid: %u, addr: %d.%d.%d.%d
\n
"
,
e_rabs_done
,
e_rab
,
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
,
xid
,
ue_context_pP
->
ue_context
.
nb_of_e_rabs
,
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
e_rab_id
,
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
gtp_teid
,
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
eNB_addr
.
buffer
[
0
],
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
eNB_addr
.
buffer
[
1
],
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
eNB_addr
.
buffer
[
2
],
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
eNB_addr
.
buffer
[
3
]);
e_rabs_done
++
;
}
else
if
((
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
==
E_RAB_STATUS_NEW
)
||
(
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
==
E_RAB_STATUS_ESTABLISHED
)){
LOG_D
(
RRC
,
"E-RAB is NEW or already ESTABLISHED
\n
"
);
}
else
{
/* to be improved */
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
=
E_RAB_STATUS_FAILED
;
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs_failed
[
e_rabs_failed
].
e_rab_id
=
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
param
.
e_rab_id
;
e_rabs_failed
++
;
// TODO add cause when it will be integrated
}
LOG_I
(
RRC
,
"enb_gtp_addr (msg index %d, context index %d, status %d): nb_of_e_rabs %d, e_rab_id %d, teid: %u, addr: %d.%d.%d.%d
\n
"
,
e_rabs_done
,
e_rab
,
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
,
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
nb_of_e_rabs
=
e_rabs_done
;
ue_context_pP
->
ue_context
.
nb_of_e_rabs
,
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
nb_of_e_rabs_failed
=
e_rabs_failed
;
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
e_rab_id
,
// NN: add conditions for e_rabs_failed
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
gtp_teid
,
if
((
e_rabs_done
>
0
)
){
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
eNB_addr
.
buffer
[
0
],
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
eNB_addr
.
buffer
[
1
],
LOG_I
(
RRC
,
"S1AP_E_RAB_SETUP_RESP: sending the message: nb_of_erabs %d, total e_rabs %d, index %d
\n
"
,
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
eNB_addr
.
buffer
[
2
],
ue_context_pP
->
ue_context
.
nb_of_e_rabs
,
ue_context_pP
->
ue_context
.
setup_e_rabs
,
e_rab
);
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs
[
e_rabs_done
].
eNB_addr
.
buffer
[
3
]);
MSC_LOG_TX_MESSAGE
(
MSC_RRC_ENB
,
MSC_S1AP_ENB
,
(
const
char
*
)
&
S1AP_E_RAB_SETUP_RESP
(
msg_p
),
sizeof
(
s1ap_e_rab_setup_resp_t
),
MSC_AS_TIME_FMT
" E_RAB_SETUP_RESP UE %X eNB_ue_s1ap_id %u e_rabs:%u succ %u fail"
,
MSC_AS_TIME_ARGS
(
ctxt_pP
),
ue_context_pP
->
ue_id_rnti
,
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
eNB_ue_s1ap_id
,
e_rabs_done
,
e_rabs_failed
);
itti_send_msg_to_task
(
TASK_S1AP
,
ctxt_pP
->
instance
,
msg_p
);
}
e_rabs_done
++
;
}
else
{
}
else
if
((
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
==
E_RAB_STATUS_NEW
)
||
/*debug info for the xid */
(
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
==
E_RAB_STATUS_ESTABLISHED
)){
LOG_D
(
RRC
,
"xid does not corresponds (context e_rab index %d, status %d, xid %d)
\n
"
,
LOG_D
(
RRC
,
"E-RAB is NEW or already ESTABLISHED
\n
"
);
e_rab
,
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
,
xid
);
}
else
{
ue_context_pP
->
ue_context
.
e_rab
[
e_rabs_failed
].
status
=
E_RAB_STATUS_FAILED
;
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
e_rabs_failed
[
e_rabs_failed
].
e_rab_id
=
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
param
.
e_rab_id
;
e_rabs_failed
++
;
// TODO add cause when it will be integrated
}
}
}
}
LOG_I
(
RRC
,
"S1AP_E_RAB_SETUP_RESP: nb_of_erabs %d, total e_rabs %d, index %d
\n
"
,
return
0
;
ue_context_pP
->
ue_context
.
nb_of_e_rabs
,
ue_context_pP
->
ue_context
.
setup_e_rabs
,
e_rab
);
MSC_LOG_TX_MESSAGE
(
MSC_RRC_ENB
,
MSC_S1AP_ENB
,
(
const
char
*
)
&
S1AP_E_RAB_SETUP_RESP
(
msg_p
),
sizeof
(
s1ap_e_rab_setup_resp_t
),
MSC_AS_TIME_FMT
" E_RAB_SETUP_RESP UE %X eNB_ue_s1ap_id %u e_rabs:%u succ %u fail"
,
MSC_AS_TIME_ARGS
(
ctxt_pP
),
ue_context_pP
->
ue_id_rnti
,
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
eNB_ue_s1ap_id
,
e_rabs_done
,
e_rabs_failed
);
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
nb_of_e_rabs
=
e_rabs_done
;
S1AP_E_RAB_SETUP_RESP
(
msg_p
).
nb_of_e_rabs_failed
=
e_rabs_failed
;
if
((
e_rabs_done
>
0
)
)
itti_send_msg_to_task
(
TASK_S1AP
,
ctxt_pP
->
instance
,
msg_p
);
}
}
# endif
/* defined(ENABLE_ITTI) */
# endif
/* defined(ENABLE_ITTI) */
...
...
openair2/RRC/LITE/rrc_eNB_S1AP.h
View file @
b8181d06
...
@@ -164,6 +164,25 @@ int rrc_eNB_process_S1AP_DOWNLINK_NAS(MessageDef *msg_p, const char *msg_name, i
...
@@ -164,6 +164,25 @@ int rrc_eNB_process_S1AP_DOWNLINK_NAS(MessageDef *msg_p, const char *msg_name, i
*/
*/
int
rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ
(
MessageDef
*
msg_p
,
const
char
*
msg_name
,
instance_t
instance
);
int
rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ
(
MessageDef
*
msg_p
,
const
char
*
msg_name
,
instance_t
instance
);
/*! \fn rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(MessageDef *msg_p, const char *msg_name, instance_t instance);
*\brief process a S1AP dedicated E_RAB setup request message received from S1AP.
*\param msg_p Message received by RRC.
*\param msg_name Message name.
*\param instance Message instance.
*\return 0 when successful, -1 if the UE index can not be retrieved.
*/
int
rrc_eNB_process_S1AP_E_RAB_SETUP_REQ
(
MessageDef
*
msg_p
,
const
char
*
msg_name
,
instance_t
instance
);
/*! \fn rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(const protocol_ctxt_t* const ctxt_pP, rrc_eNB_ue_context_t* const ue_context_pP, uint8_t xid )
*\brief send a S1AP dedicated E_RAB setup response
*\param ctxt_pP contxt infirmation
*\param e_contxt_pP ue specific context at the eNB
*\param xid transaction identifier
*\return 0 when successful, -1 if the UE index can not be retrieved.
*/
int
rrc_eNB_send_S1AP_E_RAB_SETUP_RESP
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_eNB_ue_context_t
*
const
ue_context_pP
,
uint8_t
xid
);
/*! \fn rrc_eNB_process_S1AP_UE_CTXT_MODIFICATION_REQ(MessageDef *msg_p, const char *msg_name, instance_t instance)
/*! \fn rrc_eNB_process_S1AP_UE_CTXT_MODIFICATION_REQ(MessageDef *msg_p, const char *msg_name, instance_t instance)
*\brief process a S1AP_UE_CTXT_MODIFICATION_REQ message received from S1AP.
*\brief process a S1AP_UE_CTXT_MODIFICATION_REQ message received from S1AP.
*\param msg_p Message received by RRC.
*\param msg_p Message received by RRC.
...
...
targets/ARCH/COMMON/common_lib.c
View file @
b8181d06
...
@@ -103,14 +103,18 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
...
@@ -103,14 +103,18 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
if
(
flag
==
BBU_LOCAL_RADIO_HEAD
)
{
if
(
flag
==
BBU_LOCAL_RADIO_HEAD
)
{
lib_handle
=
dlopen
(
OAI_RF_LIBNAME
,
RTLD_LAZY
);
lib_handle
=
dlopen
(
OAI_RF_LIBNAME
,
RTLD_LAZY
);
if
(
!
lib_handle
)
{
if
(
!
lib_handle
)
{
printf
(
"Unable to locate %s: HW device set to NONE_DEV.
\n
"
,
OAI_RF_LIBNAME
);
fprintf
(
stderr
,
"Unable to locate %s: HW device set to NONE_DEV.
\n
"
,
OAI_RF_LIBNAME
);
return
0
;
fprintf
(
stderr
,
"%s
\n
"
,
dlerror
());
return
-
1
;
}
}
dp
=
dlsym
(
lib_handle
,
"device_init"
);
dp
=
dlsym
(
lib_handle
,
"device_init"
);
if
(
dp
!=
NULL
)
{
if
(
dp
!=
NULL
)
{
dp
(
device
,
openair0_cfg
);
if
(
dp
(
device
,
openair0_cfg
)
!=
0
)
{
fprintf
(
stderr
,
"Error initializing device
\n
"
);
return
-
1
;
}
}
else
{
}
else
{
fprintf
(
stderr
,
"%s %d:oai device intializing function not found %s
\n
"
,
__FILE__
,
__LINE__
,
dlerror
());
fprintf
(
stderr
,
"%s %d:oai device intializing function not found %s
\n
"
,
__FILE__
,
__LINE__
,
dlerror
());
return
-
1
;
return
-
1
;
...
@@ -119,7 +123,8 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
...
@@ -119,7 +123,8 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
lib_handle
=
dlopen
(
OAI_TP_LIBNAME
,
RTLD_LAZY
);
lib_handle
=
dlopen
(
OAI_TP_LIBNAME
,
RTLD_LAZY
);
if
(
!
lib_handle
)
{
if
(
!
lib_handle
)
{
printf
(
"Unable to locate %s: transport protocol set to NONE_TP.
\n
"
,
OAI_TP_LIBNAME
);
printf
(
"Unable to locate %s: transport protocol set to NONE_TP.
\n
"
,
OAI_TP_LIBNAME
);
return
0
;
printf
(
"%s
\n
"
,
dlerror
());
return
-
1
;
}
}
tp
=
dlsym
(
lib_handle
,
"transport_init"
);
tp
=
dlsym
(
lib_handle
,
"transport_init"
);
...
@@ -152,7 +157,7 @@ int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cf
...
@@ -152,7 +157,7 @@ int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cf
}
}
}
}
#endif
#endif
return
0
;
return
rc
;
}
}
int
openair0_transport_load
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
,
eth_params_t
*
eth_params
)
{
int
openair0_transport_load
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
,
eth_params_t
*
eth_params
)
{
...
@@ -164,7 +169,7 @@ int openair0_transport_load(openair0_device *device, openair0_config_t *openair0
...
@@ -164,7 +169,7 @@ int openair0_transport_load(openair0_device *device, openair0_config_t *openair0
return
-
1
;
return
-
1
;
}
}
}
}
return
0
;
return
rc
;
}
}
...
...
targets/ARCH/LMSSDR/USERSPACE/LIB/Si5351C/CMakeLists.txt
View file @
b8181d06
...
@@ -2,7 +2,7 @@ set(si5351_src_files
...
@@ -2,7 +2,7 @@ set(si5351_src_files
Si5351C.cpp
Si5351C.cpp
)
)
set
(
CMAKE_CXX_FLAGS
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
C_FLAGS_PROCESSOR
}
-std=c++11 "
"
${
CMAKE_CXX_FLAGS
}
${
C_FLAGS_PROCESSOR
}
-std=c++11
-fPIC
"
)
)
...
...
targets/ARCH/LMSSDR/USERSPACE/LIB/lms7002m/CMakeLists.txt
View file @
b8181d06
...
@@ -9,7 +9,7 @@ if(${CMAKE_MAJOR_VERSION} GREATER 2)
...
@@ -9,7 +9,7 @@ if(${CMAKE_MAJOR_VERSION} GREATER 2)
endif
()
endif
()
ADD_DEFINITIONS
(
-D_CRT_SECURE_NO_WARNINGS
)
ADD_DEFINITIONS
(
-D_CRT_SECURE_NO_WARNINGS
)
if
(
CMAKE_COMPILER_IS_GNUCXX
)
if
(
CMAKE_COMPILER_IS_GNUCXX
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++0x"
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++0x
-fPIC
"
)
endif
()
endif
()
# set up include-directories
# set up include-directories
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.usrpb210.conf
View file @
b8181d06
...
@@ -133,7 +133,7 @@ eNBs =
...
@@ -133,7 +133,7 @@ eNBs =
//////////
MME
parameters
:
//////////
MME
parameters
:
mme_ip_address
= ( {
ipv4
=
"1
72.27.8.52
"
;
mme_ip_address
= ( {
ipv4
=
"1
92.168.12.170
"
;
ipv6
=
"192:168:30::17"
;
ipv6
=
"192:168:30::17"
;
active
=
"yes"
;
active
=
"yes"
;
preference
=
"ipv4"
;
preference
=
"ipv4"
;
...
@@ -143,10 +143,10 @@ eNBs =
...
@@ -143,10 +143,10 @@ eNBs =
NETWORK_INTERFACES
:
NETWORK_INTERFACES
:
{
{
ENB_INTERFACE_NAME_FOR_S1_MME
=
"eth0"
;
ENB_INTERFACE_NAME_FOR_S1_MME
=
"eth0"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"1
72.27.8.51/23
"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"1
92.168.12.241/24
"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"eth0"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"eth0"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"1
72.27.8.51/23
"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"1
92.168.12.241/24
"
;
ENB_PORT_FOR_S1U
=
2152
;
# Spec 2152
ENB_PORT_FOR_S1U
=
2152
;
# Spec 2152
};
};
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.bladerfx40.conf
View file @
b8181d06
...
@@ -17,7 +17,7 @@ eNBs =
...
@@ -17,7 +17,7 @@ eNBs =
mobile_country_code
=
"208"
;
mobile_country_code
=
"208"
;
mobile_network_code
=
"9
3
"
;
mobile_network_code
=
"9
5
"
;
//////////
Physical
parameters
:
//////////
Physical
parameters
:
...
@@ -132,7 +132,7 @@ eNBs =
...
@@ -132,7 +132,7 @@ eNBs =
};
};
//////////
MME
parameters
:
//////////
MME
parameters
:
mme_ip_address
= ( {
ipv4
=
"192.168.12.1
1
"
;
mme_ip_address
= ( {
ipv4
=
"192.168.12.1
70
"
;
ipv6
=
"192:168:30::17"
;
ipv6
=
"192:168:30::17"
;
active
=
"yes"
;
active
=
"yes"
;
preference
=
"ipv4"
;
preference
=
"ipv4"
;
...
@@ -142,10 +142,10 @@ eNBs =
...
@@ -142,10 +142,10 @@ eNBs =
NETWORK_INTERFACES
:
NETWORK_INTERFACES
:
{
{
ENB_INTERFACE_NAME_FOR_S1_MME
=
"eth0"
;
ENB_INTERFACE_NAME_FOR_S1_MME
=
"eth0"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"192.168.12.2
15
/24"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"192.168.12.2
41
/24"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"eth0"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"eth0"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"192.168.12.2
15
/24"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"192.168.12.2
41
/24"
;
ENB_PORT_FOR_S1U
=
2152
;
# Spec 2152
ENB_PORT_FOR_S1U
=
2152
;
# Spec 2152
};
};
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf
View file @
b8181d06
...
@@ -144,7 +144,6 @@ eNBs =
...
@@ -144,7 +144,6 @@ eNBs =
ENB_INTERFACE_NAME_FOR_S1U
=
"eth0:4"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"eth0:4"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"192.170.1.2/24"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"192.170.1.2/24"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"192.170.0.2/24"
;
ENB_PORT_FOR_S1U
=
2152
;
# Spec 2152
ENB_PORT_FOR_S1U
=
2152
;
# Spec 2152
};
};
...
@@ -167,4 +166,4 @@ eNBs =
...
@@ -167,4 +166,4 @@ eNBs =
};
};
}
}
);
);
\ No newline at end of file
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