Commit 4967e1b1 authored by yilmazt's avatar yilmazt

develop&-nr up-to-date as of 30.7.19

parents e844ed07 5ddad9bd
......@@ -43,17 +43,36 @@ openairinterface5g
RELEASE NOTES:
v0.1 -> Last stable commit on develop branch before enhancement-10-harmony
v0.2 -> Merge of enhancement-10-harmony to include NGFI RRH + New Interface for RF/BBU
v0.3 -> Last stable commit on develop branch before the merge of feature-131-new-license. This is the last commit with GPL License
v0.4 -> Merge of feature-131-new-license. It closes issue#131 and changes the license to OAI Public License V1.0
v0.5 -> Merge of enhancement-10-harmony-lts. It includes fixes for Ubuntu 16.04 support
v0.5.1 -> Merge of bugfix-137-uplink-fixes. It includes stablity fixes for eNB
v0.5.2 -> Last version with old code for oaisim (abstraction mode works)
v0.6 -> RRH functionality, UE greatly improved, better TDD support,
a lot of bugs fixed. WARNING: oaisim in PHY abstraction mode does not
work, you need to use v0.5.2 for that.
v0.6.1 -> Mostly bugfixes. This is the last version without NFAPI.
v1.1.0 -> July 2019. This version adds the following implemented features:
* Experimental support of LTE-M
- Single LTE-M UE attachment, legacy-LTE UE attachment is disabled
* X2 interface and handover (also X2-U interface)
- In FDD and TDD
* CU/DU split (F1 interface)
- Tested only in FDD
* CDRX
- Tested only in FDD
* Experimental eMBMS support (only on UE side)
* Experimental multi-RRU support
- Tested only in TDD
This version has an improved code quality:
* Simplification of the Build System
- A single build includes all full-stack simulators, S1/noS1 modes and one HW platform (such as USRP, BladeRF, ...)
* TUN interface is now used as default for the data plane
- for UE, eNB-noS1 and UE-noS1
* Code Cleanup
* Better Static Code Analysis:
- Limited number of errors in cppcheck
- Important Decrease on high Impact errors in CoverityScan
* Better Test Coverage in Continuous Integration:
- TM2, CDRX, IF4.5, F1
- OAI UE is tested in S1 and noS1 modes with USRP board
- Multi-RRU TDD mode
- X2 Handover in FDD mode
v1.0.3 -> June 2019: Bug fix for LimeSuite v19.04.0 API
v1.0.2 -> February 2019: Full OAI support for 3.13.1 UHD
v1.0.1 -> February 2019: Bug fix for the UE L1 simulator.
v1.0.0 -> January 2019. This version first implements the architectural split described in doc/oai_lte_enb_func_split_arch.png picture.
Only FAPI, nFAPI and IF4.5 interfaces are implemented.
Repository tree structure prepares future integrations of features such as LTE-M, nbIOT or 5G-NR.
......@@ -61,6 +80,15 @@ v1.0.0 -> January 2019. This version first implements the architectural split de
S1-flex has been introduced.
New tools: config library, telnet server, ...
A lot of bugfixes and a proper automated Continuous Integration process validates contributions.
v1.0.1 -> February 2019: Bug fix for the UE L1 simulator.
v1.0.2 -> February 2019: Full OAI support for 3.13.1 UHD
v1.0.3 -> June 2019: Bug fix for LimeSuite v19.04.0 API
v0.6.1 -> Mostly bugfixes. This is the last version without NFAPI.
v0.6 -> RRH functionality, UE greatly improved, better TDD support,
a lot of bugs fixed. WARNING: oaisim in PHY abstraction mode does not
work, you need to use v0.5.2 for that.
v0.5.2 -> Last version with old code for oaisim (abstraction mode works)
v0.5.1 -> Merge of bugfix-137-uplink-fixes. It includes stablity fixes for eNB
v0.5 -> Merge of enhancement-10-harmony-lts. It includes fixes for Ubuntu 16.04 support
v0.4 -> Merge of feature-131-new-license. It closes issue#131 and changes the license to OAI Public License V1.0
v0.3 -> Last stable commit on develop branch before the merge of feature-131-new-license. This is the last commit with GPL License
v0.2 -> Merge of enhancement-10-harmony to include NGFI RRH + New Interface for RF/BBU
v0.1 -> Last stable commit on develop branch before enhancement-10-harmony
......@@ -44,7 +44,7 @@ pipeline {
disableConcurrentBuilds()
timestamps()
gitLabConnection('OAI GitLab')
gitlabBuilds(builds: ["Build gNb-usrp", "Build nr-UE-usrp", "Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test L2-sim", "Test-Mono-FDD-Band7", "Test-Mono-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40", "Test-Mono-FDD-Band13"])
gitlabBuilds(builds: ["Build gNB-USRP", "Build nr-UE-USRP", "Build eNB-USRP", "Build basic-sim", "Build phy-sim", "Build eNB-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test L2-sim", "Test-Mono-FDD-Band7", "Test-Mono-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40", "Test-Mono-FDD-Band13", "Test-Mono-FDD-Band13-X2-HO"])
ansiColor('xterm')
}
......@@ -232,7 +232,7 @@ pipeline {
}
stage ("Build 5G gNB-USRP") {
steps {
gitlabCommitStatus(name: "Build gNb-usrp") {
gitlabCommitStatus(name: "Build gNB-USRP") {
timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
......@@ -241,16 +241,16 @@ pipeline {
}
stage ("Build 5G NR-UE-USRP") {
steps {
gitlabCommitStatus(name: "Build nr-UE-usrp") {
gitlabCommitStatus(name: "Build nr-UE-USRP") {
timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
}
stage ("Build eNb-USRP") {
stage ("Build eNB-USRP") {
steps {
gitlabCommitStatus(name: "Build eNb-USRP") {
gitlabCommitStatus(name: "Build eNB-USRP") {
timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
......@@ -266,9 +266,9 @@ pipeline {
}
}
}
stage ("Build eNb-ethernet") {
stage ("Build eNB-ethernet") {
steps {
gitlabCommitStatus(name: "Build eNb-ethernet") {
gitlabCommitStatus(name: "Build eNB-ethernet") {
timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
......@@ -284,12 +284,12 @@ pipeline {
}
}
}
stage ("Build eNb-USRP on Red Hat") {
stage ("Build eNB-USRP on Red Hat") {
when {
expression {doRedHatBuild}
}
steps {
gitlabCommitStatus(name: "Build eNb-USRP-RHE") {
gitlabCommitStatus(name: "Build eNB-USRP-RHE") {
script {
try {
withCredentials([
......@@ -538,6 +538,7 @@ pipeline {
stage ("Test MONOLITHIC - FDD - Band 13 - B210") {
steps {
script {
sh "sleep 60"
triggerSlaveJob ('eNB-CI-MONO-FDD-Band13-B210', 'Test-Mono-FDD-Band13')
}
}
......@@ -554,6 +555,26 @@ pipeline {
}
}
}
stage ("Test X2 Handover - FDD - Band 13 - B210") {
steps {
script {
sh "sleep 60"
triggerSlaveJob ('eNB-CI-MONO-FDD-Band13-X2HO-B210', 'Test-Mono-FDD-Band13-X2-HO')
}
}
post {
always {
script {
finalizeSlaveJob('eNB-CI-MONO-FDD-Band13-X2HO-B210')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
}
}
}
}
stage ("Test OAI UE - FDD - Band 20 - B200") {
steps {
script {
......
This diff is collapsed.
This diff is collapsed.
......@@ -218,7 +218,7 @@ MACRLCs = (
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
parallel_config = "PARALLEL_RU_L1_SPLIT";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
......
This diff is collapsed.
......@@ -1843,7 +1843,7 @@ function run_test_on_vm {
fi
fi
if [ $S1_NOS1_CFG -eq 0 ]
if [ $S1_NOS1_CFG -eq 2 ]
then
get_enb_noS1_ip_addr $ENB_VM_CMDS $ENB_VM_IP_ADDR
echo "############################################################"
......
......@@ -24,6 +24,7 @@
<htmlTabRef>test-05-tm1-nos1-tunnel</htmlTabRef>
<htmlTabName>Test-05MHz-TM1-noS1-tunnel</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201 090109
030101 000001 090101 000002 040501 040502 000001 040601 040602 040641 040642 000001 090109 030201
......
......@@ -24,6 +24,7 @@
<htmlTabRef>test-05-tm1-tunnel</htmlTabRef>
<htmlTabName>Test-05MHz-TM1-tunnel</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201 090109
030102 000001 090102 000002 040503 000001 040603 040604 040643 040644 000001 090109 030201
......
......@@ -25,6 +25,7 @@
<htmlTabRef>test-05-tm2</htmlTabRef>
<htmlTabName>Test-05MHz-TM2</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201
040101
......
......@@ -24,7 +24,7 @@
<htmlTabRef>test-f1-05</htmlTabRef>
<htmlTabName>Test-F1-CU-DU-05MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201
040101
......
......@@ -24,6 +24,7 @@
<htmlTabRef>test-20</htmlTabRef>
<htmlTabName>Test-20MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201
040101
......
<!--
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
-->
<testCaseList>
<htmlTabRef>build-tab</htmlTabRef>
<htmlTabName>Build</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
010101
010102
050101 060101 070101
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="010101">
<class>Build_eNB</class>
<desc>Build Master eNB (USRP)</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="010102">
<class>Build_eNB</class>
<desc>Build Slave eNB (USRP)</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
</testCase>
<testCase id="050101">
<class>Initialize_HSS</class>
<desc>Initialize HSS</desc>
</testCase>
<testCase id="060101">
<class>Initialize_MME</class>
<desc>Initialize MME</desc>
</testCase>
<testCase id="070101">
<class>Initialize_SPGW</class>
<desc>Initialize SPGW</desc>
</testCase>
</testCaseList>
<!--
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
-->
<testCaseList>
<htmlTabRef>epc-closure</htmlTabRef>
<htmlTabName>EPC-Closure</htmlTabName>
<htmlTabIcon>log-out</htmlTabIcon>
<TestCaseRequestedList>
050201 060201 070201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="050201">
<class>Terminate_HSS</class>
<desc>Terminate HSS</desc>
</testCase>
<testCase id="060201">
<class>Terminate_MME</class>
<desc>Terminate MME</desc>
</testCase>
<testCase id="070201">
<class>Terminate_SPGW</class>
<desc>Terminate SPGW</desc>
</testCase>
</testCaseList>
<!--
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
-->
<testCaseList>
<htmlTabRef>test-x2-ho-full-end</htmlTabRef>
<htmlTabName>Test-X2-HO-Full-Terminate</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
030201 030202
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate Master eNB</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="030202">
<class>Terminate_eNB</class>
<desc>Terminate Slave eNB</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
</testCase>
</testCaseList>
<!--
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
030101 000002 030102 040301 040501 040601 040641 050401 000002 040502 040602 040642 050402 000002 040503 040603 040643 040401 040201 030201 030202
-->
<testCaseList>
<htmlTabRef>test-x2-ho-05-tm1</htmlTabRef>
<htmlTabName>Test-X2-HO-FDD-05MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201 030202
040101
050102
030101 000002 030102 040301 040501 050401 000002 040502 050402 000002 040503 040401 040201 030201 030202
050202
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Waiting for 60 seconds</desc>
<idle_sleep_time_in_sec>60</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Waiting for 10 seconds</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase>
<testCase id="050102">
<class>Initialize_FlexranCtrl</class>
<desc>Starting Flexran Controller</desc>
</testCase>
<testCase id="050202">
<class>Terminate_FlexranCtrl</class>
<desc>Stopping Flexran Controller</desc>
</testCase>
<testCase id="030101">
<class>Initialize_eNB</class>
<desc>Initialize Master eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band13.tm1.25PRB.usrpb210.conf</Initialize_eNB_args>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="030102">
<class>Initialize_eNB</class>
<desc>Initialize Slave eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.slave.band13.tm1.25PRB.usrpb210.conf</Initialize_eNB_args>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate Master eNB</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="030202">
<class>Terminate_eNB</class>
<desc>Terminate Slave eNB</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
</testCase>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="040201">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="040301">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="040501">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040502">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040503">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040601">
<class>Iperf</class>
<desc>iperf (5MHz - DL/8Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 8M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040602">
<class>Iperf</class>
<desc>iperf (5MHz - DL/8Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 8M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040603">
<class>Iperf</class>
<desc>iperf (5MHz - DL/8Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 8M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040641">
<class>Iperf</class>
<desc>iperf (5MHz - UL/5Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 5M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040642">
<class>Iperf</class>
<desc>iperf (5MHz - UL/5Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 5M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040643">
<class>Iperf</class>
<desc>iperf (5MHz - UL/5Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 5M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="050401">
<class>Perform_X2_Handover</class>
<desc>Doing a Flexran-Controlled X2 Handover</desc>
<x2_ho_options>network</x2_ho_options>
</testCase>
<testCase id="050402">
<class>Perform_X2_Handover</class>
<desc>Doing a Flexran-Controlled X2 Handover</desc>
<x2_ho_options>network</x2_ho_options>
</testCase>
</testCaseList>
#!/bin/bash
#sudo ./build_oai -c -C -I --install-optional-packages --install-system-files --UE -w USRP -V
#sudo ./build_oai -c -C -I --install-optional-packages --UE -w USRP -V
#sudo ./build_oai -c -C --UE -w USRP -V
sudo ./build_oai -c -C --UE -w USRP
#sudo ./build_oai -c -C --UE -w USRP --build-eclipse
This diff is collapsed.
......@@ -119,6 +119,8 @@ extern "C" {
#define FLAG_NOCOLOR 0x0001 /*!< \brief use colors in log messages, depending on level */
#define FLAG_THREAD 0x0008 /*!< \brief display thread name in log messages */
#define FLAG_LEVEL 0x0010 /*!< \brief display log level in log messages */
#define FLAG_FUNCT 0x0020
#define FLAG_FILE_LINE 0x0040
#define FLAG_TIME 0x0100
#define FLAG_INITIALIZED 0x8000
......@@ -314,6 +316,19 @@ int is_newline( char *str, int size);
int register_log_component(char *name, char *fext, int compidx);
#define LOG_MEM_SIZE 100*1024*1024
#define LOG_MEM_FILE "./logmem.log"
void flush_mem_to_file(void);
void log_output_memory(const char *file, const char *func, int line, int comp, int level, const char* format,va_list args);
int logInit_log_mem(void);
void close_log_mem(void);
typedef struct {
char* buf_p;
int buf_index;
int enable_flag;
} log_mem_cnt_t;
/* @}*/
/*!\fn int32_t write_file_matlab(const char *fname, const char *vname, void *data, int length, int dec, char format);
......
......@@ -27,4 +27,6 @@ extern log_t *g_log;
extern mapping log_level_names[];
extern mapping log_options[];
extern mapping log_maskmap[];
extern int log_mem_flag;
extern char * log_mem_filename;
extern char logmem_filename[1024];
......@@ -91,6 +91,8 @@
<TASK_MAC_ENB enabled="1"/>
<TASK_RLC_ENB enabled="1"/>
<TASK_PDCP_ENB enabled="1"/>
<TASK_DATA_FORWARDING enabled="1"/>
<TASK_END_MARKER enabled="1"/>
<TASK_RRC_ENB enabled="1"/>
<TASK_RAL_ENB enabled="1"/>
<TASK_S1AP enabled="1"/>
......@@ -114,6 +116,8 @@
<TASK_MAC_ENB enabled="1"/>
<TASK_RLC_ENB enabled="1"/>
<TASK_PDCP_ENB enabled="1"/>
<TASK_DATA_FORWARDING enabled="1"/>
<TASK_END_MARKER enabled="1"/>
<TASK_RRC_ENB enabled="1"/>
<TASK_RAL_ENB enabled="1"/>
<TASK_S1AP enabled="1"/>
......
......@@ -130,6 +130,8 @@
<TASK_MAC_ENB enabled="1"/>
<TASK_RLC_ENB enabled="1"/>
<TASK_PDCP_ENB enabled="1"/>
<TASK_DATA_FORWARDING enabled="1"/>
<TASK_END_MARKER enabled="1"/>
<TASK_RRC_ENB enabled="1"/>
<TASK_RAL_ENB enabled="1"/>
<TASK_S1AP enabled="1"/>
......@@ -153,6 +155,8 @@
<TASK_MAC_ENB enabled="1"/>
<TASK_RLC_ENB enabled="1"/>
<TASK_PDCP_ENB enabled="1"/>
<TASK_DATA_FORWARDING enabled="1"/>
<TASK_END_MARKER enabled="1"/>
<TASK_RRC_ENB enabled="1"/>
<TASK_RAL_ENB enabled="1"/>
<TASK_S1AP enabled="1"/>
......
......@@ -283,6 +283,8 @@ typedef struct {
TASK_DEF(TASK_RLC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PDCP_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_DATA_FORWARDING, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_END_MARKER, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL,NULL)\
TASK_DEF(TASK_RRC_GNB, TASK_PRIORITY_MED, 200, NULL,NULL)\
TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
......
......@@ -81,8 +81,8 @@
{"total_num_pdus", &(macuestatptr->total_num_pdus),TELNET_VARTYPE_INT32,0},\
{"overhead_bytes", &(macuestatptr->overhead_bytes),TELNET_VARTYPE_INT64,0},\
{"crnti", &(macuestatptr->crnti),TELNET_VARTYPE_INT16,0},\
{"normalized_rx_power", &(macuestatptr->normalized_rx_power),TELNET_VARTYPE_INT32,0},\
{"target_rx_power", &(macuestatptr->target_rx_power),TELNET_VARTYPE_INT32,0},\
{"snr", &(macuestatptr->snr),TELNET_VARTYPE_INT32,0},\
{"target_snr ", &(macuestatptr->target_snr),TELNET_VARTYPE_INT32,0},\
{"ulsch_mcs1", &(macuestatptr->ulsch_mcs1),TELNET_VARTYPE_INT8,0},\
{"ulsch_mcs2", &(macuestatptr->ulsch_mcs2),TELNET_VARTYPE_INT8,0},\
{"rbs_used_rx", &(macuestatptr->rbs_used_rx),TELNET_VARTYPE_INT32,0},\
......
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">Running OAI Basic Simulator</font></b>
</td>
</tr>
</table>
This page is valid on the following branches:
- `master` starting from tag `v1.1.0`
- `develop` starting from tag `2019.w11`
# 1. Building the basic-simulator.
After the build simplification, the basic simulator is available directly from the standard build.
```bash
$ source oaienv
$ cd cmake_targets
$ ./build_oai --eNB --UE
```
Both eNB (lte-softmodem) and UE (lte-uesoftmodem) are present on `cmake_targets/lte_build_oai/build` folder.
More details are available on the [build page](BUILD.md).
# 2. Running the basic simulator.
The basic simulator is a oai device replacing the radio heads (for example the USRP device). It allows connecting the oai UE and the oai eNodeB through a network interface carrying the time-domain samples, getting rid of over the air unpredictable perturbations.
This is the ideal tool to check signal processing algorithms and protocols implementation and having debug sessions without any HW radio equipment.
The main limitations are:
- A single OAI UE will connect to the OAI eNB
- No channel noise
## 2.1. Starting eNB
The basic simulator is able to run with a connected EPC or without any (the so-called "noS1" mode).
Example 1: running in FDD mode with EPC.
```bash
$ source oaienv
$ cd cmake_targets/lte_build_oai/build
$ ENODEB=1 sudo -E ./lte-softmodem -O $OPENAIR_HOME/ci-scripts/conf_files/lte-fdd-basic-sim.conf --basicsim
```
Edit previously the `ci-scripts/conf_files/lte-fdd-basic-sim.conf` file to modify:
- `N_RB_DL` field to change the Bandwidth (25, 50, 100)
- `CI_MME_IP_ADDR` with the EPC IP address
- `CI_ENB_IP_ADDR` with the container (physical server, virtual machine, ...) on which you are executing the eNB soft-modem
Example 2: running in TDD mode without any EPC.
```bash
$ source oaienv
$ cd cmake_targets/lte_build_oai/build
$ ENODEB=1 sudo -E ./lte-softmodem -O $OPENAIR_HOME/ci-scripts/conf_files/lte-tdd-basic-sim.conf --basicsim --noS1
```
## 2.2. Starting UE
Before starting the UE, you may need to edit the SIM parameters to adapt to your eNB configuration and HSS database.
The <conf> file to use for conf2uedate is `openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf`
You need to set the correct OPC, USIM_API_K, MSIN (this is the end par of the IMSI), HPLMN (the front part of IMSI) to match values from HSS.
```bash
$ source oaienv
# Edit openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
$ cd cmake_targets/lte_build_oai/build
$ ../../nas_sim_tools/build/conf2uedata -c $OPENAIR_HOME/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -o .
$ sudo -E ./lte-uesoftmodem -C 2625000000 -r 25 --ue-rxgain 140 --basicsim [--noS1]
```
The `-r 25` is to use if in the conf file of the eNB you use N_RB_DL=25. Use 50 if you have N_RB_DL=50 and 100 if you have N_RB_DL=100.
The `-C 2625000000` is the downlink frequency. Use the same value as `downlink_frequency` in the eNB configuration file.
The `--noS1` is mandatory if you started the eNB in that mode.
# 3. Testing the data plane
# 3.1. In S1 mode
First we need to retrieve the IP address allocated to the OAI UE.
On the server that runs the UE:
```bash
$ ifconfig oaitun_ue1
oaitun_ue1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.172.0.2 P-t-P:192.172.0.2 Mask:255.255.255.0
...
```
`192.172.0.2` is the IP address that has been allocated by the SPGW in the EPC.
On the server that runs the EPC:
```bash
$ ping -c 20 192.172.0.2
--- 192.172.0.2 ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19020ms
rtt min/avg/max/mdev = 13.241/18.999/24.208/2.840 ms
```
You can ping the EPC from the UE:
```bash
$ ping -I oaitun_ue1 -c 20 192.172.0.1
--- 192.172.0.1 ping statistics ---
...
20 packets transmitted, 20 received, 0% packet loss, time 19019ms
rtt min/avg/max/mdev = 13.015/18.674/23.738/2.917 ms
```
For DL iperf testing:
On the server that runs the UE.
```bash
$ iperf -B 192.172.0.2 -u -s -i 1 -fm -p 5001
```
On the server that runs the EPC.
```bash
$ iperf -c 192.172.0.2 -u -t 30 -b 10M -i 1 -fm -B 192.172.0.1 -p 5001
```
For UL iperf testing:
On the server that runs the EPC.
```bash
$ iperf -B 192.172.0.1 -u -s -i 1 -fm -p 5001
```
On the server that runs the UE.
```bash
$ iperf -c 192.172.0.1 -u -t 30 -b 2M -i 1 -fm -B 192.172.0.2 -p 5001
```
# 3.2. In noS1 mode
The IP addresses are fixed. But we can still retrieve them programmatically.
For the UE it is quite the same:
```bash
$ ifconfig oaitun_ue1
oaitun_ue1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.0.1.2 P-t-P:10.0.1.2 Mask:255.255.255.0
...
```
For the eNB:
```bash
$ ifconfig oaitun_enb1
oaitun_enb1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.0.1.1 P-t-P:10.0.1.1 Mask:255.255.255.0
...
```
Pinging like this:
```bash
$ ping -I oaitun_ue1 -c 20 10.0.1.1
$ ping -I oaitun_enb1 -c 20 10.0.1.2
```
And the same for iperf:
```bash
$ iperf -B 10.0.1.2 -u -s -i 1 -fm
$ iperf -c 10.0.1.2 -u -b 1.00M -t 30 -i 1 -fm -B 10.0.1.1
```
......@@ -41,10 +41,12 @@ The Physical layer implements **3GPP 36.211**, **36.212**, **36.213** and provid
- Max number of antennas: 2
- CQI/PMI reporting: aperiodic, feedback mode 3 - 0 and 3 - 1
- PRACH preamble format 0
- All downlink (DL) channels are supported: PSS, SSS, PBCH, PCFICH, PHICH, PDCCH, PDSCH, PMCH
- All uplink (UL) channels are supported: PRACH, PUSCH, PUCCH (format 1/1a/1b), SRS, DRS
- Downlink (DL) channels are supported: PSS, SSS, PBCH, PCFICH, PHICH, PDCCH, PDSCH, PMCH, MPDCCH
- Uplink (UL) channels are supported: PRACH, PUSCH, PUCCH (format 1/1a/1b), SRS, DRS
- HARQ support (UL and DL)
- Highly optimized base band processing (including turbo decoder)
- Multi-RRU support: over the air synchro b/ multi RRU in TDD mode
- Support for CE-modeA for LTE-M. Limited support for repeatition, single-LTE-M connection, legacy-LTE UE attach is disabled.
### Performances ###
......@@ -144,6 +146,7 @@ The X2AP layer is based on **3GPP 36.423** v14.6.0 and implements the following
- UE Context Release
- X2 timers (t_reloc_prep, tx2_reloc_overall)
- Handover Cancel
- X2-U interface implemented
## eNB Advanced Features ##
......
......@@ -14,6 +14,10 @@
After you have [built the softmodem executables](BUILD.md) you can set your default directory to the build directory `cmake_targets/ran_build/build/` and start testing some use cases. Below, the description of the different oai functionalities should help you choose the oai configuration that suits your need.
# Basic Simulator
See the [dedicated page](BASIC_SIM.md).
# RF Simulator
The rf simulator is a oai device replacing the radio heads (for example the USRP device). It allows connecting the oai UE and the oai eNodeB through a network interface carrying the time-domain samples, getting rid of over the air unpredictable perturbations. This is the ideal tool to check signal processing algorithms and protocols implementation.
......
......@@ -83,7 +83,7 @@ nfapi_tx_request_pdu_t *tx_request_pdu[1023][10][10]; // [frame][subframe][max_n
uint8_t tx_pdus[32][8][4096];
nfapi_ue_release_request_body_t release_rntis;
uint16_t phy_antenna_capability_values[] = { 1, 2, 4, 8, 16 };
nfapi_pnf_param_response_t g_pnf_param_resp;
......@@ -197,19 +197,19 @@ static pthread_t pnf_start_pthread;
int nfapitooai_level(int nfapi_level) {
switch(nfapi_level) {
case NFAPI_TRACE_ERROR:
return LOG_ERR;
return OAILOG_ERR;
case NFAPI_TRACE_WARN:
return LOG_WARNING;
return OAILOG_WARNING;
case NFAPI_TRACE_NOTE:
return LOG_INFO;
return OAILOG_INFO;
case NFAPI_TRACE_INFO:
return LOG_DEBUG;
return OAILOG_DEBUG;
}
return LOG_ERR;
return OAILOG_ERR;
}
void pnf_nfapi_trace(nfapi_trace_level_t nfapi_level, const char *message, ...) {
......@@ -540,7 +540,6 @@ int config_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfap
}
if(req->nfapi_config.earfcn.tl.tag == NFAPI_NFAPI_EARFCN_TAG) {
fp->eutra_band = 0;
fp->dl_CarrierFreq = from_earfcn(fp->eutra_band, req->nfapi_config.earfcn.value);
fp->ul_CarrierFreq = fp->dl_CarrierFreq - (get_uldl_offset(fp->eutra_band) * 1e5);
num_tlv++;
......@@ -896,6 +895,15 @@ int pnf_phy_lbt_dl_config_req(nfapi_pnf_p7_config_t *config, nfapi_lbt_dl_config
return 0;
}
int pnf_phy_ue_release_req(nfapi_pnf_p7_config_t* config, nfapi_ue_release_request_t* req) {
if (req->ue_release_request_body.number_of_TLVs==0)
return -1;
release_rntis.number_of_TLVs = req->ue_release_request_body.number_of_TLVs;
memcpy(&release_rntis.ue_release_request_TLVs_list, req->ue_release_request_body.ue_release_request_TLVs_list, sizeof(nfapi_ue_release_request_TLVs_t)*req->ue_release_request_body.number_of_TLVs);
return 0;
}
int pnf_phy_vendor_ext(nfapi_pnf_p7_config_t *config, nfapi_p7_message_header_t *msg) {
if(msg->message_id == P7_VENDOR_EXT_REQ) {
//vendor_ext_p7_req* req = (vendor_ext_p7_req*)msg;
......@@ -1024,7 +1032,7 @@ int start_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi
p7_config->hi_dci0_req = &pnf_phy_hi_dci0_req;
p7_config->tx_req = &pnf_phy_tx_req;
p7_config->lbt_dl_config_req = &pnf_phy_lbt_dl_config_req;
p7_config->ue_release_req = &pnf_phy_ue_release_req;
if (NFAPI_MODE==NFAPI_UE_STUB_PNF) {
p7_config->dl_config_req = &memcpy_dl_config_req;
p7_config->ul_config_req = &memcpy_ul_config_req;
......@@ -1367,7 +1375,7 @@ void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr,
printf("%s() PNF\n\n\n\n\n\n", __FUNCTION__);
if(NFAPI_MODE!=NFAPI_UE_STUB_PNF) {
nfapi_setmode(NFAPI_PNF); // PNF!
nfapi_setmode(NFAPI_MODE_PNF); // PNF!
}
nfapi_pnf_config_t *config = nfapi_pnf_config_create();
......
This diff is collapsed.
......@@ -150,6 +150,8 @@ typedef enum {
NFAPI_LBT_DL_INDICATION,
NFAPI_NB_HARQ_INDICATION,
NFAPI_NRACH_INDICATION,
NFAPI_UE_RELEASE_REQUEST,
NFAPI_UE_RELEASE_RESPONSE,
NFAPI_PNF_PARAM_REQUEST = 0x0100,
NFAPI_PNF_PARAM_RESPONSE,
......@@ -2424,6 +2426,19 @@ typedef struct {
} nfapi_tx_request_body_t;
#define NFAPI_TX_REQUEST_BODY_TAG 0x2022
#define NFAPI_RELEASE_MAX_RNTI 256
typedef struct {
uint32_t handle;
uint16_t rnti;
} nfapi_ue_release_request_TLVs_t;
typedef struct {
nfapi_tl_t tl;
uint16_t number_of_TLVs;
nfapi_ue_release_request_TLVs_t ue_release_request_TLVs_list[NFAPI_RELEASE_MAX_RNTI];
} nfapi_ue_release_request_body_t;
#define NFAPI_UE_RELEASE_BODY_TAG 0x2068
// P7 Message Structures
typedef struct {
nfapi_p7_message_header_t header;
......@@ -3450,6 +3465,19 @@ typedef struct {
nfapi_vendor_extension_tlv_t vendor_extension;
} nfapi_error_indication_t;
typedef struct {
nfapi_p7_message_header_t header;
uint16_t sfn_sf;
nfapi_ue_release_request_body_t ue_release_request_body;
nfapi_vendor_extension_tlv_t vendor_extension;
} nfapi_ue_release_request_t;
typedef struct {
nfapi_p7_message_header_t header;
uint32_t error_code;
nfapi_vendor_extension_tlv_t vendor_extension;
} nfapi_ue_release_response_t;
//
// P4 Messages
//
......
......@@ -81,13 +81,19 @@ void* nfapi_p7_allocate(size_t size, nfapi_p7_codec_config_t* config)
if(size == 0)
return 0;
void* buffer_p = NULL;
if(config && config->allocate)
{
return (config->allocate)(size);
buffer_p = (config->allocate)(size);
if(buffer_p != NULL){
memset(buffer_p,0,size);
}
return buffer_p;
}
else
{
return calloc(1, size);
buffer_p = calloc(1, size);
return buffer_p;
}
}
......@@ -1577,7 +1583,43 @@ static uint8_t pack_tx_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *e
return x && y && z;
}
static uint8_t pack_release_request_body_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end)
{
nfapi_ue_release_request_body_t* value = (nfapi_ue_release_request_body_t*)tlv;
if(push16(value->number_of_TLVs, ppWritePackedMsg, end) == 0){
return 0;
}
uint8_t j;
uint16_t num = value->number_of_TLVs;
for(j = 0; j < num; ++j){
if(push16(value->ue_release_request_TLVs_list[j].rnti, ppWritePackedMsg, end) == 0){
return 0;
}
}
return 1;
}
static uint8_t pack_ue_release_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config)
{
nfapi_ue_release_request_t *pNfapiMsg = (nfapi_ue_release_request_t*)msg;
int x = push16(pNfapiMsg->sfn_sf, ppWritePackedMsg, end);
int y = pack_tlv(NFAPI_UE_RELEASE_BODY_TAG, &pNfapiMsg->ue_release_request_body, ppWritePackedMsg, end, &pack_release_request_body_value);
int z = pack_p7_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config);
return x && y && z;
}
static uint8_t pack_ue_release_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config)
{
nfapi_ue_release_response_t *pNfapiMsg = (nfapi_ue_release_response_t*)msg;
int x = push32(pNfapiMsg->error_code, ppWritePackedMsg, end);
int z = pack_p7_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config);
return x && z;
}
static uint8_t pack_rx_ue_information_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end)
{
nfapi_rx_ue_information* value = (nfapi_rx_ue_information*)tlv;
......@@ -2665,7 +2707,15 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() NFAPI_TX_REQUEST\n", __FUNCTION__);
result = pack_tx_request(pMessageHeader, &pWritePackedMessage, end, config);
break;
case NFAPI_UE_RELEASE_REQUEST:
result =pack_ue_release_request(pMessageHeader, &pWritePackedMessage, end, config);
break;
case NFAPI_UE_RELEASE_RESPONSE:
result =pack_ue_release_response(pMessageHeader, &pWritePackedMessage, end, config);
break;
case NFAPI_HARQ_INDICATION:
result = pack_harq_indication(pMessageHeader, &pWritePackedMessage, end, config);
break;
......@@ -4479,7 +4529,55 @@ static uint8_t unpack_tx_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *
return 1;
}
static uint8_t unpack_ue_release_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t* config)
{
uint8_t proceed = 1;
nfapi_ue_release_request_t *pNfapiMsg = (nfapi_ue_release_request_t*)msg;
if(pull16(ppReadPackedMsg, &pNfapiMsg->sfn_sf, end) == 0)
return 0;
while (((uint8_t*)(*ppReadPackedMsg) < end) && proceed)
{
nfapi_tl_t generic_tl;
if(unpack_tl(ppReadPackedMsg, &generic_tl, end) == 0)
return 0;
switch(generic_tl.tag)
{
case NFAPI_UE_RELEASE_BODY_TAG:
{
pNfapiMsg->ue_release_request_body.tl = generic_tl;
if( pull16(ppReadPackedMsg, &pNfapiMsg->ue_release_request_body.number_of_TLVs, end) == 0)
return 0;
if(pNfapiMsg->ue_release_request_body.number_of_TLVs > NFAPI_RELEASE_MAX_RNTI)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s number of relese rnti's exceed maxium (count:%d max:%d)\n", __FUNCTION__, pNfapiMsg->ue_release_request_body.number_of_TLVs, NFAPI_RELEASE_MAX_RNTI);
return 0;
} else {
uint8_t j;
uint16_t num = pNfapiMsg->ue_release_request_body.number_of_TLVs;
for(j = 0; j < num; ++j){
if(pull16(ppReadPackedMsg, &pNfapiMsg->ue_release_request_body.ue_release_request_TLVs_list[j].rnti, end) == 0){
return 0;
}
}
}
}
break;
default:
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "unpack_ue_release_request FIXME : Invalid type %d \n", generic_tl.tag );
}
break;
};
}
return 1;
}
static uint8_t unpack_harq_indication_tdd_harq_data_bundling(void* tlv, uint8_t **ppReadPackedMsg, uint8_t *end)
{
nfapi_harq_indication_tdd_harq_data_bundling_t* value = (nfapi_harq_indication_tdd_harq_data_bundling_t*)tlv;
......@@ -5727,7 +5825,18 @@ static uint8_t unpack_nrach_indication_rel13_value(void *tlv, uint8_t **ppReadPa
pull8(ppReadPackedMsg, &value->nrach_ce_level, end));
}
static uint8_t unpack_ue_release_resp(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t* config)
{
nfapi_ue_release_response_t *pNfapiMsg = (nfapi_ue_release_response_t*)msg;
if(pull32(ppReadPackedMsg, &pNfapiMsg->error_code, end) == 0){
return 0;
}
else{
NFAPI_TRACE(NFAPI_TRACE_INFO, "ue_release_response:error_code = %d\n", pNfapiMsg->error_code);
}
return 1;
}
static uint8_t unpack_nrach_indication_body_value(void* tlv, uint8_t **ppReadPackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config)
{
nfapi_nrach_indication_body_t* value = (nfapi_nrach_indication_body_t*)tlv;
......@@ -5940,7 +6049,17 @@ static int check_unpack_length(nfapi_message_id_e msgId, uint32_t unpackedBufLen
if (unpackedBufLen >= sizeof(nfapi_timing_info_t))
retLen = sizeof(nfapi_timing_info_t);
break;
case NFAPI_UE_RELEASE_REQUEST:
if (unpackedBufLen >= sizeof(nfapi_ue_release_request_t))
retLen = sizeof(nfapi_ue_release_request_t);
break;
case NFAPI_UE_RELEASE_RESPONSE:
if (unpackedBufLen >= sizeof(nfapi_ue_release_response_t))
retLen = sizeof(nfapi_ue_release_response_t);
break;
default:
NFAPI_TRACE(NFAPI_TRACE_ERROR, "Unknown message ID %d\n", msgId);
break;
......@@ -6060,7 +6179,14 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
else
return -1;
break;
case NFAPI_UE_RELEASE_REQUEST:
if (check_unpack_length(NFAPI_UE_RELEASE_REQUEST, unpackedBufLen))
result = unpack_ue_release_request(&pReadPackedMessage, end, pMessageHeader, config);
else
return -1;
break;
case NFAPI_HARQ_INDICATION:
if (check_unpack_length(NFAPI_HARQ_INDICATION, unpackedBufLen))
result = unpack_harq_indication(&pReadPackedMessage, end, pMessageHeader, config);
......@@ -6158,7 +6284,14 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
else
return -1;
break;
case NFAPI_UE_RELEASE_RESPONSE:
if (check_unpack_length(NFAPI_UE_RELEASE_RESPONSE, unpackedBufLen))
result = unpack_ue_release_resp(&pReadPackedMessage, end, pMessageHeader, config);
else
return -1;
break;
default:
if(pMessageHeader->message_id >= NFAPI_VENDOR_EXT_MSG_MIN &&
......
......@@ -546,7 +546,7 @@ typedef struct
nfapi_hi_dci0_request_t* hi_dci0_req;
nfapi_tx_request_t* tx_req;
nfapi_lbt_dl_config_request_t* lbt_dl_config_req;
nfapi_ue_release_request_t* ue_release_req;
} nfapi_pnf_p7_subframe_buffer_t;
typedef struct nfapi_pnf_p7_config nfapi_pnf_p7_config_t;
......@@ -652,6 +652,17 @@ typedef struct nfapi_pnf_p7_config
* \return not currently used
*/
int (*lbt_dl_config_req)(nfapi_pnf_p7_config_t* config, nfapi_lbt_dl_config_request_t* req);
/*! A callback for the UE_RELEASE_REQ.request
* \param config A poiner to the PNF P7 config
* \param req A pointer to the release rnti request message structure
* \return not currently used
*
* The release request contains pointers to the release rnti to be sent. In the case that the FAPI interface
* will 'keep' the pointers until they are transmitted the callee should set the pointers in the req to 0
* and then use the p7 codec config free function to release the rnti when appropriate.
*/
int (*ue_release_req)(nfapi_pnf_p7_config_t* config, nfapi_ue_release_request_t* req);
/*! A callback for vendor extension messages
* \param config A poiner to the PNF P7 config
......@@ -796,6 +807,7 @@ int nfapi_pnf_p7_nrach_ind(nfapi_pnf_p7_config_t* config, nfapi_nrach_indication
*/
int nfapi_pnf_p7_vendor_extension(nfapi_pnf_p7_config_t* config, nfapi_p7_message_header_t* msg);
int nfapi_pnf_ue_release_resp(nfapi_pnf_p7_config_t* config, nfapi_ue_release_response_t* resp);
#if defined(__cplusplus)
}
#endif
......
......@@ -36,7 +36,7 @@ extern uint16_t sf_ahead;
void add_sf(uint16_t *frameP, uint16_t *subframeP, int offset)
{
*frameP = *frameP + ((*subframeP + offset) / 10);
*frameP = (*frameP + ((*subframeP + offset) / 10))%1024;
*subframeP = ((*subframeP + offset) % 10);
}
......@@ -241,6 +241,16 @@ void deallocate_nfapi_lbt_dl_config_request(nfapi_lbt_dl_config_request_t* req,
pnf_p7_free(pnf_p7, req);
}
nfapi_ue_release_request_t* allocate_nfapi_ue_release_request(pnf_p7_t* pnf_p7)
{
return pnf_p7_malloc(pnf_p7, sizeof(nfapi_ue_release_request_t));
}
void deallocate_nfapi_ue_release_request(nfapi_ue_release_request_t* req, pnf_p7_t* pnf_p7)
{
pnf_p7_free(pnf_p7, req);
}
pnf_p7_rx_message_t* pnf_p7_rx_reassembly_queue_add_segment(pnf_p7_t* pnf_p7, pnf_p7_rx_reassembly_queue_t* queue, uint32_t rx_hr_time, uint16_t sequence_number, uint16_t segment_number, uint8_t m, uint8_t* data, uint16_t data_len)
{
pnf_p7_rx_message_t* msg = 0;
......@@ -720,6 +730,21 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
}
}
if(tx_subframe_buffer->ue_release_req != 0)
{
if(pnf_p7->_public.ue_release_req)
(pnf_p7->_public.ue_release_req)(&(pnf_p7->_public), tx_subframe_buffer->ue_release_req);
}
else
{
//send dummy
if(pnf_p7->_public.ue_release_req && pnf_p7->_public.dummy_subframe.ue_release_req)
{
pnf_p7->_public.dummy_subframe.ue_release_req->sfn_sf = sfn_sf_tx;
(pnf_p7->_public.ue_release_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.ue_release_req);
}
}
if(tx_subframe_buffer->dl_config_req != 0)
{
deallocate_nfapi_dl_config_request(tx_subframe_buffer->dl_config_req, pnf_p7);
......@@ -735,6 +760,10 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
deallocate_nfapi_hi_dci0_request(tx_subframe_buffer->hi_dci0_req, pnf_p7);
tx_subframe_buffer->hi_dci0_req = 0;
}
if(tx_subframe_buffer->ue_release_req != 0){
deallocate_nfapi_ue_release_request(tx_subframe_buffer->ue_release_req, pnf_p7);
tx_subframe_buffer->ue_release_req = 0;
}
}
else
{
......@@ -799,7 +828,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
}
} // sfn_sf match
if (subframe_buffer->dl_config_req == 0 && subframe_buffer->tx_req == 0 && subframe_buffer->ul_config_req == 0 && subframe_buffer->lbt_dl_config_req == 0)
if (subframe_buffer->dl_config_req == 0 && subframe_buffer->tx_req == 0 && subframe_buffer->ul_config_req == 0 && subframe_buffer->lbt_dl_config_req == 0 && subframe_buffer->ue_release_req == 0)
{
memset(&(pnf_p7->subframe_buffer[buffer_index]), 0, sizeof(nfapi_pnf_p7_subframe_buffer_t));
pnf_p7->subframe_buffer[buffer_index].sfn_sf = -1;
......@@ -1310,6 +1339,80 @@ void pnf_handle_p7_vendor_extension(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pn
}
void pnf_handle_ue_release_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7)
{
nfapi_ue_release_request_t* req = allocate_nfapi_ue_release_request(pnf_p7);
if(req == NULL)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s failed to alloced nfapi_ue_release_request structure\n");
return;
}
int unpack_result = nfapi_p7_message_unpack(pRecvMsg, recvMsgLen, req, sizeof(nfapi_ue_release_request_t), &pnf_p7->_public.codec_config);
if(unpack_result == 0)
{
if(pthread_mutex_lock(&(pnf_p7->mutex)) != 0)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "failed to lock mutex\n");
return;
}
if(is_p7_request_in_window(req->sfn_sf, "ue_release_request", pnf_p7))
{
uint32_t sfn_sf_dec = NFAPI_SFNSF2DEC(req->sfn_sf);
uint8_t buffer_index = sfn_sf_dec % pnf_p7->_public.subframe_buffer_size;
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
NFAPI_TRACE(NFAPI_TRACE_INFO,"%s() %ld.%09ld POPULATE UE_RELEASE_REQ sfn_sf:%d buffer_index:%d\n", __FUNCTION__, t.tv_sec, t.tv_nsec, sfn_sf_dec, buffer_index);
if (0 && NFAPI_SFNSF2DEC(req->sfn_sf)%100==0) NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() UE_RELEASE_REQ.req sfn_sf:%d rntis:%d - UE_RELEASE_REQ is within window\n",
__FUNCTION__,
NFAPI_SFNSF2DEC(req->sfn_sf),
req->ue_release_request_body.number_of_TLVs);
if(pnf_p7->subframe_buffer[buffer_index].ue_release_req != 0)
{
deallocate_nfapi_ue_release_request(pnf_p7->subframe_buffer[buffer_index].ue_release_req, pnf_p7);
}
pnf_p7->subframe_buffer[buffer_index].sfn_sf = req->sfn_sf;
pnf_p7->subframe_buffer[buffer_index].ue_release_req = req;
pnf_p7->stats.tx_ontime++;
}
else
{
NFAPI_TRACE(NFAPI_TRACE_INFO,"%s() UE_RELEASE_REQUEST Request is outside of window REQ:SFN_SF:%d CURR:SFN_SF:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), NFAPI_SFNSF2DEC(pnf_p7->sfn_sf));
deallocate_nfapi_ue_release_request(req, pnf_p7);
if(pnf_p7->_public.timing_info_mode_aperiodic)
{
pnf_p7->timing_info_aperiodic_send = 1;
}
pnf_p7->stats.tx_late++;
}
nfapi_ue_release_response_t resp;
memset(&resp, 0, sizeof(resp));
resp.header.message_id = NFAPI_UE_RELEASE_RESPONSE;
resp.header.phy_id = req->header.phy_id;
resp.error_code = NFAPI_MSG_OK;
nfapi_pnf_ue_release_resp(&(pnf_p7->_public), &resp);
NFAPI_TRACE(NFAPI_TRACE_INFO, "do ue_release_response\n");
if(pthread_mutex_unlock(&(pnf_p7->mutex)) != 0)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "failed to unlock mutex\n");
return;
}
}
else
{
deallocate_nfapi_ue_release_request(req, pnf_p7);
}
}
uint32_t calculate_t2(uint32_t now_time_hr, uint16_t sfn_sf, uint32_t sf_start_time_hr)
{
......@@ -1445,7 +1548,11 @@ void pnf_dispatch_p7_message(void *pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7,
case NFAPI_LBT_DL_CONFIG_REQUEST:
pnf_handle_lbt_dl_config_request(pRecvMsg, recvMsgLen, pnf_p7);
break;
case NFAPI_UE_RELEASE_REQUEST:
pnf_handle_ue_release_request(pRecvMsg, recvMsgLen, pnf_p7);
break;
default:
{
if(header.message_id >= NFAPI_VENDOR_EXT_MSG_MIN &&
......@@ -1536,7 +1643,7 @@ void pnf_handle_p7_message(void *pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7, ui
NFAPI_TRACE(NFAPI_TRACE_NOTE, "Failed to allocate PNF_P7 reassemby buffer len:%d\n", length);
return;
}
memset(pnf_p7->reassemby_buffer, 0, length);
pnf_p7->reassemby_buffer_size = length;
}
......
......@@ -223,3 +223,15 @@ int nfapi_pnf_p7_vendor_extension(nfapi_pnf_p7_config_t* config, nfapi_p7_messag
return pnf_p7_pack_and_send_p7_message(_this, msg, 0);
}
int nfapi_pnf_ue_release_resp(nfapi_pnf_p7_config_t* config, nfapi_ue_release_response_t* resp)
{
if (config == NULL || resp == NULL)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: NULL parameters\n", __FUNCTION__);
return -1;
}
pnf_p7_t* _this = (pnf_p7_t*)(config);
return pnf_p7_pack_and_send_p7_message(_this, &(resp->header), sizeof(nfapi_ue_release_response_t));
}
......@@ -990,6 +990,15 @@ int nfapi_vnf_p7_lbt_dl_config_req(nfapi_vnf_p7_config_t* config, nfapi_lbt_dl_c
*/
int nfapi_vnf_p7_vendor_extension(nfapi_vnf_p7_config_t* config, nfapi_p7_message_header_t* msg);
/*! Send the RELEASE_RNTI.request
* \param config A pointer to the vnf p7 configuration
* \param req A data structure for the decoded RELEASE_RNTI.request.
* \return A status value. 0 equal success, -1 indicates failure
*
* The caller is responsiable for memory management of any pointers set in the req, which
* may be released after this function call has returned or at a later pointer
*/
int nfapi_vnf_p7_ue_release_req(nfapi_vnf_p7_config_t* config, nfapi_ue_release_request_t* req);
#if defined(__cplusplus)
}
#endif
......
......@@ -822,6 +822,28 @@ void vnf_handle_nrach_indication(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p
}
}
void vnf_handle_ue_release_resp(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
{
// ensure it's valid
if (pRecvMsg == NULL || vnf_p7 == NULL)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: NULL parameters\n", __FUNCTION__);
}
else
{
nfapi_ue_release_response_t resp;
if(nfapi_p7_message_unpack(pRecvMsg, recvMsgLen, &resp, sizeof(resp), &vnf_p7->_public.codec_config) < 0)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: Failed to unpack message\n", __FUNCTION__);
}
vnf_p7_codec_free(vnf_p7, resp.vendor_extension);
}
}
void vnf_handle_p7_vendor_extension(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7, uint16_t message_id)
{
if (pRecvMsg == NULL || vnf_p7 == NULL)
......@@ -1334,6 +1356,10 @@ void vnf_dispatch_p7_message(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
vnf_handle_nrach_indication(pRecvMsg, recvMsgLen, vnf_p7);
break;
case NFAPI_UE_RELEASE_RESPONSE:
vnf_handle_ue_release_resp(pRecvMsg, recvMsgLen, vnf_p7);
break;
default:
{
if(header.message_id >= NFAPI_VENDOR_EXT_MSG_MIN &&
......@@ -1430,7 +1456,7 @@ void vnf_handle_p7_message(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
NFAPI_TRACE(NFAPI_TRACE_NOTE, "Failed to allocate VNF_P7 reassemby buffer len:%d\n", length);
return;
}
memset(phy->reassembly_buffer, 0, length);
phy->reassembly_buffer_size = length;
}
......
......@@ -534,6 +534,14 @@ int nfapi_vnf_p7_vendor_extension(nfapi_vnf_p7_config_t* config, nfapi_p7_messag
return vnf_p7_pack_and_send_p7_msg(vnf_p7, header);
}
int nfapi_vnf_p7_ue_release_req(nfapi_vnf_p7_config_t* config, nfapi_ue_release_request_t* req)
{
if(config == 0 || req == 0)
return -1;
vnf_p7_t* vnf_p7 = (vnf_p7_t*)config;
return vnf_p7_pack_and_send_p7_msg(vnf_p7, &req->header);
}
int nfapi_vnf_p7_release_msg(nfapi_vnf_p7_config_t* config, nfapi_p7_message_header_t* header)
{
......
......@@ -34,6 +34,7 @@
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h"
#include <math.h>
#include "nfapi/oai_integration/vendor_ext.h"
extern uint32_t from_earfcn(int eutra_bandP,uint32_t dl_earfcn);
extern int32_t get_uldl_offset(int eutra_bandP);
......@@ -409,6 +410,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
if (NFAPI_MODE!=NFAPI_MODE_VNF){
common_vars->rxdata = (int32_t **)NULL;
common_vars->txdataF = (int32_t **)malloc16(NB_ANTENNA_PORTS_ENB*sizeof(int32_t*));
common_vars->rxdataF = (int32_t **)malloc16(64*sizeof(int32_t*));
......@@ -512,6 +514,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++)
eNB->UE_stats_ptr[UE_id] = &eNB->UE_stats[UE_id];
}
eNB->pdsch_config_dedicated->p_a = dB0; //defaul value until overwritten by RRCConnectionReconfiguration
......
......@@ -38,7 +38,7 @@
#define CCEBITS 72
#define CCEPERSYMBOL 33 // This is for 1200 RE
#define CCEPERSYMBOL0 22 // This is for 1200 RE
#define DCI_BITS_MAX ((2*CCEPERSYMBOL+CCEPERSYMBOL0)*CCEBITS)
#define DCI_BITS_MAX ((2*CCEPERSYMBOL+CCEPERSYMBOL0)*CCEBITS + 64)
//#define Mquad (Msymb/4)
......
......@@ -379,9 +379,8 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
unsigned int G;
unsigned int crc=1;
unsigned char harq_pid = dlsch->harq_ids[frame%2][subframe];
if(harq_pid >= dlsch->Mdlharq) {
LOG_E(PHY,"dlsch_encoding_2threads illegal harq_pid %d\n", harq_pid);
if((harq_pid < 0) || (harq_pid >= dlsch->Mdlharq)) {
LOG_E(PHY,"dlsch_encoding_2threads illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
return(-1);
}
......@@ -564,7 +563,12 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
time_stats_t *i_stats) {
int encoding_return = 0;
unsigned int L,C,B;
B = dlsch->harq_processes[dlsch->harq_ids[frame%2][subframe]]->B;
uint8_t harq_pid = dlsch->harq_ids[frame%2][subframe];
if(harq_pid >= dlsch->Mdlharq) {
LOG_E(PHY,"dlsch_encoding_all illegal harq_pid %d\n", harq_pid);
return(-1);
}
B = dlsch->harq_processes[harq_pid]->B;
LOG_D(PHY,"B %d, harq_pid %d\n",B,dlsch->harq_ids[frame%2][subframe]);
......@@ -671,9 +675,8 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
unsigned int crc=1;
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
unsigned char harq_pid = dlsch->harq_ids[frame%2][subframe];
if(harq_pid >= dlsch->Mdlharq) {
LOG_E(PHY,"dlsch_encoding illegal harq_pid %d\n", harq_pid);
if((harq_pid < 0) || (harq_pid >= dlsch->Mdlharq)) {
LOG_E(PHY,"dlsch_encoding illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
return(-1);
}
......
......@@ -2257,8 +2257,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
if ((dlsch0 != NULL) && (dlsch1 != NULL)){
harq_pid = dlsch0->harq_ids[frame%2][subframe_offset];
if(harq_pid >= dlsch0->Mdlharq) {
LOG_E(PHY,"illegal harq_pid %d\n", harq_pid);
if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
return(-1);
}
dlsch0_harq = dlsch0->harq_processes[harq_pid];
......@@ -2278,8 +2278,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
}else if ((dlsch0 != NULL) && (dlsch1 == NULL)){
harq_pid = dlsch0->harq_ids[frame%2][subframe_offset];
if(harq_pid >= dlsch0->Mdlharq) {
LOG_E(PHY,"illegal harq_pid %d\n", harq_pid);
if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
return(-1);
}
dlsch0_harq = dlsch0->harq_processes[harq_pid];
......@@ -2299,8 +2299,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
}else if ((dlsch0 == NULL) && (dlsch1 != NULL)){
harq_pid = dlsch1->harq_ids[frame%2][subframe_offset];
if(harq_pid >= dlsch1->Mdlharq) {
LOG_E(PHY,"illegal harq_pid %d\n", harq_pid);
if((harq_pid < 0) || (harq_pid >= dlsch1->Mdlharq)) {
LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
return(-1);
}
dlsch1_harq = dlsch1->harq_processes[harq_pid];
......
......@@ -1063,7 +1063,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
#endif
}
for (l2=0,l=(nsymb>>1); l<(nsymb-1); l++,l2++) {
for (l2=0,l=(nsymb>>1); l < nsymb; l++,l2++) {
stat_re += (((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15))/nsymb;
stat_im += (((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15))/nsymb;
off+=2;
......@@ -1092,7 +1092,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
// stat_max *= nsymb; // normalize to energy per symbol
// stat_max /= (frame_parms->N_RB_UL*12); //
stat_max /= (nsymb*12);
stat_max /= 12;
#ifdef DEBUG_PUCCH_RX
printf("[eNB] PUCCH: stat %d, stat_max %d, phase_max %d\n", stat,stat_max,phase_max);
......@@ -1181,7 +1181,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
stat_ref_re=0;
stat_ref_im=0;
for (l2=0,l=(nsymb>>1); l<(nsymb-1); l++,l2++) {
for (l2=0,l=(nsymb>>1); l< nsymb; l++,l2++) {
if ((l2<2) || ((l2>(nsymb>>1) - 3)) ) { // data symbols
stat_re += ((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15);
stat_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15);
......
......@@ -328,6 +328,8 @@ typedef struct {
uint8_t subframe;
/// corresponding UE RNTI
uint16_t rnti;
/// UE ID from Layer2
uint16_t ue_id;
/// Type (SR, HARQ, CQI, HARQ_SR, HARQ_CQI, SR_CQI, HARQ_SR_CQI)
UCI_type_t type;
/// SRS active flag
......
......@@ -41,7 +41,7 @@ int16_t find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_
uint16_t i;
int16_t first_free_index=-1;
AssertFatal(eNB!=NULL,"eNB is null\n");
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
for (i=0; i<NUMBER_OF_UCI_VARS_MAX; i++) {
if ((eNB->uci_vars[i].active >0) &&
(eNB->uci_vars[i].rnti==rnti) &&
(eNB->uci_vars[i].frame==frame) &&
......
......@@ -521,7 +521,7 @@ typedef struct PHY_VARS_eNB_s {
LTE_eNB_PRACH prach_vars_br;
#endif
LTE_eNB_COMMON common_vars;
LTE_eNB_UCI uci_vars[NUMBER_OF_UE_MAX];
LTE_eNB_UCI uci_vars[NUMBER_OF_UCI_VARS_MAX];
LTE_eNB_SRS srs_vars[NUMBER_OF_UE_MAX];
LTE_eNB_PBCH pbch;
LTE_eNB_PUSCH *pusch_vars[NUMBER_OF_UE_MAX];
......
......@@ -42,9 +42,9 @@ int16_t *primary_synch2_time;
#include "PHY/MODULATION/modulation_vars.h"
PHY_VARS_UE ***PHY_vars_UE_g;
RAN_CONTEXT_t RC;
UL_RCC_IND_t UL_RCC_INFO;
unsigned short rev[2048],rev_times4[8192],rev_half[1024];
unsigned short rev256[256],rev512[512],rev1024[1024],rev4096[4096],rev2048[2048],rev8192[8192];
......
......@@ -42,7 +42,7 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req);
int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req);
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req);
int oai_nfapi_ue_release_req(nfapi_ue_release_request_t *release_req);
void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,
int frame, int subframe,
L1_rxtx_proc_t *proc,
......@@ -186,21 +186,11 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
#endif
harq_pid = dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_tx];
AssertFatal((harq_pid>=0) && (harq_pid<8),"harq_pid %d not in 0...7 frame:%d subframe:%d subframe(TX):%d rnti:%x UE_id:%d dlsch0[harq_ids:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d]\n",
harq_pid,
frame,subframe,
proc->subframe_tx,rel8->rnti,UE_id,
dlsch0->harq_ids[proc->frame_tx%2][0],
dlsch0->harq_ids[proc->frame_tx%2][1],
dlsch0->harq_ids[proc->frame_tx%2][2],
dlsch0->harq_ids[proc->frame_tx%2][3],
dlsch0->harq_ids[proc->frame_tx%2][4],
dlsch0->harq_ids[proc->frame_tx%2][5],
dlsch0->harq_ids[proc->frame_tx%2][6],
dlsch0->harq_ids[proc->frame_tx%2][7],
dlsch0->harq_ids[proc->frame_tx%2][8],
dlsch0->harq_ids[proc->frame_tx%2][9]
);
if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
return;
}
dlsch0_harq = dlsch0->harq_processes[harq_pid];
dlsch1_harq = dlsch1->harq_processes[harq_pid];
AssertFatal(dlsch0_harq!=NULL,"dlsch_harq is null\n");
......@@ -588,6 +578,7 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,
uci->frame = frame;
uci->subframe = subframe;
uci->rnti = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel8.rnti;
uci->ue_id = find_dlsch(ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE);
uci->type = SR;
uci->pucch_fmt = pucch_format1;
uci->num_antenna_ports = 1;
......@@ -615,6 +606,7 @@ void handle_uci_sr_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_
uci->frame = frame;
uci->subframe = subframe;
uci->rnti = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel8.rnti;
uci->ue_id = find_dlsch(ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE);
uci->type = HARQ_SR;
uci->num_antenna_ports = 1;
uci->num_pucch_resources = 1;
......@@ -638,6 +630,7 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu
uci->frame = frame;
uci->subframe = subframe;
uci->rnti = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti;
uci->ue_id = find_dlsch(ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE);
uci->type = HARQ;
uci->srs_active = srs_active;
uci->num_antenna_ports = ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel11.num_ant_ports;
......@@ -809,7 +802,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
harq_pid = subframe2harq_pid(fp,ul_frame,ul_subframe);
// clear DCI allocation maps for new subframe
if (NFAPI_MODE!=NFAPI_MODE_VNF)
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
if (eNB->ulsch[i]) {
ulsch_harq = eNB->ulsch[i]->harq_processes[harq_pid];
......@@ -825,7 +818,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
//LOG_D(PHY,"NFAPI: dl_pdu %d : type %d\n",i,dl_config_pdu->pdu_type);
switch (dl_config_pdu->pdu_type) {
case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE:
handle_nfapi_dci_dl_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu);
if (NFAPI_MODE!=NFAPI_MODE_VNF)
handle_nfapi_dci_dl_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu);
eNB->pdcch_vars[NFAPI_SFNSF2SF(DL_req->sfn_sf)&1].num_dci++;
//LOG_E(PHY,"Incremented num_dci:%d but already set??? dl_config:num_dci:%d\n", eNB->pdcch_vars[subframe&1].num_dci, number_dci);
do_oai=1;
......@@ -840,7 +834,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
do_oai=1;
//LOG_D(PHY,"%s() NFAPI_DL_CONFIG_BCH_PDU_TYPE TX:%d/%d RX:%d/%d TXREQ:%d/%d\n",
//__FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->frame_rx, proc->subframe_rx, NFAPI_SFNSF2SFN(TX_req->sfn_sf), NFAPI_SFNSF2SF(TX_req->sfn_sf));
handle_nfapi_bch_pdu(eNB,proc,dl_config_pdu,
if (NFAPI_MODE!=NFAPI_MODE_VNF)
handle_nfapi_bch_pdu(eNB,proc,dl_config_pdu,
TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index].segments[0].segment_data);
break;
......@@ -872,7 +867,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
dlsch_pdu_rel8->transport_blocks);
if (1) { //sdu != NULL)
handle_nfapi_dlsch_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu, dlsch_pdu_rel8->transport_blocks-1, sdu);
if (NFAPI_MODE!=NFAPI_MODE_VNF)
handle_nfapi_dlsch_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu, dlsch_pdu_rel8->transport_blocks-1, sdu);
} else {
dont_send=1;
LOG_E(MAC,"%s() NFAPI_DL_CONFIG_DLSCH_PDU_TYPE sdu is NULL DL_CFG:SFN/SF:%d:pdu_index:%d TX_REQ:SFN/SF:%d:pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(DL_req->sfn_sf), pdu_index,
......@@ -913,7 +909,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
case NFAPI_DL_CONFIG_MPDCCH_PDU_TYPE:
handle_nfapi_mpdcch_pdu(eNB,proc,dl_config_pdu);
if (NFAPI_MODE!=NFAPI_MODE_VNF)
handle_nfapi_mpdcch_pdu(eNB,proc,dl_config_pdu);
eNB->mpdcch_vars[subframe&1].num_dci++;
break;
#endif
......@@ -921,16 +918,24 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
}
if ((NFAPI_MODE!=NFAPI_MONOLITHIC) && do_oai && !dont_send) {
oai_nfapi_tx_req(Sched_INFO->TX_req);
if(Sched_INFO->TX_req->tx_request_body.number_of_pdus > 0){
Sched_INFO->TX_req->sfn_sf = frame << 4 | subframe;
oai_nfapi_tx_req(Sched_INFO->TX_req);
}
Sched_INFO->DL_req->sfn_sf = frame << 4 | subframe;
oai_nfapi_dl_config_req(Sched_INFO->DL_req); // DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu
Sched_INFO->UE_release_req->sfn_sf = frame << 4 | subframe;
oai_nfapi_ue_release_req(Sched_INFO->UE_release_req);
}
if ((NFAPI_MODE!=NFAPI_MONOLITHIC) && number_hi_dci0_pdu!=0) {
HI_DCI0_req->sfn_sf = frame << 4 | subframe;
oai_nfapi_hi_dci0_req(HI_DCI0_req);
eNB->pdcch_vars[NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf)&1].num_dci=0;
eNB->pdcch_vars[NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf)&1].num_pdcch_symbols=0;
}
if (NFAPI_MODE!=NFAPI_MODE_VNF)
for (i=0; i<number_hi_dci0_pdu; i++) {
hi_dci0_req_pdu = &HI_DCI0_req->hi_dci0_request_body.hi_dci0_pdu_list[i];
LOG_D(PHY,"NFAPI: hi_dci0_pdu %d : type %d\n",i,hi_dci0_req_pdu->pdu_type);
......@@ -955,6 +960,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
if (NFAPI_MODE!=NFAPI_MONOLITHIC) {
if (number_ul_pdu>0) {
//LOG_D(PHY, "UL_CONFIG to send to PNF\n");
UL_req->sfn_sf = frame << 4 | subframe;
oai_nfapi_ul_config_req(UL_req);
UL_req->ul_config_request_body.number_of_pdus=0;
number_ul_pdu=0;
......
This diff is collapsed.
......@@ -219,6 +219,7 @@ int is_srs_occasion_common(LTE_DL_FRAME_PARMS *frame_parms,int frame_tx,int subf
void compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeriodicity,uint16_t *psrsOffset);
void release_rnti_of_phy(module_id_t mod_id);
/*@}*/
......
......@@ -91,7 +91,7 @@ int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { return(0);}
int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return(0); }
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); }
int oai_nfapi_ue_release_req(nfapi_ue_release_request_t *release_req){ return(0); }
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); }
......@@ -619,8 +619,8 @@ int main(int argc, char **argv) {
eNB->UL_INFO.crc_ind.crc_indication_body.crc_pdu_list = eNB->crc_pdu_list;
eNB->UL_INFO.sr_ind.sr_indication_body.sr_pdu_list = eNB->sr_pdu_list;
eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list = eNB->harq_pdu_list;
eNB->UL_INFO.cqi_ind.cqi_pdu_list = eNB->cqi_pdu_list;
eNB->UL_INFO.cqi_ind.cqi_raw_pdu_list = eNB->cqi_raw_pdu_list;
eNB->UL_INFO.cqi_ind.cqi_indication_body.cqi_pdu_list = eNB->cqi_pdu_list;
eNB->UL_INFO.cqi_ind.cqi_indication_body.cqi_raw_pdu_list = eNB->cqi_raw_pdu_list;
printf("lte_param_init done\n");
// for a call to phy_reset_ue later we need PHY_vars_UE_g allocated and pointing to UE
PHY_vars_UE_g = (PHY_VARS_UE ** *)malloc(sizeof(PHY_VARS_UE **));
......
......@@ -25,4 +25,8 @@ MESSAGE_DEF(GTPV1U_ENB_DELETE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_del
MESSAGE_DEF(GTPV1U_ENB_DELETE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, gtpv1u_enb_delete_tunnel_resp_t, Gtpv1uDeleteTunnelResp)
MESSAGE_DEF(GTPV1U_ENB_TUNNEL_DATA_IND, MESSAGE_PRIORITY_MED, gtpv1u_enb_tunnel_data_ind_t, Gtpv1uTunnelDataInd)
MESSAGE_DEF(GTPV1U_ENB_TUNNEL_DATA_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_tunnel_data_req_t, Gtpv1uTunnelDataReq)
MESSAGE_DEF(GTPV1U_ENB_DATA_FORWARDING_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_data_forwarding_req_t,Gtpv1uDataForwardingReq)
MESSAGE_DEF(GTPV1U_ENB_DATA_FORWARDING_IND, MESSAGE_PRIORITY_MED, gtpv1u_enb_data_forwarding_ind_t,Gtpv1uDataForwardingInd)
MESSAGE_DEF(GTPV1U_ENB_END_MARKER_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_end_marker_req_t, Gtpv1uEndMarkerReq)
MESSAGE_DEF(GTPV1U_ENB_END_MARKER_IND, MESSAGE_PRIORITY_MED, gtpv1u_enb_end_marker_ind_t, Gtpv1uEndMarkerInd)
MESSAGE_DEF(GTPV1U_ENB_S1_REQ, MESSAGE_PRIORITY_MED, Gtpv1uS1Req, gtpv1uS1Req)
......@@ -33,10 +33,33 @@
#define GTPV1U_ENB_DELETE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uDeleteTunnelResp
#define GTPV1U_ENB_TUNNEL_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uTunnelDataInd
#define GTPV1U_ENB_TUNNEL_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uTunnelDataReq
#define GTPV1U_ENB_DATA_FORWARDING_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uDataForwardingReq
#define GTPV1U_ENB_DATA_FORWARDING_IND(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uDataForwardingInd
#define GTPV1U_ENB_END_MARKER_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uEndMarkerReq
#define GTPV1U_ENB_END_MARKER_IND(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uEndMarkerInd
#define GTPV1U_ENB_S1_REQ(mSGpTR) (mSGpTR)->ittiMsg.gtpv1uS1Req
#define GTPV1U_ALL_TUNNELS_TEID (teid_t)0xFFFFFFFF
typedef struct gtpv1u_enb_create_x2u_tunnel_req_s {
rnti_t rnti;
int num_tunnels;
teid_t tenb_X2u_teid[GTPV1U_MAX_BEARERS_PER_UE]; ///< Tunnel Endpoint Identifier
ebi_t eps_bearer_id[GTPV1U_MAX_BEARERS_PER_UE];
transport_layer_addr_t enb_addr[GTPV1U_MAX_BEARERS_PER_UE];
} gtpv1u_enb_create_x2u_tunnel_req_t;
typedef struct gtpv1u_enb_create_x2u_tunnel_resp_s {
uint8_t status; ///< Status of S1U endpoint creation (Failed = 0xFF or Success = 0x0)
rnti_t rnti;
int num_tunnels;
teid_t enb_X2u_teid[GTPV1U_MAX_BEARERS_PER_UE]; ///< Tunnel Endpoint Identifier
ebi_t eps_bearer_id[GTPV1U_MAX_BEARERS_PER_UE];
transport_layer_addr_t enb_addr;
} gtpv1u_enb_create_x2u_tunnel_resp_t;
typedef struct gtpv1u_enb_create_tunnel_req_s {
rnti_t rnti;
int num_tunnels;
......@@ -99,6 +122,50 @@ typedef struct gtpv1u_enb_tunnel_data_req_s {
rb_id_t rab_id;
} gtpv1u_enb_tunnel_data_req_t;
typedef struct gtpv1u_enb_data_forwarding_req_s {
uint8_t *buffer;
uint32_t length;
uint32_t offset; ///< start of message offset in buffer
rnti_t rnti;
rb_id_t rab_id;
} gtpv1u_enb_data_forwarding_req_t;
typedef struct gtpv1u_enb_data_forwarding_ind_s {
uint32_t frame;
uint8_t enb_flag;
uint32_t rb_id;
uint32_t muip;
uint32_t confirmp;
uint32_t sdu_size;
uint8_t *sdu_p;
uint8_t mode;
uint16_t rnti;
uint8_t module_id;
uint8_t eNB_index;
} gtpv1u_enb_data_forwarding_ind_t;
typedef struct gtpv1u_enb_end_marker_req_s {
uint8_t *buffer;
uint32_t length;
uint32_t offset; ///< start of message offset in buffer
rnti_t rnti;
rb_id_t rab_id;
} gtpv1u_enb_end_marker_req_t;
typedef struct gtpv1u_enb_end_marker_ind_s {
uint32_t frame;
uint8_t enb_flag;
uint32_t rb_id;
uint32_t muip;
uint32_t confirmp;
uint32_t sdu_size;
uint8_t *sdu_p;
uint8_t mode;
uint16_t rnti;
uint8_t module_id;
uint8_t eNB_index;
} gtpv1u_enb_end_marker_ind_t;
typedef struct {
in_addr_t enb_ip_address_for_S1u_S12_S4_up;
tcp_udp_port_t enb_port_for_S1u_S12_S4_up;
......
......@@ -107,6 +107,8 @@ typedef struct x2ap_register_enb_req_s {
lte_frame_type_t frame_type[MAX_NUM_CCs];
uint32_t fdd_earfcn_DL[MAX_NUM_CCs];
uint32_t fdd_earfcn_UL[MAX_NUM_CCs];
uint32_t subframeAssignment[MAX_NUM_CCs];
uint32_t specialSubframe[MAX_NUM_CCs];
int num_cc;
/* To be considered for TDD */
......
......@@ -157,7 +157,7 @@ void RCconfig_L1(void) {
LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_inst=1 this is because phy_init_RU() uses that to index and not RC.num_eNB - why the 2 similar variables?\n", __FUNCTION__);
LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_CC[0]=%d for init_eNB_afterRU()\n", __FUNCTION__, RC.nb_CC[0]);
LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_macrlc_inst:%d because used by mac_top_init_eNB()\n", __FUNCTION__, RC.nb_macrlc_inst);
//mac_top_init_eNB();
mac_top_init_eNB();
configure_nfapi_pnf(RC.eNB[j][0]->eth_params_n.remote_addr, RC.eNB[j][0]->eth_params_n.remote_portc, RC.eNB[j][0]->eth_params_n.my_addr, RC.eNB[j][0]->eth_params_n.my_portd,
RC.eNB[j][0]->eth_params_n .remote_portd);
} else { // other midhaul
......@@ -2505,6 +2505,8 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
X2AP_REGISTER_ENB_REQ (msg_p).frame_type[J] = FDD;
} else if (strcmp(ccparams_lte.frame_type, "TDD") == 0) {
X2AP_REGISTER_ENB_REQ (msg_p).frame_type[J] = TDD;
X2AP_REGISTER_ENB_REQ (msg_p).subframeAssignment[J] = ccparams_lte.tdd_config;
X2AP_REGISTER_ENB_REQ (msg_p).specialSubframe[J] = ccparams_lte.tdd_config_s;
} else {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n",
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
......@@ -27,7 +26,6 @@
* \version 0.1
* \email: navid.nikaein@eurecom.fr
* @ingroup _mac
*/
#include "COMMON/platform_types.h"
......@@ -81,56 +79,55 @@ typedef struct band_info_s {
} band_info_t;
static const eutra_bandentry_t eutra_bandtable[] = {
{1, 19200, 19800, 21100, 21700, 0 },
{2, 18500, 19100, 19300, 19900, 6000 },
{3, 17100, 17850, 18050, 18800, 12000},
{4, 17100, 17550, 21100, 21550, 19500},
{5, 8240, 8490, 8690, 8940, 24000},
{6, 8300, 8400, 8750, 8850, 26500},
{7, 25000, 25700, 26200, 26900, 27500},
{8, 8800, 9150, 9250, 9600, 34500},
{9, 17499, 17849, 18449, 18799, 38000},
{10, 17100, 17700, 21100, 21700, 41500},
{11, 14279, 14529, 14759, 15009, 47500},
{12, 6980, 7160, 7280, 7460, 50100},
{13, 7770, 7870, 7460, 7560, 51800},
{14, 7880, 7980, 7580, 7680, 52800},
{17, 7040, 7160, 7340, 7460, 57300},
{18, 8150, 9650, 8600, 10100, 58500},
{19, 8300, 8450, 8750, 8900, 60000},
{20, 8320, 8620, 7910, 8210, 61500},
{21, 14479, 14629, 14959, 15109, 64500},
{22, 34100, 34900, 35100, 35900, 66000},
{23, 20000, 20200, 21800, 22000, 75000},
{24, 16126, 16605, 15250, 15590, 77000},
{25, 18500, 19150, 19300, 19950, 80400},
{26, 8140, 8490, 8590, 8940, 86900},
{27, 8070, 8240, 8520, 8690, 90400},
{28, 7030, 7580, 7580, 8130, 92100},
{29, 0, 0, 7170, 7280, 96600},
{30, 23050, 23250, 23500, 23600, 97700},
{31, 45250, 34900, 46250, 35900, 98700},
{32, 0, 0, 14520, 14960, 99200},
{33, 19000, 19200, 19000, 19200, 36000},
{34, 20100, 20250, 20100, 20250, 36200},
{35, 18500, 19100, 18500, 19100, 36350},
{36, 19300, 19900, 19300, 19900, 36950},
{37, 19100, 19300, 19100, 19300, 37550},
{38, 25700, 26200, 25700, 26300, 37750},
{39, 18800, 19200, 18800, 19200, 38250},
{40, 23000, 24000, 23000, 24000, 38650},
{41, 24960, 26900, 24960, 26900, 39650},
{42, 34000, 36000, 34000, 36000, 41590},
{43, 36000, 38000, 36000, 38000, 43590},
{44, 7030, 8030, 7030, 8030, 45590},
{45, 14470, 14670, 14470, 14670, 46590},
{46, 51500, 59250, 51500, 59250, 46790},
{65, 19200, 20100, 21100, 22000, 65536},
{66, 17100, 18000, 21100, 22000, 66436},
{67, 0, 0, 7380, 7580, 67336},
{68, 6980, 7280, 7530, 7830, 67536}
{1, 19200, 19800, 21100, 21700, 0 },
{2, 18500, 19100, 19300, 19900, 6000 },
{3, 17100, 17850, 18050, 18800, 12000 },
{4, 17100, 17550, 21100, 21550, 19500 },
{5, 8240, 8490, 8690, 8940, 24000 },
{6, 8300, 8400, 8750, 8850, 26500 },
{7, 25000, 25700, 26200, 26900, 27500 },
{8, 8800, 9150, 9250, 9600, 34500 },
{9, 17499, 17849, 18449, 18799, 38000 },
{10, 17100, 17700, 21100, 21700, 41500 },
{11, 14279, 14529, 14759, 15009, 47500 },
{12, 6980, 7160, 7280, 7460, 50100 },
{13, 7770, 7870, 7460, 7560, 51800 },
{14, 7880, 7980, 7580, 7680, 52800 },
{17, 7040, 7160, 7340, 7460, 57300 },
{18, 8150, 9650, 8600, 10100, 58500 },
{19, 8300, 8450, 8750, 8900, 60000 },
{20, 8320, 8620, 7910, 8210, 61500 },
{21, 14479, 14629, 14959, 15109, 64500 },
{22, 34100, 34900, 35100, 35900, 66000 },
{23, 20000, 20200, 21800, 22000, 75000 },
{24, 16126, 16605, 15250, 15590, 77000 },
{25, 18500, 19150, 19300, 19950, 80400 },
{26, 8140, 8490, 8590, 8940, 86900 },
{27, 8070, 8240, 8520, 8690, 90400 },
{28, 7030, 7580, 7580, 8130, 92100 },
{29, 0, 0, 7170, 7280, 96600 },
{30, 23050, 23250, 23500, 23600, 97700 },
{31, 45250, 34900, 46250, 35900, 98700 },
{32, 0, 0, 14520, 14960, 99200 },
{33, 19000, 19200, 19000, 19200, 360000},
{34, 20100, 20250, 20100, 20250, 362000},
{35, 18500, 19100, 18500, 19100, 363500},
{36, 19300, 19900, 19300, 19900, 369500},
{37, 19100, 19300, 19100, 19300, 375500},
{38, 25700, 26200, 25700, 26300, 377500},
{39, 18800, 19200, 18800, 19200, 382500},
{40, 23000, 24000, 23000, 24000, 386500},
{41, 24960, 26900, 24960, 26900, 396500},
{42, 34000, 36000, 34000, 36000, 415900},
{43, 36000, 38000, 36000, 38000, 435900},
{44, 7030, 8030, 7030, 8030, 455900},
{45, 14470, 14670, 14470, 14670, 465900},
{46, 51500, 59250, 51500, 59250, 467900},
{65, 19200, 20100, 21100, 22000, 655360},
{66, 17100, 18000, 21100, 22000, 664360},
{67, 0, 0, 7380, 7580, 67336 },
{68, 6980, 7280, 7530, 7830, 67536 }
};
......
......@@ -600,10 +600,10 @@ typedef struct {
uint32_t rbs_used_retx_rx;
/// total rb used for a new uplink transmission
uint32_t total_rbs_used_rx;
/// normalized rx power
int32_t normalized_rx_power;
/// target rx power
int32_t target_rx_power;
/// snr
int32_t snr;
/// target snr
int32_t target_snr;
/// num rx pdu
uint32_t num_pdu_rx[NB_RB_MAX];
......
......@@ -128,9 +128,11 @@ void schedule_SRS(module_id_t module_idP,
continue;
}
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated != NULL,
"physicalConfigDedicated is null for UE %d\n",
UE_id);
if(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated == NULL) {
LOG_E(MAC,"physicalConfigDedicated is null for UE %d\n",UE_id);
printf("physicalConfigDedicated is null for UE %d\n",UE_id);
return;
}
/* CDRX condition on Active Time and SRS type-0 report (36.321 5.7) */
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
......@@ -464,6 +466,7 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
DL_req[CC_id].dl_config_request_body.number_dci++;
DL_req[CC_id].dl_config_request_body.number_pdu++;
DL_req[CC_id].dl_config_request_body.tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
LOG_D(MAC,
"UE %d rnti %x: sending PDCCH order for RAPROC (failure timer %d), resource_block_coding %d \n",
UE_id, rnti,
......@@ -508,6 +511,13 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync = 1;
}
} // ul_failure_timer>0
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer++;
if((U_PLANE_INACTIVITY_VALUE != 0) && (UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer > (U_PLANE_INACTIVITY_VALUE * 10))){
LOG_D(MAC,"UE %d rnti %x: U-Plane Failure after repeated PDCCH orders: Triggering RRC \n",UE_id,rnti);
mac_eNB_rrc_uplane_failure(module_idP,CC_id,frameP,subframeP,rnti);
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
}// time > 60s
}
void
......
......@@ -868,8 +868,10 @@ generate_Msg4(module_id_t module_idP,
ul_config_pdu = &ul_req_body->ul_config_pdu_list[ul_req_body->number_of_pdus];
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE;
ul_config_pdu->pdu_size = (uint8_t) (2 + sizeof (nfapi_ul_config_uci_harq_pdu));
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.handle = 0; // don't know how to use this
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti = ra->rnti;
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL13_TAG;
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.ue_type = (ra->rach_resource_type < 3) ? 1 : 2;
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.empty_symbols = 0;
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.total_number_of_repetitions = pucchreps[ra->rach_resource_type - 1];
......@@ -957,9 +959,12 @@ generate_Msg4(module_id_t module_idP,
1, // tpc, none
getRIV(N_RB_DL, first_rb, 4), // resource_block_coding
ra->msg4_mcs, // mcs
1, // ndi
1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
0, // rv
0); // vrb_flag
UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid] = 1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid];
LOG_D(MAC,
"Frame %d, subframe %d: Msg4 DCI pdu_num %d (rnti %x,rnti_type %d,harq_pid %d, resource_block_coding (%p) %d\n",
frameP, subframeP, dl_req_body->number_pdu,
......@@ -1049,7 +1054,7 @@ generate_Msg4(module_id_t module_idP,
mac->TX_req[CC_idP].sfn_sf =
fill_nfapi_tx_req(&mac->TX_req[CC_idP].tx_request_body,
(frameP * 10) + subframeP,
rrc_sdu_length,
rrc_sdu_length+offset,
mac->pdu_index[CC_idP],
mac->UE_list.
DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0]);
......@@ -1194,7 +1199,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
1, // tpc, none
getRIV(N_RB_DL, first_rb, 4), // resource_block_coding
ra->msg4_mcs, // mcs
1, // ndi
UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
round & 3, // rv
0); // vrb_flag
......
......@@ -1158,6 +1158,7 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
LOG_D(MAC, "Frame %d: Subframe %d : Adding common DCI for S_RNTI\n", frameP, subframeP);
dl_req->number_dci++;
dl_req->number_pdu++;
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu, 0,
sizeof(nfapi_dl_config_request_pdu_t));
......@@ -1188,6 +1189,7 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
dl_req->number_pdu++;
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
// Rel10 fields
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
......
......@@ -489,7 +489,7 @@ schedule_ue_spec(module_id_t module_idP,
COMMON_channels_t *cc = eNB->common_channels;
UE_list_t *UE_list = &eNB->UE_list;
int continue_flag = 0;
int32_t normalized_rx_power, target_rx_power;
int32_t snr, target_snr;
int tpc = 1;
UE_sched_ctrl_t *ue_sched_ctrl;
int mcs;
......@@ -718,9 +718,12 @@ schedule_ue_spec(module_id_t module_idP,
eNB_UE_stats->harq_pid = harq_pid;
eNB_UE_stats->harq_round = round_DL;
if (eNB_UE_stats->rrc_status < RRC_RECONFIGURED) {
ue_sched_ctrl->uplane_inactivity_timer = 0;
}
if (eNB_UE_stats->rrc_status < RRC_CONNECTED) {
LOG_D(MAC, "UE %d is not in RRC_CONNECTED\n",
UE_id);
LOG_D(MAC, "UE %d is not in RRC_CONNECTED\n", UE_id);
continue;
}
......@@ -734,7 +737,7 @@ schedule_ue_spec(module_id_t module_idP,
eNB_UE_stats->dl_cqi, MIN_CQI_VALUE, MAX_CQI_VALUE);
*/
if (NFAPI_MODE != NFAPI_MONOLITHIC) {
eNB_UE_stats->dlsch_mcs1 = 10; // cqi_to_mcs[ue_sched_ctrl->dl_cqi[CC_id]];
eNB_UE_stats->dlsch_mcs1 = cqi_to_mcs[ue_sched_ctrl->dl_cqi[CC_id]];
} else { // this operation is also done in the preprocessor
eNB_UE_stats->dlsch_mcs1 = cmin(eNB_UE_stats->dlsch_mcs1,
eNB->slice_info.dl[slice_idxP].maxmcs); // cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs);
......@@ -1007,9 +1010,11 @@ schedule_ue_spec(module_id_t module_idP,
, 0
#endif
);
pthread_mutex_lock(&rrc_release_freelist);
if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)) {
while(pthread_mutex_trylock(&rrc_release_freelist)){
/* spin... */
}
uint16_t release_total = 0;
for (release_num = 0, release_ctrl = &rrc_release_info.RRC_release_ctrl[0];
......@@ -1056,9 +1061,9 @@ schedule_ue_spec(module_id_t module_idP,
if(release_total >= rrc_release_info.num_UEs)
break;
}
pthread_mutex_unlock(&rrc_release_freelist);
}
pthread_mutex_unlock(&rrc_release_freelist);
for (ra_ii = 0, ra = &eNB->common_channels[CC_id].ra[0]; ra_ii < NB_RA_PROC_MAX; ra_ii++, ra++) {
if ((ra->rnti == rnti) && (ra->state == MSGCRNTI)) {
......@@ -1478,11 +1483,11 @@ schedule_ue_spec(module_id_t module_idP,
}
// do PUCCH power control
// this is the normalized RX power
// this is the snr
// unit is not dBm, it's special from nfapi
// converting to dBm: ToDo: Noise power hard coded to 30
normalized_rx_power = (((5 * ue_sched_ctrl->pucch1_snr[CC_id]) - 640) / 10) + 30;
target_rx_power= (eNB->puCch10xSnr / 10) + 30;
// converting to dBm
snr = (5 * ue_sched_ctrl->pucch1_snr[CC_id] - 640) / 10;
target_snr = eNB->puCch10xSnr / 10;
// this assumes accumulated tpc
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
int32_t framex10psubframe = ue_template->pucch_tpc_tx_frame * 10 + ue_template->pucch_tpc_tx_subframe;
......@@ -1494,22 +1499,22 @@ schedule_ue_spec(module_id_t module_idP,
ue_template->pucch_tpc_tx_frame = frameP;
ue_template->pucch_tpc_tx_subframe = subframeP;
if (normalized_rx_power > (target_rx_power + 4)) {
if (snr > target_snr + 4) {
tpc = 0; //-1
} else if (normalized_rx_power < (target_rx_power - 4)) {
} else if (snr < target_snr - 4) {
tpc = 2; //+1
} else {
tpc = 1; //0
}
LOG_D(MAC, "[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, normalized/target rx power %d/%d\n",
LOG_D(MAC, "[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, snr/target snr %d/%d\n",
module_idP,
frameP,
subframeP,
harq_pid,
tpc,
normalized_rx_power,
target_rx_power);
snr,
target_snr);
} // Po_PUCCH has been updated
else {
tpc = 1; //0
......@@ -1890,8 +1895,8 @@ schedule_ue_spec_br(module_id_t module_idP,
int round_DL = 0;
int ta_update = 0;
int32_t tpc = 1;
int32_t normalized_rx_power = 0;
int32_t target_rx_power = 0;
int32_t snr = 0;
int32_t target_snr = 0;
uint16_t TBS = 0;
uint16_t j = 0;
uint16_t sdu_lengths[NB_RB_MAX];
......@@ -2369,10 +2374,10 @@ schedule_ue_spec_br(module_id_t module_idP,
T_INT(harq_pid),
T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], TBS));
/* Do PUCCH power control */
/* This is the normalized RX power */
/* TODO: fix how we deal with power, unit is not dBm, it's special from nfapi */
normalized_rx_power = (5 * ue_sched_ctl->pucch1_snr[CC_id]-640) / 10 + 30;
target_rx_power = mac->puCch10xSnr / 10 + 30;
/* This is the snr */
/* unit is not dBm, it's special from nfapi, convert to dBm */
snr = (5 * ue_sched_ctl->pucch1_snr[CC_id] - 640) / 10;
target_snr = mac->puCch10xSnr / 10;
/* This assumes accumulated tpc */
/* Make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out */
int32_t framex10psubframe = UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame * 10 + UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe;
......@@ -2385,22 +2390,22 @@ schedule_ue_spec_br(module_id_t module_idP,
UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame = frameP;
UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe = subframeP;
if (normalized_rx_power > (target_rx_power + 4)) {
if (snr > target_snr + 4) {
tpc = 0; //-1
} else if (normalized_rx_power<(target_rx_power - 4)) {
} else if (snr < target_snr - 4) {
tpc = 2; //+1
} else {
tpc = 1; //0
}
LOG_D(MAC,"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, normalized/target rx power %d/%d\n",
LOG_D(MAC,"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, snr/target snr %d/%d\n",
module_idP,
frameP,
subframeP,
harq_pid,
tpc,
normalized_rx_power,
target_rx_power);
snr,
target_snr);
} else { // Po_PUCCH has been updated
tpc = 1; // 0
}
......@@ -3085,11 +3090,9 @@ schedule_PCH(module_id_t module_idP,
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // no TPC
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 1;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 1;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(n_rb_dl,
first_rb,
4);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(n_rb_dl, first_rb, 4);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.virtual_resource_block_assignment_flag = 0;
#endif
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = 4;
......
This diff is collapsed.
......@@ -199,8 +199,8 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
uint8_t mcs = 20;
uint8_t harq_pid = 0;
uint32_t cqi_req = 0,cshift,ndi,tpc = 1;
int32_t normalized_rx_power;
int32_t target_rx_power= 178;
int32_t snr;
int32_t target_snr = 10; /* TODO: target_rx_power was 178, what to put? is it meaningful? */
int CC_id = 0;
int nb_rb = 24;
int N_RB_UL;
......@@ -258,15 +258,15 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
//power control
//compute the expected ULSCH RX power (for the stats)
// this is the normalized RX power and this should be constant (regardless of mcs
normalized_rx_power = (5*UE_sched_ctrl->pusch_snr[CC_id]-640)/10+30;
// this is the snr and this should be constant (regardless of mcs)
snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
// new transmission
ndi = 1-UE_template->oldNDI_UL[harq_pid];
UE_template->oldNDI_UL[harq_pid]=ndi;
UE_list->eNB_UE_stats[CC_id][UE_id].normalized_rx_power=normalized_rx_power;
UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power=target_rx_power;
UE_list->eNB_UE_stats[CC_id][UE_id].snr = snr;
UE_list->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = mcs;
UE_template->mcs_UL[harq_pid] = mcs;//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs;
......
......@@ -2193,8 +2193,8 @@ add_new_ue(module_id_t mod_idP,
UE_list->UE_sched_ctrl[UE_id].ta_update = 31;
for (j = 0; j < 8; j++) {
UE_list->UE_template[cc_idP][UE_id].oldNDI[j] = (j == 0) ? 1 : 0; // 1 because first transmission is with format1A (Msg4) for harq_pid 0
UE_list->UE_template[cc_idP][UE_id].oldNDI_UL[j] = (j == harq_pidP) ? 0 : 1; // 1st transmission is with Msg3;
UE_list->UE_template[cc_idP][UE_id].oldNDI[j] = 0;
UE_list->UE_template[cc_idP][UE_id].oldNDI_UL[j] = 0;
UE_list->UE_sched_ctrl[UE_id].round[cc_idP][j] = 8;
UE_list->UE_sched_ctrl[UE_id].round_UL[cc_idP][j] = 0;
}
......@@ -2319,9 +2319,10 @@ rrc_mac_remove_ue(module_id_t mod_idP,
rntiP);
}
pthread_mutex_lock(&rrc_release_freelist);
if (rrc_release_info.num_UEs > 0) {
if(rrc_release_info.num_UEs > 0){
while(pthread_mutex_trylock(&rrc_release_freelist)) {
/* spin... */
}
uint16_t release_total = 0;
for (uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
......@@ -2341,6 +2342,7 @@ rrc_mac_remove_ue(module_id_t mod_idP,
break;
}
}
pthread_mutex_unlock(&rrc_release_freelist);
}
pthread_mutex_unlock(&rrc_release_freelist);
......
......@@ -460,7 +460,7 @@ rx_sdu(const module_id_t enb_mod_idP,
if (RA_id != -1) {
RA_t *ra = &(mac->common_channels[CC_idP].ra[RA_id]);
mac_rrc_data_ind(enb_mod_idP,
int8_t ret = mac_rrc_data_ind(enb_mod_idP,
CC_idP,
frameP, subframeP,
UE_id,
......@@ -474,6 +474,7 @@ rx_sdu(const module_id_t enb_mod_idP,
#endif
);
/* Received a new rnti */
if (ret == 0) {
ra->state = MSGCRNTI;
LOG_I(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Received rnti(Msg4)\n",
enb_mod_idP,
......@@ -502,6 +503,9 @@ rx_sdu(const module_id_t enb_mod_idP,
}
UE_template_ptr->ul_SR = 1;
UE_scheduling_control->crnti_reconfigurationcomplete_flag = 1;
} else {
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
}
// break;
}
}
......@@ -797,6 +801,10 @@ rx_sdu(const module_id_t enb_mod_idP,
mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL); //(unsigned int*)crc_status);
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];
if (mac_eNB_get_rrc_status(enb_mod_idP, current_rnti) < RRC_RECONFIGURED) {
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
}
}
break;
......@@ -1329,8 +1337,8 @@ schedule_ulsch_rnti(module_id_t module_idP,
uint32_t cshift = 0;
uint32_t ndi = 0;
uint32_t tpc = 0;
int32_t normalized_rx_power = 0;
int32_t target_rx_power = 0;
int32_t snr = 0;
int32_t target_snr = 0;
int32_t framex10psubframe = 0;
static int32_t tpc_accumulated = 0;
int sched_frame = 0;
......@@ -1555,13 +1563,12 @@ schedule_ulsch_rnti(module_id_t module_idP,
/* Power control */
/*
* Compute the expected ULSCH RX power (for the stats)
* This is the normalized RX power and this should be constant (regardless of mcs)
* Compute the expected ULSCH RX snr (for the stats)
* This is the normalized RX snr and this should be constant (regardless of mcs)
* Is not in dBm, unit from nfapi, converting to dBm
* ToDo: Noise power hard coded to 30
*/
normalized_rx_power = ((5 * UE_sched_ctrl_ptr->pusch_snr[CC_id] - 640) / 10) + 30;
target_rx_power = (mac->puSch10xSnr / 10) + 30;
snr = (5 * UE_sched_ctrl_ptr->pusch_snr[CC_id] - 640) / 10;
target_snr = mac->puSch10xSnr / 10;
/*
* This assumes accumulated tpc
......@@ -1575,10 +1582,10 @@ schedule_ulsch_rnti(module_id_t module_idP,
UE_template_ptr->pusch_tpc_tx_frame = frameP;
UE_template_ptr->pusch_tpc_tx_subframe = subframeP;
if (normalized_rx_power > (target_rx_power + 4)) {
if (snr > target_snr + 4) {
tpc = 0; // -1
tpc_accumulated--;
} else if (normalized_rx_power < (target_rx_power - 4)) {
} else if (snr < target_snr - 4) {
tpc = 2; // +1
tpc_accumulated++;
} else {
......@@ -1589,21 +1596,21 @@ schedule_ulsch_rnti(module_id_t module_idP,
}
if (tpc != 1) {
LOG_D(MAC, "[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, normalized/target rx power %d/%d\n",
LOG_D(MAC, "[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
module_idP,
frameP,
subframeP,
harq_pid,
tpc,
tpc_accumulated,
normalized_rx_power,
target_rx_power);
snr,
target_snr);
}
ndi = 1 - UE_template_ptr->oldNDI_UL[harq_pid]; // NDI: new data indicator
UE_template_ptr->oldNDI_UL[harq_pid] = ndi;
UE_list->eNB_UE_stats[CC_id][UE_id].normalized_rx_power = normalized_rx_power;
UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power = target_rx_power;
UE_list->eNB_UE_stats[CC_id][UE_id].snr = snr;
UE_list->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
UE_template_ptr->mcs_UL[harq_pid] = cmin(UE_template_ptr->pre_assigned_mcs_ul, sli->ul[slice_idx].maxmcs);
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1= UE_template_ptr->mcs_UL[harq_pid];
......@@ -1941,8 +1948,8 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
uint8_t status = 0;
uint32_t cshift = 0;
uint32_t ndi = 0;
int32_t normalized_rx_power = 0;
int32_t target_rx_power = -90;
int32_t snr = 0;
int32_t target_snr = 0;
int n = 0;
int CC_id = 0;
int N_RB_UL = 0;
......@@ -2050,10 +2057,10 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
UE_template->ul_SR = 0;
status = mac_eNB_get_rrc_status(module_idP,rnti);
cqi_req = 0;
/* Power control: compute the expected ULSCH RX power (for the stats) */
/* This is the normalized RX power and this should be constant (regardless of mcs) */
normalized_rx_power = UE_sched_ctrl->pusch_snr[CC_id];
target_rx_power = 178;
/* Power control: compute the expected ULSCH RX snr (for the stats) */
/* This is the normalized snr and this should be constant (regardless of mcs) */
snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
target_snr = eNB->puSch10xSnr / 10; /* TODO: target_rx_power was 178, what to put? */
/* This assumes accumulated tpc */
/* Make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out */
int32_t framex10psubframe = UE_template->pusch_tpc_tx_frame * 10 + UE_template->pusch_tpc_tx_subframe;
......@@ -2063,10 +2070,10 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
UE_template->pusch_tpc_tx_frame = frameP;
UE_template->pusch_tpc_tx_subframe = subframeP;
if (normalized_rx_power > (target_rx_power + 4)) {
if (snr > target_snr + 4) {
tpc = 0; //-1
UE_sched_ctrl->tpc_accumulated[CC_id]--;
} else if (normalized_rx_power < (target_rx_power - 4)) {
} else if (snr < target_snr - 4) {
tpc = 2; //+1
UE_sched_ctrl->tpc_accumulated[CC_id]++;
} else {
......@@ -2077,15 +2084,15 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
}
if (tpc != 1) {
LOG_D(MAC,"[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, normalized/target rx power %d/%d\n",
LOG_D(MAC,"[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
module_idP,
frameP,
subframeP,
harq_pid,
tpc,
UE_sched_ctrl->tpc_accumulated[CC_id],
normalized_rx_power,
target_rx_power);
snr,
target_snr);
}
/* New transmission */
......@@ -2094,8 +2101,8 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
UE_template->oldNDI_UL[harq_pid] = ndi;
UE_template->mcs_UL[harq_pid] = 4;
UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid], 6);
UE_list->eNB_UE_stats[CC_id][UE_id].normalized_rx_power = normalized_rx_power;
UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power = target_rx_power;
UE_list->eNB_UE_stats[CC_id][UE_id].snr = snr;
UE_list->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = 4;
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = UE_template->mcs_UL[harq_pid];
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += 6;
......
......@@ -169,7 +169,7 @@
#define MAX_NUM_SLICES 10
#define U_PLANE_INACTIVITY_VALUE 6000
#define U_PLANE_INACTIVITY_VALUE 0 /* defined 10ms order (zero means infinity) */
/*
* eNB part
......@@ -754,10 +754,10 @@ typedef struct {
uint32_t rbs_used_retx_rx;
/// total rb used for a new uplink transmission
uint32_t total_rbs_used_rx;
/// normalized rx power
int32_t normalized_rx_power;
/// target rx power
int32_t target_rx_power;
/// snr
int32_t snr;
/// target snr
int32_t target_snr;
/// num rx pdu
uint32_t num_pdu_rx[NB_RB_MAX];
......@@ -1438,6 +1438,8 @@ typedef struct eNB_MAC_INST_s {
tx_request_pdu[NFAPI_CC_MAX][MAX_NUM_TX_REQUEST_PDU];
/// NFAPI DL PDU structure
nfapi_tx_request_t TX_req[NFAPI_CC_MAX];
/// NFAPI UE_release_req structure
nfapi_ue_release_request_t UE_release_req;
/// UL handle
uint32_t ul_handle;
UE_list_t UE_list;
......
......@@ -806,6 +806,7 @@ mem_block_t * rlc_am_get_pdu_to_retransmit(
rlc_sn_t sn = rlc_pP->vt_a;
rlc_sn_t sn_end = rlc_pP->vt_s;
mem_block_t* pdu_p = NULL;
mem_block_t* mb_p = NULL;
rlc_am_tx_data_pdu_management_t* tx_data_pdu_management;
//Assertion(eNB)_PRAN_DesignDocument_annex No.769
if((rlc_pP->retrans_num_pdus <= 0) || (rlc_pP->vt_a == rlc_pP->vt_s))
......@@ -884,6 +885,18 @@ mem_block_t * rlc_am_get_pdu_to_retransmit(
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
tx_data_pdu_management->retx_count_next,
sn);
mb_p = rlc_pP->tx_data_pdu_buffer[sn % RLC_AM_WINDOW_SIZE].mem_block;
if(mb_p != NULL){
free_mem_block(mb_p, __func__);
tx_data_pdu_management->mem_block = NULL;
tx_data_pdu_management->flags.retransmit = 0;
tx_data_pdu_management->flags.ack = 1;
tx_data_pdu_management->flags.transmitted = 0;
rlc_pP->retrans_num_bytes_to_retransmit -= tx_data_pdu_management->retx_payload_size;
tx_data_pdu_management->retx_payload_size = 0;
tx_data_pdu_management->num_holes = 0;
rlc_pP->retrans_num_pdus --;
}
}
}
else if (rlc_pP->nb_bytes_requested_by_mac >= 5)
......@@ -938,6 +951,18 @@ mem_block_t * rlc_am_get_pdu_to_retransmit(
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
tx_data_pdu_management->retx_count_next,
sn);
mb_p = rlc_pP->tx_data_pdu_buffer[sn % RLC_AM_WINDOW_SIZE].mem_block;
if(mb_p != NULL){
free_mem_block(mb_p, __func__);
tx_data_pdu_management->mem_block = NULL;
tx_data_pdu_management->flags.retransmit = 0;
tx_data_pdu_management->flags.ack = 1;
tx_data_pdu_management->flags.transmitted = 0;
rlc_pP->retrans_num_bytes_to_retransmit -= tx_data_pdu_management->retx_payload_size;
tx_data_pdu_management->retx_payload_size = 0;
tx_data_pdu_management->num_holes = 0;
rlc_pP->retrans_num_pdus --;
}
}
}
......
......@@ -938,7 +938,7 @@ rlc_am_rx_check_all_byte_segments(
rlc_am_pdu_info_t *pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
mem_block_t *cursor_p = NULL;
mem_block_t *first_cursor_p = NULL;
rlc_sn_t sn = pdu_info_p->sn;
rlc_usn_t sn = pdu_info_p->sn;
sdu_size_t next_waited_so;
sdu_size_t last_end_so;
......@@ -969,6 +969,9 @@ rlc_am_rx_check_all_byte_segments(
// the so field of the first PDU should be 0
//cursor_p = list.head;
//we start from the first stored PDU segment of this SN
if(cursor_p->data == NULL){
return;
}
pdu_info_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
// if the first segment does not have SO = 0 then no need to continue
......@@ -985,6 +988,9 @@ rlc_am_rx_check_all_byte_segments(
while (cursor_p->next != NULL) {
//msg("rlc_am_rx_check_all_byte_segments(%d) @4\n",sn);
cursor_p = cursor_p->next;
if(cursor_p->data == NULL){
return;
}
pdu_info_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
if (pdu_info_p->sn == sn) {
......
......@@ -358,8 +358,6 @@ void rlc_am_segment_10 (
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
pdu_remaining_size);
//msg ("[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] pdu_mem_p %p pdu_p %p pdu_p->data %p data %p data_sdu_p %p pdu_remaining_size %d\n", rlc_pP->module_id, rlc_pP->rb_id, ctxt_pP->frame, pdu_mem_p, pdu_p, pdu_p->data, data, data_sdu_p,pdu_remaining_size);
rlc_am_mui.rrc_mui[rlc_am_mui.rrc_mui_num] = sdu_mngt_p->mui;
rlc_am_mui.rrc_mui_num++;
memcpy(data, data_sdu_p, pdu_remaining_size);
pdu_mngt_p->payload_size += pdu_remaining_size;
......@@ -397,8 +395,6 @@ void rlc_am_segment_10 (
continue_fill_pdu_with_sdu = 0;
pdu_remaining_size = 0;
} else if ((sdu_mngt_p->sdu_remaining_size + (li_length_in_bytes ^ 3)) < pdu_remaining_size ) {
rlc_am_mui.rrc_mui[rlc_am_mui.rrc_mui_num] = sdu_mngt_p->mui;
rlc_am_mui.rrc_mui_num++;
if (fill_num_li == (RLC_AM_MAX_SDU_IN_PDU - 1)) {
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEGMENT] [SIZE %d] REACHING RLC_AM_MAX_SDU_IN_PDU LIs -> STOP SEGMENTATION FOR THIS PDU SDU\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
......@@ -416,6 +412,8 @@ void rlc_am_segment_10 (
// reduce the size of the PDU
continue_fill_pdu_with_sdu = 0;
fi_last_byte_pdu_is_last_byte_sdu = 1;
rlc_am_mui.rrc_mui[rlc_am_mui.rrc_mui_num] = sdu_mngt_p->mui;
rlc_am_mui.rrc_mui_num++;
} else {
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEGMENT] Filling PDU with %d all remaining bytes of SDU\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
......
......@@ -176,13 +176,13 @@ int dump_eNB_l2_stats(char *buffer, int length) {
UE_list->eNB_UE_stats[CC_id][UE_id].total_overhead_bytes,
UE_list->eNB_UE_stats[CC_id][UE_id].avg_overhead_bytes
);
len += sprintf(&buffer[len],"[MAC] UE %d (ULSCH), Status %s, Failute timer %d, RNTI %x : rx power (normalized %d, target %d), MCS (pre %d, post %d), RB (rx %d, retx %d, total %d), Current TBS %d \n",
len += sprintf(&buffer[len],"[MAC] UE %d (ULSCH), Status %s, Failute timer %d, RNTI %x : snr (%d, target %d), MCS (pre %d, post %d), RB (rx %d, retx %d, total %d), Current TBS %d \n",
UE_id,
map_int_to_str(rrc_status_names, UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status),
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer,
UE_list->eNB_UE_stats[CC_id][UE_id].crnti,
UE_list->eNB_UE_stats[CC_id][UE_id].normalized_rx_power,
UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power,
UE_list->eNB_UE_stats[CC_id][UE_id].snr,
UE_list->eNB_UE_stats[CC_id][UE_id].target_snr,
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1,
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2,
UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used_rx,
......
This diff is collapsed.
......@@ -71,7 +71,7 @@ typedef struct{
nfapi_sr_indication_t sr_ind;
/// CQI indication list
nfapi_cqi_indication_body_t cqi_ind;
nfapi_cqi_indication_t cqi_ind;
/// RACH indication list
nfapi_rach_indication_t rach_ind;
......@@ -90,7 +90,27 @@ typedef struct{
} UL_IND_t;
// Downlink subframe P7
#define NUM_NFPAI_SUBFRAME 5
typedef struct{
/// harq indication list
nfapi_harq_indication_t harq_ind[NUM_NFPAI_SUBFRAME];
/// crc indication list
nfapi_crc_indication_t crc_ind[NUM_NFPAI_SUBFRAME];
/// SR indication list
nfapi_sr_indication_t sr_ind[NUM_NFPAI_SUBFRAME];
/// CQI indication list
nfapi_cqi_indication_t cqi_ind[NUM_NFPAI_SUBFRAME];
/// RACH indication list
nfapi_rach_indication_t rach_ind[NUM_NFPAI_SUBFRAME];
/// RX indication
nfapi_rx_indication_t rx_ind[NUM_NFPAI_SUBFRAME];
} UL_RCC_IND_t;
typedef struct{
/// Module ID
......@@ -109,6 +129,8 @@ typedef struct{
nfapi_hi_dci0_request_t *HI_DCI0_req;
/// Pointers to DL SDUs
nfapi_tx_request_t *TX_req;
/// Pointers to ue_release
nfapi_ue_release_request_t *UE_release_req;
}Sched_Rsp_t;
typedef struct {
......
......@@ -236,8 +236,8 @@ void fill_ulsch_cqi_indication_UE_MAC(int Mod_id, uint16_t frame,uint8_t subfram
// change for mutiple UE's simulation.
//pthread_mutex_lock(&UE_mac_inst[Mod_id].UL_INFO_mutex);
pthread_mutex_lock(&fill_ul_mutex.cqi_mutex);
nfapi_cqi_indication_pdu_t *pdu = &UL_INFO->cqi_ind.cqi_pdu_list[UL_INFO->cqi_ind.number_of_cqis];
nfapi_cqi_indication_raw_pdu_t *raw_pdu = &UL_INFO->cqi_ind.cqi_raw_pdu_list[UL_INFO->cqi_ind.number_of_cqis];
nfapi_cqi_indication_pdu_t *pdu = &UL_INFO->cqi_ind.cqi_indication_body.cqi_pdu_list[UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis];
nfapi_cqi_indication_raw_pdu_t *raw_pdu = &UL_INFO->cqi_ind.cqi_indication_body.cqi_raw_pdu_list[UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis];
pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG;
pdu->rx_ue_information.rnti = rnti;
......@@ -263,7 +263,7 @@ void fill_ulsch_cqi_indication_UE_MAC(int Mod_id, uint16_t frame,uint8_t subfram
UL_INFO->cqi_ind.number_of_cqis++;
UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis++;
// change for mutiple UE's simulation.
//pthread_mutex_unlock(&UE_mac_inst[Mod_id].UL_INFO_mutex);
pthread_mutex_unlock(&fill_ul_mutex.cqi_mutex);
......
......@@ -310,10 +310,13 @@ mac_rrc_data_ind(
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.module_id],rntiP);
if(ue_context_p) {
rrc_eNB_generate_defaultRRCConnectionReconfiguration(&ctxt,
ue_context_p,
0);
ue_context_p->ue_context.Status = RRC_RECONFIGURED;
if (ue_context_p->ue_context.Status != RRC_RECONFIGURED) {
LOG_E(RRC,"[eNB %d] Received C-RNTI ,but UE %x status(%d) not RRC_RECONFIGURED\n",module_idP,rntiP,ue_context_p->ue_context.Status);
return (-1);
} else {
rrc_eNB_generate_defaultRRCConnectionReconfiguration(&ctxt,ue_context_p,0);
ue_context_p->ue_context.Status = RRC_RECONFIGURED;
}
}
}
......@@ -363,8 +366,7 @@ void mac_eNB_rrc_ul_failure(const module_id_t Mod_instP,
flexran_agent_get_rrc_xface(Mod_instP)->flexran_agent_notify_ue_state_change(Mod_instP,
rntiP, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
}
rrc_mac_remove_ue(Mod_instP,rntiP);
//rrc_mac_remove_ue(Mod_instP,rntiP);
}
void mac_eNB_rrc_uplane_failure(const module_id_t Mod_instP,
......
......@@ -4071,6 +4071,7 @@ do_RRCConnectionReestablishment(
LTE_DL_CCCH_Message_t dl_ccch_msg;
LTE_RRCConnectionReestablishment_t *rrcConnectionReestablishment = NULL;
int i = 0;
ue_context_pP->ue_context.reestablishment_xid = Transaction_id;
LTE_SRB_ToAddModList_t **SRB_configList2 = NULL;
SRB_configList2 = &ue_context_pP->ue_context.SRB_configList2[Transaction_id];
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -278,6 +278,7 @@ int rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(const protocol_ctxt_t *const ctxt_p
int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP);
int rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(instance_t instance, rrc_eNB_ue_context_t* const ue_context_target_p);
int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p, const char *msg_name, instance_t instance);
int rrc_eNB_send_X2AP_UE_CONTEXT_RELEASE(const protocol_ctxt_t* const ctxt_pP, rrc_eNB_ue_context_t* const ue_context_pP);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment