Merge branch 'eurecom-develop' into eurecom-episys-merge-nsa

This commit is contained in:
Melissa Elkadi
2021-11-09 15:17:58 -08:00
118 changed files with 475 additions and 3503 deletions
+22 -4
View File
@@ -1,7 +1,25 @@
# Description # <h1 align="center">
The purpose of this repository is to provide an updated version of the original OAI code base. The original code base can be found here: https://gitlab.eurecom.fr/oai/openairinterface5g. The updates to the OAI code base removed some latent bugs, added multi-UE scalability, and were tested with a standard bypass proxy between the UE(s) and eNB. This proxy is available at: https://github.com/EpiSci/oai-lte-multi-ue-proxy. With this package, various multi-UE scenarios can be tested without the overhead of PHY-layer features of underlying radios. This proxy was created to allow users to test and utilize EpiSci's updated version of the OAI code. <a href="https://openairinterface.org/"><img src="https://openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png" alt="OAI" width="550"></a>
### Where this all began: ### </h1>
OAI code was used to baseline this work. The initial framework for this development was started from the following commit: https://gitlab.eurecom.fr/oai/openairinterface5g/-/commit/362da7c9205691a7314de56bbe8ec369f636da7b.
<p align="center">
<a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-OAI--Public--V1.1-blue" alt="License"></a>
<a href="https://releases.ubuntu.com/18.04/"><img src="https://img.shields.io/badge/OS-Ubuntu18-Green" alt="Supported OS"></a>
<a href="https://www.redhat.com/en/enterprise-linux-8"><img src="https://img.shields.io/badge/OS-RHEL8-Green" alt="Supported OS"></a>
</p>
<p align="center">
<a href="https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-Container-Parent%2F&label=build%20Images"></a>
</p>
<p align="center">
<a href="https://hub.docker.com/r/rdefosseoai/oai-enb"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-enb?label=eNB%20docker%20pulls"></a>
<a href="https://hub.docker.com/r/rdefosseoai/oai-lte-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-lte-ue?label=LTE-UE%20docker%20pulls"></a>
<a href="https://hub.docker.com/r/rdefosseoai/oai-gnb"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-gnb?label=gNB%20docker%20pulls"></a>
<a href="https://hub.docker.com/r/rdefosseoai/oai-nr-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-nr-ue?label=NR-UE%20docker%20pulls"></a>
</p>
# OpenAirInterface License #
### Included Fixes: ### ### Included Fixes: ###
- Ease of use of gprof and address sanitizer for debugging purposes - Ease of use of gprof and address sanitizer for debugging purposes
+2
View File
@@ -262,6 +262,7 @@ pipeline {
echo "This is a MERGE event" echo "This is a MERGE event"
addGitLabMRComment comment: message addGitLabMRComment comment: message
} }
echo "Pipeline is SUCCESSFUL"
} }
} }
failure { failure {
@@ -271,6 +272,7 @@ pipeline {
echo "This is a MERGE event" echo "This is a MERGE event"
addGitLabMRComment comment: message addGitLabMRComment comment: message
} }
echo "Pipeline FAILED"
} }
} }
} }
+13 -4
View File
@@ -195,6 +195,7 @@ class Containerize():
# the potential merge. Note that merge conflicts should already been checked earlier # the potential merge. Note that merge conflicts should already been checked earlier
imageTag = 'develop' imageTag = 'develop'
sharedTag = 'develop' sharedTag = 'develop'
forceSharedImageBuild = False
if (self.ranAllowMerge): if (self.ranAllowMerge):
imageTag = 'ci-temp' imageTag = 'ci-temp'
if self.ranTargetBranch == '': if self.ranTargetBranch == '':
@@ -203,6 +204,13 @@ class Containerize():
else: else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch) logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5) mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
mySSH.command('git diff HEAD..origin/develop -- docker/Dockerfile.ran' + self.dockerfileprefix + ' | grep -i INDEX', '\$', 5)
result = re.search('index', mySSH.getBefore())
if result is not None:
forceSharedImageBuild = True
sharedTag = 'ci-temp'
else:
forceSharedImageBuild = True
# if asterix, copy the entitlement and subscription manager configurations # if asterix, copy the entitlement and subscription manager configurations
if self.host == 'Red Hat': if self.host == 'Red Hat':
@@ -214,13 +222,14 @@ class Containerize():
sharedimage = 'ran-build' sharedimage = 'ran-build'
# Let's remove any previous run artifacts if still there # Let's remove any previous run artifacts if still there
mySSH.command(self.cli + ' image prune --force', '\$', 30) mySSH.command(self.cli + ' image prune --force', '\$', 30)
if (not self.ranAllowMerge): if forceSharedImageBuild:
mySSH.command(self.cli + ' image rm ' + sharedimage + ':' + sharedTag, '\$', 30) mySSH.command(self.cli + ' image rm ' + sharedimage + ':' + sharedTag + ' || true', '\$', 30)
for image,pattern in imageNames: for image,pattern in imageNames:
mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag, '\$', 30) mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag + ' || true', '\$', 30)
# Build the shared image only on Push Events (not on Merge Requests) # Build the shared image only on Push Events (not on Merge Requests)
if (not self.ranAllowMerge): # On when the shared image docker file is being modified.
if forceSharedImageBuild:
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + sharedimage + ' --tag ' + sharedimage + ':' + sharedTag + ' --file docker/Dockerfile.ran' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1', '\$', 1600) mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + sharedimage + ' --tag ' + sharedimage + ':' + sharedTag + ' --file docker/Dockerfile.ran' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1', '\$', 1600)
# First verify if the shared image was properly created. # First verify if the shared image was properly created.
status = True status = True
-5
View File
@@ -986,8 +986,6 @@ Message("CPU_Affinity flag is ${CPU_AFFINITY}")
# ???!!! TO BE DOCUMENTED OPTIONS !!!??? # ???!!! TO BE DOCUMENTED OPTIONS !!!???
############################################################## ##############################################################
add_boolean_option(NO_RRM True "DO WE HAVE A RADIO RESSOURCE MANAGER: NO")
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????") add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
add_boolean_option(DEADLINE_SCHEDULER False "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14") add_boolean_option(DEADLINE_SCHEDULER False "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14")
add_boolean_option(CPU_AFFINITY False "Enable CPU Affinity of threads (only valid without deadline scheduler). It is enabled only with >2 CPUs") add_boolean_option(CPU_AFFINITY False "Enable CPU Affinity of threads (only valid without deadline scheduler). It is enabled only with >2 CPUs")
@@ -1048,7 +1046,6 @@ add_boolean_option(JUMBO_FRAME True "ENABLE LARGE SDU in ACCESS STR
########################## ##########################
# RLC LAYER OPTIONS # RLC LAYER OPTIONS
########################## ##########################
add_boolean_option(OPENAIR2 True "Access Stratum layer 2 built in executable")
add_boolean_option(TRACE_RLC_PAYLOAD False "Fatal assert in this case") add_boolean_option(TRACE_RLC_PAYLOAD False "Fatal assert in this case")
add_boolean_option(RLC_STOP_ON_LOST_PDU False "Fatal assert in this case") add_boolean_option(RLC_STOP_ON_LOST_PDU False "Fatal assert in this case")
@@ -1076,8 +1073,6 @@ add_boolean_option(TRACE_RLC_UM_TX_STATUS False "TRACE for RLC UM, TO BE CHANGE
########################## ##########################
# PDCP LAYER OPTIONS # PDCP LAYER OPTIONS
########################## ##########################
#add_boolean_option(PDCP_USE_NETLINK False "For eNB, PDCP communicate with a NETLINK socket if connected to network driver, else could use a RT-FIFO")
#add_boolean_option(PDCP_USE_NETLINK_QUEUES False "When PDCP_USE_NETLINK is true, incoming IP packets are stored in queues")
#add_boolean_option(LINK_ENB_PDCP_TO_IP_DRIVER False "For eNB, PDCP communicate with a IP driver") #add_boolean_option(LINK_ENB_PDCP_TO_IP_DRIVER False "For eNB, PDCP communicate with a IP driver")
#add_boolean_option(LINK_ENB_PDCP_TO_GTPV1U True "For eNB, PDCP communicate with GTP-U protocol (eNB<->S-GW)") #add_boolean_option(LINK_ENB_PDCP_TO_GTPV1U True "For eNB, PDCP communicate with GTP-U protocol (eNB<->S-GW)")
+1 -1
View File
@@ -551,7 +551,7 @@ function main() {
if [ "$HW" == "OAI_USRP" ] ; then if [ "$HW" == "OAI_USRP" ] ; then
echo_info "installing packages for USRP support" echo_info "installing packages for USRP support"
check_install_usrp_uhd_driver check_install_usrp_uhd_driver
if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then if [ ! -v BUILD_UHD_FROM_SOURCE ] && [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
install_usrp_uhd_driver $UHD_IMAGES_DIR install_usrp_uhd_driver $UHD_IMAGES_DIR
fi fi
fi fi
+46 -10
View File
@@ -117,6 +117,9 @@ check_supported_distribution() {
"rhel8.2") return 0 ;; "rhel8.2") return 0 ;;
"rhel8.3") return 0 ;; "rhel8.3") return 0 ;;
"rhel8.4") return 0 ;; "rhel8.4") return 0 ;;
"rhel8.5") return 0 ;;
"rhel8.6") return 0 ;;
"rhel8.7") return 0 ;;
"centos7") return 0 ;; "centos7") return 0 ;;
esac esac
return 1 return 1
@@ -317,19 +320,30 @@ install_usrp_uhd_driver_from_source(){
echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log " echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log "
( (
pushd /tmp pushd /tmp
echo "Downloading UHD driver" echo "Cloning UHD driver repository"
rm -rf /tmp/uhd rm -rf /tmp/uhd
git clone https://github.com/EttusResearch/uhd.git git clone https://github.com/EttusResearch/uhd.git
cd uhd cd uhd
git checkout tags/v4.0.0.0 if [[ -v UHD_VERSION ]]; then
git checkout tags/v${UHD_VERSION}
else
git checkout tags/v4.0.0.0
fi
mkdir -p host/build mkdir -p host/build
cd host/build cd host/build || true
$CMAKE ../ $CMAKE ../ -GNinja
echo "Compiling UHD" echo "Compiling UHD"
make -j`nproc` ninja
make test $SUDO ninja install
$SUDO make install
$SUDO ldconfig -v $SUDO ldconfig -v
if [ $IS_CONTAINER -eq 0 ]; then
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
$SUDO /usr/local/lib/uhd/utils/uhd_images_downloader.py
fi
if [[ "$OS_DISTRO" == "rhel" ]]; then
$SUDO /usr/local/lib64/uhd/utils/uhd_images_downloader.py
fi
fi
popd popd
rm -rf /tmp/uhd rm -rf /tmp/uhd
) >& $uhd_install_log ) >& $uhd_install_log
@@ -338,10 +352,26 @@ install_usrp_uhd_driver_from_source(){
check_install_usrp_uhd_driver(){ check_install_usrp_uhd_driver(){
if [[ "$OS_DISTRO" == "ubuntu" ]]; then if [[ "$OS_DISTRO" == "ubuntu" ]]; then
#first we remove old installation #first we remove old installation
$SUDO apt-get remove -y uhd || true $SUDO apt-get remove uhd -y || true
$SUDO apt-get remove libuhd-dev libuhd003 uhd-host -y || true $SUDO apt-get remove uhd-host -y || true
$SUDO apt-get remove libuhd-dev -y || true
$SUDO apt-get remove libuhd003 -y || true
$SUDO apt-get remove libuhd3.13.1 -y || true
$SUDO apt-get remove libuhd3.14.0 -y || true
$SUDO apt-get remove libuhd3.14.1 -y || true
$SUDO apt-get remove libuhd3.15.0 -y || true
local distribution=$(get_distribution_release)
if [[ "$distribution" == "ubuntu18.04" ]]; then
$SUDO apt-get remove libuhd4.0.0 -y || true
$SUDO apt-get remove libuhd4.1.0 -y || true
fi
v=$(lsb_release -cs) v=$(lsb_release -cs)
$SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" $SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
if [[ -v BUILD_UHD_FROM_SOURCE ]]; then
$SUDO apt-get install -y libboost-all-dev libusb-1.0-0-dev doxygen python3-docutils python3-mako python3-numpy python3-requests python3-setuptools ninja-build
install_usrp_uhd_driver_from_source
return
fi
# The new USRP repository # The new USRP repository
# Raphael Defosseux: Adding a loop on adding PPA because in CI the gpg key retrieve may # Raphael Defosseux: Adding a loop on adding PPA because in CI the gpg key retrieve may
# timeout due to proxy / network latencies in Eurecom on VM # timeout due to proxy / network latencies in Eurecom on VM
@@ -361,7 +391,12 @@ check_install_usrp_uhd_driver(){
done done
$SUDO apt-get update $SUDO apt-get update
$SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev $SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev
$SUDO apt-get -y install libuhd-dev libuhd003 uhd-host if [[ "$distribution" == "ubuntu16.04" ]]; then
$SUDO apt-get -y install libuhd-dev libuhd3.15.0 uhd-host
fi
if [[ "$distribution" == "ubuntu18.04" ]]; then
$SUDO apt-get -y install libuhd-dev libuhd4.1.0 uhd-host
fi
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
if [ $IS_CONTAINER -eq 0 ] if [ $IS_CONTAINER -eq 0 ]
then then
@@ -692,6 +727,7 @@ check_install_oai_software() {
build-essential \ build-essential \
$CMAKE \ $CMAKE \
cmake-curses-gui \ cmake-curses-gui \
curl \
ninja-build \ ninja-build \
doxygen \ doxygen \
doxygen-gui \ doxygen-gui \
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include"log.h" #include "log.h"
extern log_t *g_log; extern log_t *g_log;
+15 -6
View File
@@ -65,8 +65,8 @@ nr_bandentry_t nr_bandtable[] = {
{41, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15}, {41, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15},
{41, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30}, {41, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30},
{47, 5855000, 5925000, 5855000, 5925000, 1, 790334, 15}, {47, 5855000, 5925000, 5855000, 5925000, 1, 790334, 15},
//{48, 3550000, 3700000, 3550000, 3700000, 1, 636667, 15}, {48, 3550000, 3700000, 3550000, 3700000, 1, 636667, 15},
//{48, 3550000, 3700000, 3550000, 3700000, 2, 636668, 30}, {48, 3550000, 3700000, 3550000, 3700000, 2, 636668, 30},
{50, 1432000, 1517000, 1432000, 1517000, 20, 286400, 100}, {50, 1432000, 1517000, 1432000, 1517000, 20, 286400, 100},
{51, 1427000, 1432000, 1427000, 1432000, 20, 285400, 100}, {51, 1427000, 1432000, 1427000, 1432000, 20, 285400, 100},
{53, 2483500, 2495000, 2483500, 2495000, 20, 496700, 100}, {53, 2483500, 2495000, 2483500, 2495000, 20, 496700, 100},
@@ -90,14 +90,15 @@ nr_bandentry_t nr_bandtable[] = {
{84, 1920000, 1980000, 000, 000, 20, 384000, 100}, {84, 1920000, 1980000, 000, 000, 20, 384000, 100},
{86, 1710000, 1785000, 000, 000, 20, 342000, 100}, {86, 1710000, 1785000, 000, 000, 20, 342000, 100},
{89, 824000, 849000, 000, 000, 20, 342000, 100}, {89, 824000, 849000, 000, 000, 20, 342000, 100},
{90, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15}, {90, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15},
{90, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30}, {90, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30},
{90, 2496000, 2690000, 2496000, 2690000, 20, 499200, 100}, {90, 2496000, 2690000, 2496000, 2690000, 20, 499200, 100},
{91, 832000, 862000, 1427000, 1432000, 20, 285400, 100}, {91, 832000, 862000, 1427000, 1432000, 20, 285400, 100},
{92, 832000, 862000, 1432000, 1517000, 20, 286400, 100}, {92, 832000, 862000, 1432000, 1517000, 20, 286400, 100},
{93, 880000, 915000, 1427000, 1432000, 20, 285400, 100}, {93, 880000, 915000, 1427000, 1432000, 20, 285400, 100},
{94, 880000, 915000, 1432000, 1517000, 20, 286400, 100}, {94, 880000, 915000, 1432000, 1517000, 20, 286400, 100},
{95, 2010000, 2025000, 000, 000, 20, 402000, 100}, {95, 2010000, 2025000, 000, 000, 20, 402000, 100},
{96, 5925000, 7125000, 5925000, 7125000, 1, 795000, 15},
{257,26500020,29500000,26500020,29500000, 1,2054166, 60}, {257,26500020,29500000,26500020,29500000, 1,2054166, 60},
{257,26500080,29500000,26500080,29500000, 2,2054167, 120}, {257,26500080,29500000,26500080,29500000, 2,2054167, 120},
{258,24250080,27500000,24250080,27500000, 1,2016667, 60}, {258,24250080,27500000,24250080,27500000, 1,2016667, 60},
@@ -437,9 +438,17 @@ int get_nr_table_idx(int nr_bandP, uint8_t scs_index) {
AssertFatal(nr_bandP <= nr_bandtable[nr_bandtable_size-1].band, "NR band %d exceeds NR bands table maximum limit %d\n", nr_bandP, nr_bandtable[nr_bandtable_size-1].band); AssertFatal(nr_bandP <= nr_bandtable[nr_bandtable_size-1].band, "NR band %d exceeds NR bands table maximum limit %d\n", nr_bandP, nr_bandtable[nr_bandtable_size-1].band);
for (i = 0; i < nr_bandtable_size && nr_bandtable[i].band != nr_bandP; i++); for (i = 0; i < nr_bandtable_size && nr_bandtable[i].band != nr_bandP; i++);
// selection of correct Deltaf raster according to SCS // In frequency bands with two deltaFRaster,
if ((nr_bandtable[i].deltaf_raster != 100) && (nr_bandtable[i].deltaf_raster != scs_khz)) // the higher deltaFRaster applies to channels using only the SCS that is equal to or larger than the higher deltaFRaster
// and SSB SCS is equal to the higher deltaFRaster.
while(((i+1)<nr_bandtable_size) &&
(nr_bandtable[i+1].band == nr_bandtable[i].band) &&
(nr_bandtable[i].deltaf_raster != scs_khz)) {
i++; i++;
}
AssertFatal(nr_bandtable[i].band == nr_bandP, "Found band table %d does not correspond to the input one %d\n",nr_bandtable[i].band,nr_bandP);
LOG_D(PHY, "NR band table index %d (Band %d, dl_min %lu, ul_min %lu)\n", i, nr_bandtable[i].band, nr_bandtable[i].dl_min,nr_bandtable[i].ul_min); LOG_D(PHY, "NR band table index %d (Band %d, dl_min %lu, ul_min %lu)\n", i, nr_bandtable[i].band, nr_bandtable[i].dl_min,nr_bandtable[i].ul_min);
+15
View File
@@ -88,6 +88,21 @@ You can build any oai softmodem executable separately, you may not need all of t
After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory. A copy is also available in the `target/bin` directory, with all binaries suffixed by the 3GPP release number, today .Rel15. After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory. A copy is also available in the `target/bin` directory, with all binaries suffixed by the 3GPP release number, today .Rel15.
When installing the pre-requisites, especially the `UHD` driver, you can now specify if you want to install from source or not.
- For `fedora`-based OS, it was already the case all the time. But now you can specify which version to install.
- For `ubuntu` OS, the Ettus PPA currently installs the following versions:
* `Ubuntu16.04`: --> version `3.15.0.0`
* `Ubuntu18.04`: --> version `4.1.0.0`
```bash
export BUILD_UHD_FROM_SOURCE=True
export UHD_VERSION=3.15.0.0
./build_oai -I -w USRP
```
The `UHD_VERSION` env variable `SHALL` be a valid tag (minus `v`) from the `https://github.com/EttusResearch/uhd.git` repository.
## Issue when building `nasmeh` module ## ## Issue when building `nasmeh` module ##
A lot of users and contributors have faced the issue: `nasmesh` module does not build. A lot of users and contributors have faced the issue: `nasmesh` module does not build.
+16 -1
View File
@@ -41,17 +41,23 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters
#start from scratch for target executable #start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-enb FROM registry.access.redhat.com/ubi8/ubi:latest as oai-enb
ENV TZ=Europe/Paris
RUN yum update -y && \ RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \ yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \ lksctp-tools \
nettle \ nettle \
tzdata \
procps-ng \ procps-ng \
atlas \ atlas \
python3 \
python3-pip \
net-tools \ net-tools \
iputils \ iputils \
iproute \ iproute \
libyaml && \ libyaml && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
@@ -78,6 +84,8 @@ COPY --from=enb-build /lib64/libconfig.so.9 /lib64
COPY --from=enb-build /lib64/libblas.so.3 /lib64 COPY --from=enb-build /lib64/libblas.so.3 /lib64
COPY --from=enb-build /lib64/liblapack.so.3 /lib64 COPY --from=enb-build /lib64/liblapack.so.3 /lib64
COPY --from=enb-build /lib64/liblapacke.so.3 /lib64 COPY --from=enb-build /lib64/liblapacke.so.3 /lib64
# Now we are copying from builder-image the UHD files.
COPY --from=enb-build /lib64/libboost_chrono.so.1.66.0 /lib64 COPY --from=enb-build /lib64/libboost_chrono.so.1.66.0 /lib64
COPY --from=enb-build /lib64/libboost_date_time.so.1.66.0 /lib64 COPY --from=enb-build /lib64/libboost_date_time.so.1.66.0 /lib64
COPY --from=enb-build /lib64/libboost_filesystem.so.1.66.0 /lib64 COPY --from=enb-build /lib64/libboost_filesystem.so.1.66.0 /lib64
@@ -88,7 +96,14 @@ COPY --from=enb-build /lib64/libboost_system.so.1.66.0 /lib64
COPY --from=enb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64 COPY --from=enb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
COPY --from=enb-build /lib64/libboost_atomic.so.1.66.0 /lib64 COPY --from=enb-build /lib64/libboost_atomic.so.1.66.0 /lib64
COPY --from=enb-build /lib64/libboost_timer.so.1.66.0 /lib64 COPY --from=enb-build /lib64/libboost_timer.so.1.66.0 /lib64
COPY --from=enb-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64 COPY --from=enb-build /lib64/libboost_regex.so.1.66.0 /lib64
COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=enb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=enb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=enb-build /usr/local/share/uhd/rfnoc/ .
RUN ldconfig RUN ldconfig
+17 -11
View File
@@ -25,7 +25,7 @@
# #
#--------------------------------------------------------------------- #---------------------------------------------------------------------
FROM ran-build:latest AS enb-build FROM ran-build:latest AS enb-build
RUN rm -Rf /oai-ran RUN rm -Rf /oai-ran
WORKDIR /oai-ran WORKDIR /oai-ran
@@ -42,8 +42,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters
#start from scratch for target executable #start from scratch for target executable
FROM ubuntu:bionic as oai-enb FROM ubuntu:bionic as oai-enb
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && \ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
@@ -60,16 +59,12 @@ RUN apt-get update && \
iputils-ping \ iputils-ping \
iproute2 \ iproute2 \
iperf \ iperf \
libyaml-0-2 && \
# Install UHD driver from ettus ppa
# At time of writing, it is 3.14
add-apt-repository ppa:ettusresearch/uhd --yes && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
python \ python \
python3 \
python3-six \
python3-requests \
libusb-1.0-0 \ libusb-1.0-0 \
libuhd003 \ libyaml-0-2 && \
uhd-host && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-enb/bin WORKDIR /opt/oai-enb/bin
@@ -90,6 +85,17 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
COPY --from=enb-build /usr/local/lib/libprotobuf-c.so.1 . COPY --from=enb-build /usr/local/lib/libprotobuf-c.so.1 .
# Now we are copying from builder-image the UHD files.
COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=enb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
COPY --from=enb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
WORKDIR /usr/lib/x86_64-linux-gnu
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
RUN ldconfig RUN ldconfig
+16 -1
View File
@@ -41,6 +41,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters
#start from scratch for target executable #start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb
ENV TZ=Europe/Paris
RUN yum repolist --disablerepo=* && \ RUN yum repolist --disablerepo=* && \
yum update -y && \ yum update -y && \
@@ -51,9 +52,14 @@ RUN yum repolist --disablerepo=* && \
atlas \ atlas \
lksctp-tools \ lksctp-tools \
nettle \ nettle \
tzdata \
python3 \
python3-pip \
net-tools \ net-tools \
iputils \ iputils \
libyaml && \ libyaml && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
@@ -84,6 +90,8 @@ COPY --from=gnb-build /lib64/libforms.so.2 /lib64
COPY --from=gnb-build /lib64/libblas.so.3 /lib64 COPY --from=gnb-build /lib64/libblas.so.3 /lib64
COPY --from=gnb-build /lib64/liblapack.so.3 /lib64 COPY --from=gnb-build /lib64/liblapack.so.3 /lib64
COPY --from=gnb-build /lib64/liblapacke.so.3 /lib64 COPY --from=gnb-build /lib64/liblapacke.so.3 /lib64
# Now we are copying from builder-image the UHD files.
COPY --from=gnb-build /lib64/libboost_chrono.so.1.66.0 /lib64 COPY --from=gnb-build /lib64/libboost_chrono.so.1.66.0 /lib64
COPY --from=gnb-build /lib64/libboost_date_time.so.1.66.0 /lib64 COPY --from=gnb-build /lib64/libboost_date_time.so.1.66.0 /lib64
COPY --from=gnb-build /lib64/libboost_filesystem.so.1.66.0 /lib64 COPY --from=gnb-build /lib64/libboost_filesystem.so.1.66.0 /lib64
@@ -94,7 +102,14 @@ COPY --from=gnb-build /lib64/libboost_system.so.1.66.0 /lib64
COPY --from=gnb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64 COPY --from=gnb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
COPY --from=gnb-build /lib64/libboost_atomic.so.1.66.0 /lib64 COPY --from=gnb-build /lib64/libboost_atomic.so.1.66.0 /lib64
COPY --from=gnb-build /lib64/libboost_timer.so.1.66.0 /lib64 COPY --from=gnb-build /lib64/libboost_timer.so.1.66.0 /lib64
COPY --from=gnb-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64 COPY --from=gnb-build /lib64/libboost_regex.so.1.66.0 /lib64
COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=gnb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=gnb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=gnb-build /usr/local/share/uhd/rfnoc/ .
RUN ldconfig RUN ldconfig
+16 -8
View File
@@ -59,16 +59,12 @@ RUN apt-get update && \
net-tools \ net-tools \
iproute2 \ iproute2 \
iputils-ping \ iputils-ping \
libyaml-0-2 && \
# Install UHD driver from ettus ppa
# At time of writing, it is 3.14
add-apt-repository ppa:ettusresearch/uhd --yes && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
python \ python \
python3 \
python3-six \
python3-requests \
libusb-1.0-0 \ libusb-1.0-0 \
libuhd003 \ libyaml-0-2 && \
uhd-host && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-gnb/bin WORKDIR /opt/oai-gnb/bin
@@ -93,6 +89,18 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 . COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 .
# Now we are copying from builder-image the UHD files.
COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=gnb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
COPY --from=gnb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
WORKDIR /usr/lib/x86_64-linux-gnu
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
RUN ldconfig RUN ldconfig
# Copy the relevant configuration files for gNB # Copy the relevant configuration files for gNB
+14 -2
View File
@@ -48,9 +48,13 @@ RUN yum update -y && \
tzdata \ tzdata \
procps-ng \ procps-ng \
atlas \ atlas \
python3 \
python3-pip \
net-tools \ net-tools \
iputils \ iputils \
iproute && \ iproute && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
@@ -66,11 +70,12 @@ COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so . COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so . COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
# Copying from the ran-build image the USRP needed packages
COPY --from=ru-build /lib64/libconfig.so.9 /lib64 COPY --from=ru-build /lib64/libconfig.so.9 /lib64
COPY --from=ru-build /lib64/libblas.so.3 /lib64 COPY --from=ru-build /lib64/libblas.so.3 /lib64
COPY --from=ru-build /lib64/liblapack.so.3 /lib64 COPY --from=ru-build /lib64/liblapack.so.3 /lib64
COPY --from=ru-build /lib64/liblapacke.so.3 /lib64 COPY --from=ru-build /lib64/liblapacke.so.3 /lib64
# Copying from the ran-build image the USRP needed packages
COPY --from=ru-build /lib64/libboost_chrono.so.1.66.0 /lib64 COPY --from=ru-build /lib64/libboost_chrono.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_date_time.so.1.66.0 /lib64 COPY --from=ru-build /lib64/libboost_date_time.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_filesystem.so.1.66.0 /lib64 COPY --from=ru-build /lib64/libboost_filesystem.so.1.66.0 /lib64
@@ -81,7 +86,14 @@ COPY --from=ru-build /lib64/libboost_system.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64 COPY --from=ru-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_atomic.so.1.66.0 /lib64 COPY --from=ru-build /lib64/libboost_atomic.so.1.66.0 /lib64
COPY --from=ru-build /lib64/libboost_timer.so.1.66.0 /lib64 COPY --from=ru-build /lib64/libboost_timer.so.1.66.0 /lib64
COPY --from=ru-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64 COPY --from=ru-build /lib64/libboost_regex.so.1.66.0 /lib64
COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=ru-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=ru-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=ru-build /usr/local/share/uhd/rfnoc/ .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
/bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
+18 -9
View File
@@ -54,17 +54,13 @@ RUN apt-get update && \
libatlas3-base \ libatlas3-base \
libconfig9 \ libconfig9 \
net-tools \ net-tools \
python \
python3 \
python3-six \
python3-requests \
libusb-1.0-0 \
iputils-ping \ iputils-ping \
iproute2 && \ iproute2 && \
# Install UHD driver from ettus ppa
# At time of writing, it is 3.14
add-apt-repository ppa:ettusresearch/uhd --yes && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
python \
libusb-1.0-0 \
libuhd003 \
uhd-host && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-lte-ru/bin WORKDIR /opt/oai-lte-ru/bin
@@ -78,6 +74,19 @@ COPY --from=ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 . COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so . COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so . COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
# Now we are copying from builder-image the UHD files.
COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=ru-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
COPY --from=ru-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
WORKDIR /usr/lib/x86_64-linux-gnu
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
/bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
/bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \
+16 -1
View File
@@ -42,17 +42,23 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_paramet
#start from scratch for target executable #start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ue FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ue
ENV TZ=Europe/Paris
RUN yum update -y && \ RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \ yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \ lksctp-tools \
procps-ng \ procps-ng \
nettle \ nettle \
tzdata \
atlas \ atlas \
python3 \
python3-pip \
iproute \ iproute \
net-tools \ net-tools \
iputils \ iputils \
libyaml && \ libyaml && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
@@ -82,6 +88,8 @@ COPY --from=lte-ue-build /lib64/libconfig.so.9 /lib64
COPY --from=lte-ue-build /lib64/libblas.so.3 /lib64 COPY --from=lte-ue-build /lib64/libblas.so.3 /lib64
COPY --from=lte-ue-build /lib64/liblapack.so.3 /lib64 COPY --from=lte-ue-build /lib64/liblapack.so.3 /lib64
COPY --from=lte-ue-build /lib64/liblapacke.so.3 /lib64 COPY --from=lte-ue-build /lib64/liblapacke.so.3 /lib64
# Now we are copying from builder-image the UHD files.
COPY --from=lte-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64 COPY --from=lte-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64
COPY --from=lte-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64 COPY --from=lte-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64
COPY --from=lte-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64 COPY --from=lte-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64
@@ -92,7 +100,14 @@ COPY --from=lte-ue-build /lib64/libboost_system.so.1.66.0 /lib64
COPY --from=lte-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64 COPY --from=lte-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
COPY --from=lte-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64 COPY --from=lte-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64
COPY --from=lte-ue-build /lib64/libboost_timer.so.1.66.0 /lib64 COPY --from=lte-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
COPY --from=lte-ue-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64 COPY --from=lte-ue-build /lib64/libboost_regex.so.1.66.0 /lib64
COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=lte-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=lte-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=lte-ue-build /usr/local/share/uhd/rfnoc/ .
RUN ldconfig RUN ldconfig
+18 -11
View File
@@ -43,8 +43,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_paramet
#start from scratch for target executable #start from scratch for target executable
FROM ubuntu:bionic as oai-lte-ue FROM ubuntu:bionic as oai-lte-ue
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && \ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
@@ -58,19 +57,15 @@ RUN apt-get update && \
libconfig9 \ libconfig9 \
openssl \ openssl \
net-tools \ net-tools \
python \
python3 \
python3-six \
python3-requests \
libusb-1.0-0 \
iputils-ping \ iputils-ping \
iproute2 \ iproute2 \
iperf \ iperf \
libyaml-0-2 && \ libyaml-0-2 && \
# Install UHD driver from ettus ppa
# At time of writing, it is 3.14
add-apt-repository ppa:ettusresearch/uhd --yes && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
python \
libusb-1.0-0 \
libuhd003 \
uhd-host && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-lte-ue/bin WORKDIR /opt/oai-lte-ue/bin
@@ -95,6 +90,18 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li
COPY --from=lte-ue-build /usr/local/lib/libprotobuf-c.so.1 . COPY --from=lte-ue-build /usr/local/lib/libprotobuf-c.so.1 .
# Now we are copying from builder-image the UHD files.
COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=lte-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
COPY --from=lte-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
WORKDIR /usr/lib/x86_64-linux-gnu
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
RUN ldconfig RUN ldconfig
# Copy the relevant configuration files for UE # Copy the relevant configuration files for UE
+15 -1
View File
@@ -51,9 +51,13 @@ RUN yum update -y && \
iputils \ iputils \
iproute \ iproute \
atlas \ atlas \
python3 \
python3-pip \
libXpm \ libXpm \
libX11 \ libX11 \
libyaml && \ libyaml && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
@@ -87,6 +91,8 @@ COPY --from=nr-ue-build /lib64/libblas.so.3 /lib64
COPY --from=nr-ue-build /lib64/liblapack.so.3 /lib64 COPY --from=nr-ue-build /lib64/liblapack.so.3 /lib64
COPY --from=nr-ue-build /lib64/liblapacke.so.3 /lib64 COPY --from=nr-ue-build /lib64/liblapacke.so.3 /lib64
COPY --from=nr-ue-build /lib64/libforms.so.2 /lib64 COPY --from=nr-ue-build /lib64/libforms.so.2 /lib64
# Now we are copying from builder-image the UHD files.
COPY --from=nr-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64 COPY --from=nr-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64
COPY --from=nr-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64 COPY --from=nr-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64
COPY --from=nr-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64 COPY --from=nr-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64
@@ -97,7 +103,15 @@ COPY --from=nr-ue-build /lib64/libboost_system.so.1.66.0 /lib64
COPY --from=nr-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64 COPY --from=nr-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
COPY --from=nr-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64 COPY --from=nr-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64
COPY --from=nr-ue-build /lib64/libboost_timer.so.1.66.0 /lib64 COPY --from=nr-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
COPY --from=nr-ue-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64 COPY --from=nr-ue-build /lib64/libboost_regex.so.1.66.0 /lib64
COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=nr-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=nr-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=nr-ue-build /usr/local/share/uhd/rfnoc/ .
RUN ldconfig RUN ldconfig
+17 -9
View File
@@ -55,19 +55,15 @@ RUN apt-get update && \
libconfig9 \ libconfig9 \
openssl \ openssl \
net-tools \ net-tools \
python \
python3 \
python3-six \
python3-requests \
libusb-1.0-0 \
iputils-ping \ iputils-ping \
iproute2 \ iproute2 \
iperf \ iperf \
libyaml-0-2 && \ libyaml-0-2 && \
# Install UHD driver from ettus ppa
# At time of writing, it is 3.14
add-apt-repository ppa:ettusresearch/uhd --yes && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
python \
libusb-1.0-0 \
libuhd003 \
uhd-host && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-nr-ue/bin WORKDIR /opt/oai-nr-ue/bin
@@ -95,6 +91,18 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li
COPY --from=nr-ue-build /usr/local/lib/libprotobuf-c.so.1 . COPY --from=nr-ue-build /usr/local/lib/libprotobuf-c.so.1 .
# Now we are copying from builder-image the UHD files.
COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=nr-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
COPY --from=nr-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
WORKDIR /usr/lib/x86_64-linux-gnu
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
RUN ldconfig RUN ldconfig
WORKDIR /opt/oai-nr-ue WORKDIR /opt/oai-nr-ue
+3
View File
@@ -28,6 +28,9 @@
FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-build FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-build
ARG NEEDED_GIT_PROXY ARG NEEDED_GIT_PROXY
ENV TZ=Europe/Paris
ENV BUILD_UHD_FROM_SOURCE=True
ENV UHD_VERSION=3.15.0.0
COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca
COPY tmp/entitlement/*.pem /etc/pki/entitlement COPY tmp/entitlement/*.pem /etc/pki/entitlement
+3 -2
View File
@@ -29,8 +29,9 @@
FROM ubuntu:bionic AS ran-build FROM ubuntu:bionic AS ran-build
ARG NEEDED_GIT_PROXY ARG NEEDED_GIT_PROXY
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ENV BUILD_UHD_FROM_SOURCE=True
ENV UHD_VERSION=3.15.0.0
#install developers pkg/repo #install developers pkg/repo
RUN apt-get update && \ RUN apt-get update && \
+3 -3
View File
@@ -46,11 +46,11 @@ done
# Load the USRP binaries # Load the USRP binaries
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx $PREFIX/bin/uhd_images_downloader.py -t x3xx
elif [[ -v USE_N3XX ]]; then elif [[ -v USE_N3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx $PREFIX/bin/uhd_images_downloader.py -t n3xx
fi fi
echo "==================================" echo "=================================="
+3 -3
View File
@@ -37,11 +37,11 @@ done
# Load the USRP binaries # Load the USRP binaries
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx $PREFIX/bin/uhd_images_downloader.py -t x3xx
elif [[ -v USE_N3XX ]]; then elif [[ -v USE_N3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx $PREFIX/bin/uhd_images_downloader.py -t n3xx
fi fi
echo "==================================" echo "=================================="
+3 -3
View File
@@ -35,11 +35,11 @@ done
# Load the USRP binaries # Load the USRP binaries
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx $PREFIX/bin/uhd_images_downloader.py -t x3xx
elif [[ -v USE_N3XX ]]; then elif [[ -v USE_N3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx $PREFIX/bin/uhd_images_downloader.py -t n3xx
fi fi
echo "==================================" echo "=================================="
+3 -3
View File
@@ -39,11 +39,11 @@ $PREFIX/bin/conf2uedata -c $PREFIX/etc/ue_usim.conf -o $PREFIX
# Load the USRP binaries # Load the USRP binaries
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx $PREFIX/bin/uhd_images_downloader.py -t x3xx
elif [[ -v USE_N3XX ]]; then elif [[ -v USE_N3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx $PREFIX/bin/uhd_images_downloader.py -t n3xx
fi fi
# in case we have conf file, append # in case we have conf file, append
+3 -3
View File
@@ -34,11 +34,11 @@ done
# Load the USRP binaries # Load the USRP binaries
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx $PREFIX/bin/uhd_images_downloader.py -t x3xx
elif [[ -v USE_N3XX ]]; then elif [[ -v USE_N3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx $PREFIX/bin/uhd_images_downloader.py -t n3xx
fi fi
# in case we have conf file, append # in case we have conf file, append
-4
View File
@@ -76,10 +76,6 @@
#include "gnb_paramdef.h" #include "gnb_paramdef.h"
#ifndef OPENAIR2
#include "UTIL/OTG/otg_extern.h"
#endif
#include "s1ap_eNB.h" #include "s1ap_eNB.h"
#include "SIMULATION/ETH_TRANSPORT/proto.h" #include "SIMULATION/ETH_TRANSPORT/proto.h"
#include <executables/softmodem-common.h> #include <executables/softmodem-common.h>
-4
View File
@@ -70,10 +70,6 @@ static int DEFBFW[] = {0x00007fff};
#include "GNB_APP/gnb_paramdef.h" #include "GNB_APP/gnb_paramdef.h"
#include "common/config/config_userapi.h" #include "common/config/config_userapi.h"
#ifndef OPENAIR2
#include "UTIL/OTG/otg_extern.h"
#endif
#include "s1ap_eNB.h" #include "s1ap_eNB.h"
#include "SIMULATION/ETH_TRANSPORT/proto.h" #include "SIMULATION/ETH_TRANSPORT/proto.h"
#include <openair1/PHY/TOOLS/phy_scope_interface.h> #include <openair1/PHY/TOOLS/phy_scope_interface.h>
-4
View File
@@ -30,12 +30,8 @@
#include "PHY/types.h" #include "PHY/types.h"
#include <threadPool/thread-pool.h> #include <threadPool/thread-pool.h>
#if defined(ENABLE_USE_MME)
#include "s1ap_eNB.h" #include "s1ap_eNB.h"
#ifdef PDCP_USE_NETLINK
#include "SIMULATION/ETH_TRANSPORT/proto.h" #include "SIMULATION/ETH_TRANSPORT/proto.h"
#endif
#endif
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */ /* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
#define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n" #define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n"
+1 -12
View File
@@ -66,10 +66,6 @@ unsigned short config_frames[4] = {2,9,11,13};
//#include "PHY/TOOLS/time_meas.h" //#include "PHY/TOOLS/time_meas.h"
#ifndef OPENAIR2
#include "UTIL/OTG/otg_vars.h"
#endif
#include "intertask_interface.h" #include "intertask_interface.h"
#include "PHY/INIT/phy_init.h" #include "PHY/INIT/phy_init.h"
@@ -712,19 +708,12 @@ int main( int argc, char **argv ) {
// initialize mscgen log after ITTI // initialize mscgen log after ITTI
MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX); MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX);
init_opt(); init_opt();
if(PDCP_USE_NETLINK && !IS_SOFTMODEM_NOS1) {
#ifdef PDCP_USE_NETLINK
if (!IS_SOFTMODEM_NOS1) {
netlink_init(); netlink_init();
if (get_softmodem_params()->nsa) { if (get_softmodem_params()->nsa) {
init_pdcp(); init_pdcp();
} }
} }
#if defined(PDCP_USE_NETLINK_QUEUES)
pdcp_netlink_init();
#endif
#endif
#ifndef PACKAGE_VERSION #ifndef PACKAGE_VERSION
# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL" # define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
#endif #endif
+9 -7
View File
@@ -19,6 +19,7 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include <openair1/PHY/impl_defs_top.h>
#include "executables/nr-uesoftmodem.h" #include "executables/nr-uesoftmodem.h"
#include "PHY/phy_extern_nr_ue.h" #include "PHY/phy_extern_nr_ue.h"
#include "PHY/INIT/phy_init.h" #include "PHY/INIT/phy_init.h"
@@ -89,11 +90,7 @@
* *
*/ */
#ifndef NO_RAT_NR
#define DURATION_RX_TO_TX (NR_UE_CAPABILITY_SLOT_RX_TO_TX) /* for NR this will certainly depends to such UE capability which is not yet defined */
#else
#define DURATION_RX_TO_TX (6) /* For LTE, this duration is fixed to 4 and it is linked to LTE standard for both modes FDD/TDD */
#endif
#define RX_JOB_ID 0x1010 #define RX_JOB_ID 0x1010
#define TX_JOB_ID 100 #define TX_JOB_ID 100
@@ -847,13 +844,18 @@ int computeSamplesShift(PHY_VARS_NR_UE *UE) {
// compute TO compensation that should be applied for this frame // compute TO compensation that should be applied for this frame
if ( UE->rx_offset < UE->frame_parms.samples_per_frame/2 && if ( UE->rx_offset < UE->frame_parms.samples_per_frame/2 &&
UE->rx_offset > 0 ) { UE->rx_offset > 0 ) {
//LOG_I(PHY,"!!!adjusting -1 samples!!!\n"); LOG_I(PHY,"!!!adjusting -1 samples!!! rx_offset == %d\n", UE->rx_offset);
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
UE->max_pos_fil = 0; // reset IIR filter when sample shift is applied
return -1 ; return -1 ;
} }
if ( UE->rx_offset > UE->frame_parms.samples_per_frame/2 && if ( UE->rx_offset > UE->frame_parms.samples_per_frame/2 &&
UE->rx_offset < UE->frame_parms.samples_per_frame ) { UE->rx_offset < UE->frame_parms.samples_per_frame ) {
//LOG_I(PHY,"!!!adjusting +1 samples!!!\n"); int rx_offset = UE->rx_offset - UE->frame_parms.samples_per_frame;
LOG_I(PHY,"!!!adjusting +1 samples!!! rx_offset == %d\n", rx_offset);
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
UE->max_pos_fil = 0; // reset IIR filter when sample shift is applied
return 1; return 1;
} }
-4
View File
@@ -63,10 +63,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "enb_config.h" #include "enb_config.h"
//#include "PHY/TOOLS/time_meas.h" //#include "PHY/TOOLS/time_meas.h"
#ifndef OPENAIR2
#include "UTIL/OTG/otg_vars.h"
#endif
#include "intertask_interface.h" #include "intertask_interface.h"
#include "PHY/INIT/phy_init.h" #include "PHY/INIT/phy_init.h"
@@ -10,7 +10,7 @@
#define FAPI_NR_MAX_RA_OCCASION_PER_CSIRS 64 #define FAPI_NR_MAX_RA_OCCASION_PER_CSIRS 64
// Constants Defined in 38.213 // Constants Defined in 38.213
#define FAPI_NR_MAX_CORESET_PER_BWP 3 #define FAPI_NR_MAX_CORESET_PER_BWP 3
#define FAPI_NR_MAX_SS_PER_CORESET 10 #define FAPI_NR_MAX_SS 10
/// RX_IND /// RX_IND
-8
View File
@@ -30,14 +30,6 @@
#include <stdint.h> // for uint8/16/32_t #include <stdint.h> // for uint8/16/32_t
/* check if this ifndef is required for NB-IoT ?!
//#ifndef NO_OPENAIR1
//#include "PHY/defs_NB_IoT.h"
//#else
//#include "PHY/TOOLS/time_meas.h"
//#endif
*/
#define CRC24_A_NB_IoT 0 #define CRC24_A_NB_IoT 0
#define CRC24_B_NB_IoT 1 #define CRC24_B_NB_IoT 1
#define CRC16_NB_IoT 2 #define CRC16_NB_IoT 2
@@ -34,7 +34,6 @@
#include <stdlib.h> #include <stdlib.h>
#include "nrLDPC_types.h" #include "nrLDPC_types.h"
#ifndef malloc32_clear
/** /**
\brief Allocates 32 byte aligned memory and initializes to zero \brief Allocates 32 byte aligned memory and initializes to zero
\param size Input size in bytes \param size Input size in bytes
@@ -46,7 +45,6 @@ static inline void* malloc32_clear(size_t size)
memset(ptr, 0, size); memset(ptr, 0, size);
return ptr; return ptr;
} }
#endif
/** /**
\brief Allocates and initializes the internal decoder processing buffers \brief Allocates and initializes the internal decoder processing buffers
+63 -10
View File
@@ -27,6 +27,58 @@
uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3}; uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3};
uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 8, 16}; uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 8, 16};
// Table 5.4.3.3-1 38-101
int nr_ssb_table[48][3] = {
{1, 15, nr_ssb_type_A},
{2, 15, nr_ssb_type_A},
{3, 15, nr_ssb_type_A},
{5, 15, nr_ssb_type_A},
{5, 30, nr_ssb_type_B},
{7, 15, nr_ssb_type_A},
{8, 15, nr_ssb_type_A},
{12, 15, nr_ssb_type_A},
{14, 15, nr_ssb_type_A},
{18, 15, nr_ssb_type_A},
{20, 15, nr_ssb_type_A},
{25, 15, nr_ssb_type_A},
{26, 15, nr_ssb_type_A},
{28, 15, nr_ssb_type_A},
{29, 15, nr_ssb_type_A},
{30, 15, nr_ssb_type_A},
{34, 15, nr_ssb_type_A},
{34, 30, nr_ssb_type_C},
{38, 15, nr_ssb_type_A},
{38, 30, nr_ssb_type_C},
{39, 15, nr_ssb_type_A},
{39, 30, nr_ssb_type_C},
{40, 30, nr_ssb_type_C},
{41, 15, nr_ssb_type_A},
{41, 30, nr_ssb_type_C},
{46, 30, nr_ssb_type_C},
{48, 30, nr_ssb_type_C},
{50, 30, nr_ssb_type_C},
{51, 15, nr_ssb_type_A},
{53, 15, nr_ssb_type_A},
{65, 15, nr_ssb_type_A},
{66, 15, nr_ssb_type_A},
{66, 30, nr_ssb_type_B},
{70, 15, nr_ssb_type_A},
{71, 15, nr_ssb_type_A},
{74, 15, nr_ssb_type_A},
{75, 15, nr_ssb_type_A},
{76, 15, nr_ssb_type_A},
{77, 30, nr_ssb_type_C},
{78, 30, nr_ssb_type_C},
{79, 30, nr_ssb_type_C},
{90, 15, nr_ssb_type_A},
{90, 30, nr_ssb_type_C},
{91, 15, nr_ssb_type_A},
{92, 15, nr_ssb_type_A},
{93, 15, nr_ssb_type_A},
{94, 15, nr_ssb_type_A},
{96, 30, nr_ssb_type_C}
};
void set_Lmax(NR_DL_FRAME_PARMS *fp) { void set_Lmax(NR_DL_FRAME_PARMS *fp) {
// definition of Lmax according to ts 38.213 section 4.1 // definition of Lmax according to ts 38.213 section 4.1
@@ -85,27 +137,28 @@ int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp,uint8_t i_ssb) {
void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL) void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL)
{ {
int idx = 0;
switch(mu) { switch(mu) {
case NR_MU_0: //15kHz scs case NR_MU_0: //15kHz scs
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_0]; fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_0];
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_0]; fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_0];
fp->ssb_type = nr_ssb_type_A; fp->ssb_type = nr_ssb_type_A;
while(nr_ssb_table[idx][0]!=fp->nr_band)
idx++;
AssertFatal(nr_ssb_table[idx][1]==15,"SCS %d not applicable to band %d\n",
fp->subcarrier_spacing,fp->nr_band);
break; break;
case NR_MU_1: //30kHz scs case NR_MU_1: //30kHz scs
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_1]; fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_1];
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_1]; fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_1];
while(nr_ssb_table[idx][0]!=fp->nr_band ||
// selection of SS block pattern according to TS 38101-1 Table 5.4.3.3-1 for SCS 30kHz nr_ssb_table[idx][1]!=30) {
if (fp->nr_band == 5 || fp->nr_band == 66) AssertFatal(nr_ssb_table[idx][0]<=fp->nr_band,"SCS %d not applicable to band %d\n",
fp->ssb_type = nr_ssb_type_B; fp->subcarrier_spacing,fp->nr_band);
else{ idx++;
if (fp->nr_band == 41 || fp->nr_band == 38 || ( fp->nr_band > 76 && fp->nr_band < 80) )
fp->ssb_type = nr_ssb_type_C;
else
AssertFatal(1==0,"NR Operating Band n%d not available for SS block SCS with mu=%d\n", fp->nr_band, mu);
} }
fp->ssb_type = nr_ssb_table[idx][2];
break; break;
case NR_MU_2: //60kHz scs case NR_MU_2: //60kHz scs
-2
View File
@@ -50,8 +50,6 @@
//#define DEBUG_DCI_DECODING 1 //#define DEBUG_DCI_DECODING 1
//#define DEBUG_PHY //#define DEBUG_PHY
//#undef ALL_AGGREGATION
//extern uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3]; //extern uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3];
//extern uint16_t pcfich_reg[4]; //extern uint16_t pcfich_reg[4];
+1 -4
View File
@@ -32,11 +32,8 @@
#ifndef __DCI_NB_IOT_H__ #ifndef __DCI_NB_IOT_H__
#define __DCI_NB_IOT_H__ #define __DCI_NB_IOT_H__
//#ifndef USER_MODE
//#include "PHY/types.h"
//#else
#include <stdint.h> #include <stdint.h>
//#endif
typedef enum typedef enum
{ {
-4
View File
@@ -36,10 +36,8 @@
#include "PHY/extern.h" #include "PHY/extern.h"
#include "SCHED/extern.h" #include "SCHED/extern.h"
#ifdef OPENAIR2
#include "openair2/LAYER2/MAC/proto.h" #include "openair2/LAYER2/MAC/proto.h"
#include "openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#endif
extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index); extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
@@ -434,10 +432,8 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length
break; break;
} }
#ifdef OPENAIR2
RRC_status = mac_UE_get_rrc_status(ue->Mod_id, 0); RRC_status = mac_UE_get_rrc_status(ue->Mod_id, 0);
len += sprintf(&buffer[len],"[UE PROC] RRC status = %d\n",RRC_status); len += sprintf(&buffer[len],"[UE PROC] RRC status = %d\n",RRC_status);
#endif
len += sprintf(&buffer[len], "[UE PROC] Transmission Mode %d \n",ue->transmission_mode[eNB]); len += sprintf(&buffer[len], "[UE PROC] Transmission Mode %d \n",ue->transmission_mode[eNB]);
len += sprintf(&buffer[len], "[UE PROC] PBCH err conseq %d, PBCH error total %d, PBCH FER %d\n", len += sprintf(&buffer[len], "[UE PROC] PBCH err conseq %d, PBCH error total %d, PBCH FER %d\n",
ue->pbch_vars[eNB]->pdu_errors_conseq, ue->pbch_vars[eNB]->pdu_errors_conseq,
+1 -1
View File
@@ -321,4 +321,4 @@ HLC_subband_cqi_mcs_CBA_20MHz_NB_IoT;
#define MAX_ACK_PAYLOAD_NB_IoT 18 #define MAX_ACK_PAYLOAD_NB_IoT 18
#define MAX_RI_PAYLOAD_NB_IoT 6 #define MAX_RI_PAYLOAD_NB_IoT 6
#endif #endif
-9
View File
@@ -50,9 +50,6 @@
//#define DEBUG_DCI_DECODING 1 //#define DEBUG_DCI_DECODING 1
//#define DEBUG_PHY //#define DEBUG_PHY
//#undef ALL_AGGREGATION
uint16_t extract_crc(uint8_t *dci,uint8_t dci_len) uint16_t extract_crc(uint8_t *dci,uint8_t dci_len)
{ {
@@ -2802,7 +2799,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
if (dci_cnt>old_dci_cnt) if (dci_cnt>old_dci_cnt)
return(dci_cnt); return(dci_cnt);
//#ifdef ALL_AGGREGATION
// Now check UE_SPEC format 1 search spaces at aggregation 8 // Now check UE_SPEC format 1 search spaces at aggregation 8
old_dci_cnt=dci_cnt; old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode,subframe, dci_decoding_procedure0(pdcch_vars,0,mode,subframe,
@@ -2836,7 +2832,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
if (dci_cnt>old_dci_cnt) if (dci_cnt>old_dci_cnt)
return(dci_cnt); return(dci_cnt);
//#endif //ALL_AGGREGATION
} else if (tmode == 3) { } else if (tmode == 3) {
@@ -2946,7 +2941,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
if (dci_cnt>old_dci_cnt) if (dci_cnt>old_dci_cnt)
return(dci_cnt); return(dci_cnt);
//#ifdef ALL_AGGREGATION
// Now check UE_SPEC format 2_2A search spaces at aggregation 8 // Now check UE_SPEC format 2_2A search spaces at aggregation 8
LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 8 dci length: %d[bits] %d[bytes]\n",format2A_size_bits,format2A_size_bytes); LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 8 dci length: %d[bits] %d[bytes]\n",format2A_size_bits,format2A_size_bytes);
old_dci_cnt=dci_cnt; old_dci_cnt=dci_cnt;
@@ -3082,7 +3076,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
if (dci_cnt>old_dci_cnt) if (dci_cnt>old_dci_cnt)
return(dci_cnt); return(dci_cnt);
//#ifdef ALL_AGGREGATION
// Now check UE_SPEC format 2_2A search spaces at aggregation 8 // Now check UE_SPEC format 2_2A search spaces at aggregation 8
old_dci_cnt=dci_cnt; old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode, dci_decoding_procedure0(pdcch_vars,0,mode,
@@ -3214,7 +3207,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
if (dci_cnt>old_dci_cnt) if (dci_cnt>old_dci_cnt)
return(dci_cnt); return(dci_cnt);
//#ifdef ALL_AGGREGATION
// Now check UE_SPEC format 1E_2A_M10PRB search spaces at aggregation 8 // Now check UE_SPEC format 1E_2A_M10PRB search spaces at aggregation 8
old_dci_cnt=dci_cnt; old_dci_cnt=dci_cnt;
@@ -3249,7 +3241,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
if (dci_cnt>old_dci_cnt) if (dci_cnt>old_dci_cnt)
return(dci_cnt); return(dci_cnt);
//#endif //ALL_AGGREGATION
} }
@@ -51,7 +51,6 @@
#include <cblas.h> #include <cblas.h>
#include "linear_preprocessing_rec.h" #include "linear_preprocessing_rec.h"
#define NOCYGWIN_STATIC
//#define DEBUG_MMSE //#define DEBUG_MMSE
@@ -42,7 +42,6 @@
//#define DEBUG_ULSCH_MODULATION //#define DEBUG_ULSCH_MODULATION
#ifndef OFDMA_ULSCH
void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb) void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
{ {
@@ -371,7 +370,6 @@ void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
// printf("\n"); // printf("\n");
} }
#endif
void ulsch_modulation(int32_t **txdataF, void ulsch_modulation(int32_t **txdataF,
short amp, short amp,
uint32_t frame, uint32_t frame,
@@ -690,57 +688,10 @@ void ulsch_modulation(int32_t **txdataF,
// Transform Precoding // Transform Precoding
#ifdef OFDMA_ULSCH
for (i=0; i<ulsch_Msymb; i++) {
ulsch->z[i] = ulsch->d[i];
}
#else
dft_lte(ulsch->z,ulsch->d,Msc_PUSCH,ulsch->Nsymb_pusch); dft_lte(ulsch->z,ulsch->d,Msc_PUSCH,ulsch->Nsymb_pusch);
#endif
DevAssert(txdataF); DevAssert(txdataF);
#ifdef OFDMA_ULSCH
re_offset0 = frame_parms->first_carrier_offset + (ulsch->harq_processes[harq_pid]->first_rb*12);
if (re_offset0>frame_parms->ofdm_symbol_size) {
re_offset0 -= frame_parms->ofdm_symbol_size;
// re_offset0++;
}
// printf("re_offset0 %d\n",re_offset0);
for (j=0,l=0; l<(nsymb-ulsch->srs_active); l++) {
re_offset = re_offset0;
symbol_offset = (int)frame_parms->ofdm_symbol_size*(l+(subframe*nsymb));
#ifdef DEBUG_ULSCH_MODULATION
printf("symbol %d (subframe %d): symbol_offset %d\n",l,subframe,symbol_offset);
#endif
txptr = &txdataF[0][symbol_offset];
if (((frame_parms->Ncp == 0) && ((l==3) || (l==10)))||
((frame_parms->Ncp == 1) && ((l==2) || (l==8)))) {
}
// Skip reference symbols
else {
// printf("copying %d REs\n",Msc_PUSCH);
for (i=0; i<Msc_PUSCH; i++,j++) {
#ifdef DEBUG_ULSCH_MODULATION
printf("re_offset %d (%p): %d,%d\n", re_offset,&ulsch->z[j],((int16_t*)&ulsch->z[j])[0],((int16_t*)&ulsch->z[j])[1]);
#endif
txptr[re_offset++] = ulsch->z[j];
if (re_offset==frame_parms->ofdm_symbol_size)
re_offset = 0;
}
}
}
# else // OFDMA_ULSCH = 0
re_offset0 = frame_parms->first_carrier_offset + (ulsch->harq_processes[harq_pid]->first_rb*12); re_offset0 = frame_parms->first_carrier_offset + (ulsch->harq_processes[harq_pid]->first_rb*12);
if (re_offset0>frame_parms->ofdm_symbol_size) { if (re_offset0>frame_parms->ofdm_symbol_size) {
@@ -777,8 +728,5 @@ void ulsch_modulation(int32_t **txdataF,
} }
} }
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_MODULATION, VCD_FUNCTION_OUT);
} }
+3 -1
View File
@@ -208,7 +208,9 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
nr_sequences=8>>(1-pucch_pdu->sr_flag); nr_sequences=8>>(1-pucch_pdu->sr_flag);
} }
LOG_D(PHY,"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d initial_cyclic_shift %d\n",pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->bit_len_harq,pucch_pdu->sr_flag,mcs[0],pucch_pdu->initial_cyclic_shift); LOG_D(PHY,"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d initial_cyclic_shift %d\n",
pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->bit_len_harq,
pucch_pdu->sr_flag,mcs[0],pucch_pdu->initial_cyclic_shift);
int cs_ind = get_pucch0_cs_lut_index(gNB,pucch_pdu); int cs_ind = get_pucch0_cs_lut_index(gNB,pucch_pdu);
/* /*
@@ -42,7 +42,6 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
short coef) short coef)
{ {
static int max_pos_fil = 0;
static int count_max_pos_ok = 0; static int count_max_pos_ok = 0;
static int first_time = 1; static int first_time = 1;
int max_val = 0, max_pos = 0; int max_val = 0, max_pos = 0;
@@ -55,13 +54,14 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
LOG_D(PHY,"AbsSubframe %d: rx_offset (before) = %d\n",subframe,ue->rx_offset); LOG_D(PHY,"AbsSubframe %d: rx_offset (before) = %d\n",subframe,ue->rx_offset);
// we only use channel estimates from tx antenna 0 here // search for maximum position within the cyclic prefix
for (int i = 0; i < frame_parms->nb_prefix_samples; i++) { for (int i = -frame_parms->nb_prefix_samples/2; i < frame_parms->nb_prefix_samples/2; i++) {
int temp = 0; int temp = 0;
int j = (i < 0) ? (i + frame_parms->ofdm_symbol_size) : i;
for (int aa = 0; aa < frame_parms->nb_antennas_rx; aa++) { for (int aa = 0; aa < frame_parms->nb_antennas_rx; aa++) {
int Re = ((int16_t*)ue->pbch_vars[gNB_id]->dl_ch_estimates_time[aa])[(i<<1)]; int Re = ((int16_t*)ue->pbch_vars[gNB_id]->dl_ch_estimates_time[aa])[(j<<1)];
int Im = ((int16_t*)ue->pbch_vars[gNB_id]->dl_ch_estimates_time[aa])[1+(i<<1)]; int Im = ((int16_t*)ue->pbch_vars[gNB_id]->dl_ch_estimates_time[aa])[1+(j<<1)];
temp += (Re*Re/2) + (Im*Im/2); temp += (Re*Re/2) + (Im*Im/2);
} }
@@ -71,19 +71,16 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
} }
} }
if (max_pos > frame_parms->ofdm_symbol_size/2)
max_pos = max_pos - frame_parms->ofdm_symbol_size;
// filter position to reduce jitter // filter position to reduce jitter
if (clear == 1) if (clear == 1)
max_pos_fil = max_pos; ue->max_pos_fil = max_pos;
else else
max_pos_fil = ((max_pos_fil * coef) + (max_pos * ncoef)) >> 15; ue->max_pos_fil = ((ue->max_pos_fil * coef) + (max_pos * ncoef)) >> 15;
// do not filter to have proactive timing adjustment // do not filter to have proactive timing adjustment
//max_pos_fil = max_pos; //ue->max_pos_fil = max_pos;
int diff = max_pos_fil - sync_pos; int diff = ue->max_pos_fil - sync_pos;
if (frame_parms->freq_range==nr_FR2) if (frame_parms->freq_range==nr_FR2)
sync_offset = 2; sync_offset = 2;
@@ -131,7 +128,7 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
ue->rx_offset, ue->rx_offset,
clear, clear,
max_pos, max_pos,
max_pos_fil, ue->max_pos_fil,
max_val, max_val,
sync_pos); sync_pos);
#endif //DEBUG_PHY #endif //DEBUG_PHY
@@ -485,8 +485,8 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
#ifdef DEBUG_PDCCH #ifdef DEBUG_PDCCH
printf("PDCCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",proc->thread_id, gNB_id,ch_offset,ue->frame_parms.ofdm_symbol_size, printf("PDCCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, symbol %d\n",
ue->frame_parms.Ncp,Ns,k, symbol); proc->thread_id, gNB_id,ch_offset,ue->frame_parms.ofdm_symbol_size,ue->frame_parms.Ncp,Ns,symbol);
#endif #endif
fl = filt16a_l1; fl = filt16a_l1;
File diff suppressed because it is too large Load Diff
-6
View File
@@ -33,13 +33,7 @@
#ifndef __PHY_NR_UE_TRANSPORT_DCI_NR__H__ #ifndef __PHY_NR_UE_TRANSPORT_DCI_NR__H__
#define __PHY_NR_UE_TRANSPORT_DCI_NR__H__ #define __PHY_NR_UE_TRANSPORT_DCI_NR__H__
#ifndef USER_MODE
#include "PHY/types.h"
#else
#include <stdint.h> #include <stdint.h>
#endif
#define MAX_DCI_SIZE_BITS 45 #define MAX_DCI_SIZE_BITS 45
@@ -43,12 +43,6 @@
#include "PHY/NR_REFSIG/dmrs_nr.h" #include "PHY/NR_REFSIG/dmrs_nr.h"
#include "common/utils/nr/nr_common.h" #include "common/utils/nr/nr_common.h"
#ifndef USER_MODE
#define NOCYGWIN_STATIC static
#else
#define NOCYGWIN_STATIC
#endif
/* dynamic shift for LLR computation for TM3/4 /* dynamic shift for LLR computation for TM3/4
* set as command line argument, see lte-softmodem.c * set as command line argument, see lte-softmodem.c
* default value: 0 * default value: 0
@@ -485,9 +485,9 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
for(int n_ss = 0; n_ss<pdcch_vars->nb_search_space; n_ss++) { for(int n_ss = 0; n_ss<pdcch_vars->nb_search_space; n_ss++) {
uint8_t nb_symb_pdcch = pdcch_vars->pdcch_config[n_ss].coreset.duration; uint8_t nb_symb_pdcch = pdcch_vars->pdcch_config[n_ss].coreset.duration;
int start_symb = pdcch_vars->pdcch_config[n_ss].coreset.StartSymbolIndex;
get_coreset_rballoc(pdcch_vars->pdcch_config[n_ss].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb); get_coreset_rballoc(pdcch_vars->pdcch_config[n_ss].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb);
for (uint16_t l=start_symb; l<start_symb+nb_symb_pdcch; l++) {
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
nr_slot_fep_init_sync(ue, nr_slot_fep_init_sync(ue,
proc, proc,
l, // the UE PHY has no notion of the symbols to be monitored in the search space l, // the UE PHY has no notion of the symbols to be monitored in the search space
-2
View File
@@ -40,9 +40,7 @@
//#define DEBUG_PBCH //#define DEBUG_PBCH
//#define DEBUG_PBCH_ENCODING //#define DEBUG_PBCH_ENCODING
#ifdef OPENAIR2
//#include "PHY_INTERFACE/defs.h" //#include "PHY_INTERFACE/defs.h"
#endif
#define PBCH_A 24 #define PBCH_A 24
+2 -2
View File
@@ -90,8 +90,8 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
// the value of u,v (delta always 0 for PUCCH) has to be calculated according to TS 38.211 Subclause 6.3.2.2.1 // the value of u,v (delta always 0 for PUCCH) has to be calculated according to TS 38.211 Subclause 6.3.2.2.1
uint8_t u[2]={0,0},v[2]={0,0}; uint8_t u[2]={0,0},v[2]={0,0};
LOG_D(PHY,"pucch0: slot %d nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, mcs %d\n",nr_slot_tx,pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->mcs); LOG_D(PHY,"pucch0: slot %d nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, mcs %d\n",
nr_slot_tx,pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->mcs);
#ifdef DEBUG_NR_PUCCH_TX #ifdef DEBUG_NR_PUCCH_TX
printf("\t [nr_generate_pucch0] sequence generation: variable initialization for test\n"); printf("\t [nr_generate_pucch0] sequence generation: variable initialization for test\n");
-16
View File
@@ -69,18 +69,12 @@ void reset_stats(FL_OBJECT *button, long arg) {
static void *scope_thread_eNB(void *arg) { static void *scope_thread_eNB(void *arg) {
# ifdef ENABLE_XFORMS_WRITE_STATS
FILE *eNB_stats;
# endif
struct sched_param sched_param; struct sched_param sched_param;
int UE_id, CC_id; int UE_id, CC_id;
int ue_cnt=0; int ue_cnt=0;
sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO)+1; sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO)+1;
sched_setscheduler(0, SCHED_FIFO,&sched_param); sched_setscheduler(0, SCHED_FIFO,&sched_param);
printf("Scope thread has priority %d\n",sched_param.sched_priority); printf("Scope thread has priority %d\n",sched_param.sched_priority);
# ifdef ENABLE_XFORMS_WRITE_STATS
eNB_stats = fopen("eNB_stats.txt", "w");
#endif
while (!oai_exit) { while (!oai_exit) {
ue_cnt=0; ue_cnt=0;
@@ -99,16 +93,6 @@ static void *scope_thread_eNB(void *arg) {
usleep(100*1000); usleep(100*1000);
} }
// printf("%s",stats_buffer);
# ifdef ENABLE_XFORMS_WRITE_STATS
if (eNB_stats) {
rewind (eNB_stats);
fwrite (stats_buffer, 1, len, eNB_stats);
fclose (eNB_stats);
}
# endif
pthread_exit((void *)arg); pthread_exit((void *)arg);
} }
-16
View File
@@ -72,16 +72,10 @@ void reset_stats(FL_OBJECT *button, long arg) {
static void *scope_thread_UE(void *arg) { static void *scope_thread_UE(void *arg) {
char stats_buffer[16384]; char stats_buffer[16384];
# ifdef ENABLE_XFORMS_WRITE_STATS
FILE *UE_stats, *eNB_stats;
# endif
struct sched_param sched_param; struct sched_param sched_param;
sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO)+1; sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO)+1;
sched_setscheduler(0, SCHED_FIFO,&sched_param); sched_setscheduler(0, SCHED_FIFO,&sched_param);
printf("Scope thread has priority %d\n",sched_param.sched_priority); printf("Scope thread has priority %d\n",sched_param.sched_priority);
# ifdef ENABLE_XFORMS_WRITE_STATS
UE_stats = fopen("UE_stats.txt", "w");
#endif
while (!oai_exit) { while (!oai_exit) {
// dump_ue_stats (PHY_vars_UE_g[0][0], &PHY_vars_UE_g[0][0]->proc.proc_rxtx[0],stats_buffer, 0, mode,rx_input_level_dBm); // dump_ue_stats (PHY_vars_UE_g[0][0], &PHY_vars_UE_g[0][0]->proc.proc_rxtx[0],stats_buffer, 0, mode,rx_input_level_dBm);
@@ -94,16 +88,6 @@ static void *scope_thread_UE(void *arg) {
0,7); 0,7);
// printf("%s",stats_buffer); // printf("%s",stats_buffer);
} }
# ifdef ENABLE_XFORMS_WRITE_STATS
if (UE_stats) {
rewind (UE_stats);
fwrite (stats_buffer, 1, len, UE_stats);
fclose (UE_stats);
}
# endif
pthread_exit((void *)arg); pthread_exit((void *)arg);
} }
-3
View File
@@ -517,9 +517,6 @@ void phy_scope_gNB(OAI_phy_scope_t *form,
} }
static void *scope_thread_gNB(void *arg) { static void *scope_thread_gNB(void *arg) {
scopeData_t *p=(scopeData_t *) arg; scopeData_t *p=(scopeData_t *) arg;
//# ifdef ENABLE_XFORMS_WRITE_STATS
// FILE *gNB_stats = fopen("gNB_stats.txt", "w");
//#endif
size_t stksize=0; size_t stksize=0;
pthread_attr_t atr; pthread_attr_t atr;
pthread_attr_init(&atr); pthread_attr_init(&atr);
-17
View File
@@ -48,7 +48,6 @@
#ifdef MEX #ifdef MEX
#define msg mexPrintf #define msg mexPrintf
#else #else
#ifdef OPENAIR2
#if ENABLE_RAL #if ENABLE_RAL
#include "collection/hashtable/hashtable.h" #include "collection/hashtable/hashtable.h"
#include "COMMON/ral_messages_types.h" #include "COMMON/ral_messages_types.h"
@@ -56,9 +55,6 @@
#endif #endif
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#define msg(aRGS...) LOG_D(PHY, ##aRGS) #define msg(aRGS...) LOG_D(PHY, ##aRGS)
#else
#define msg printf
#endif
#endif #endif
//use msg in the real-time thread context //use msg in the real-time thread context
#define msg_nrt printf #define msg_nrt printf
@@ -196,19 +192,6 @@ typedef struct {
NB_IoT_UE_DLSCH_t *dlsch_rn_MCH[10]; NB_IoT_UE_DLSCH_t *dlsch_rn_MCH[10];
} PHY_VARS_RN_NB_IoT; } PHY_VARS_RN_NB_IoT;
/*
#ifdef OCP_FRAMEWORK
#include <enums.h>
#else
//typedef enum {normal_txrx=0,rx_calib_ue=1,rx_calib_ue_med=2,rx_calib_ue_byp=3,debug_prach=4,no_L2_connect=5,calib_prach_tx=6,rx_dump_frame=7,loop_through_memory=8} runmode_t;
*/
// enum transmission_access_mode {
// NO_ACCESS=0,
// POSTPONED_ACCESS,
// CANCELED_ACCESS,
// UNKNOWN_ACCESS,
// SCHEDULED_ACCESS,
// CBA_ACCESS};
typedef enum { typedef enum {
eNodeB_3GPP_NB_IoT=0, // classical eNodeB function eNodeB_3GPP_NB_IoT=0, // classical eNodeB function
-4
View File
@@ -87,7 +87,6 @@
#define LOG_W(x, ...) mexPrintf(__VA_ARGS__) #define LOG_W(x, ...) mexPrintf(__VA_ARGS__)
#define LOG_M(x, ...) mexPrintf(__VA_ARGS__) #define LOG_M(x, ...) mexPrintf(__VA_ARGS__)
#else #else
#ifdef OPENAIR2
#if ENABLE_RAL #if ENABLE_RAL
#include "collection/hashtable/hashtable.h" #include "collection/hashtable/hashtable.h"
#include "COMMON/ral_messages_types.h" #include "COMMON/ral_messages_types.h"
@@ -95,9 +94,6 @@
#endif #endif
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#define msg(aRGS...) LOG_D(PHY, ##aRGS) #define msg(aRGS...) LOG_D(PHY, ##aRGS)
#else
#define msg printf
#endif
#endif #endif
+4 -7
View File
@@ -51,16 +51,12 @@
#ifdef MEX #ifdef MEX
#define msg mexPrintf #define msg mexPrintf
#else #else
#ifdef OPENAIR2
#if ENABLE_RAL #if ENABLE_RAL
#include "common/utils/hashtable/hashtable.h" #include "common/utils/hashtable/hashtable.h"
#include "COMMON/ral_messages_types.h" #include "COMMON/ral_messages_types.h"
#include "UTIL/queue.h" #include "UTIL/queue.h"
#endif #endif
#define msg(aRGS...) LOG_D(PHY, ##aRGS) #define msg(aRGS...) LOG_D(PHY, ##aRGS)
#else
#define msg printf
#endif
#endif #endif
//use msg in the real-time thread context //use msg in the real-time thread context
#define msg_nrt printf #define msg_nrt printf
@@ -638,7 +634,7 @@ typedef struct {
uint8_t dciFormat; uint8_t dciFormat;
uint8_t agregationLevel; uint8_t agregationLevel;
int nb_search_space; int nb_search_space;
fapi_nr_dl_config_dci_dl_pdu_rel15_t pdcch_config[FAPI_NR_MAX_SS_PER_CORESET]; fapi_nr_dl_config_dci_dl_pdu_rel15_t pdcch_config[FAPI_NR_MAX_SS];
// frame and slot for sib1 in initial sync // frame and slot for sib1 in initial sync
uint16_t sfn; uint16_t sfn;
uint16_t slot; uint16_t slot;
@@ -921,9 +917,10 @@ typedef struct {
uint8_t init_sync_frame; uint8_t init_sync_frame;
/// temporary offset during cell search prior to MIB decoding /// temporary offset during cell search prior to MIB decoding
int ssb_offset; int ssb_offset;
uint16_t symbol_offset; // offset in terms of symbols for detected ssb in sync uint16_t symbol_offset; /// offset in terms of symbols for detected ssb in sync
int rx_offset; /// Timing offset int rx_offset; /// Timing offset
int rx_offset_diff; /// Timing adjustment for ofdm symbol0 on HW USRP int rx_offset_diff; /// Timing adjustment for ofdm symbol0 on HW USRP
int max_pos_fil; /// Timing offset IIR filter
int time_sync_cell; int time_sync_cell;
/// Timing Advance updates variables /// Timing Advance updates variables
-6
View File
@@ -55,12 +55,6 @@ extern char mode_string[4][20];
extern unsigned char NB_RU; extern unsigned char NB_RU;
#ifndef OPENAIR2
extern unsigned char NB_eNB_INST;
extern uint16_t NB_UE_INST;
extern unsigned char NB_RN_INST;
#endif
extern int flag_LA; extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX]; extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16]; extern double sinr_bler_map_up[MCS_COUNT][2][16];
-6
View File
@@ -63,12 +63,6 @@ extern char mode_string[4][20];
extern unsigned char NB_RU; extern unsigned char NB_RU;
#ifndef OPENAIR2
extern unsigned char NB_eNB_INST;
extern uint16_t NB_UE_INST;
extern unsigned char NB_RN_INST;
#endif
extern int flag_LA; extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX]; extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16]; extern double sinr_bler_map_up[MCS_COUNT][2][16];
-6
View File
@@ -53,12 +53,6 @@ extern int flagMag;
extern char mode_string[4][20]; extern char mode_string[4][20];
#ifndef OPENAIR2
extern unsigned char NB_eNB_INST;
extern uint16_t NB_UE_INST;
extern unsigned char NB_RN_INST;
#endif
extern int flag_LA; extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX]; extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16]; extern double sinr_bler_map_up[MCS_COUNT][2][16];
-7
View File
@@ -57,13 +57,6 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
unsigned char NB_RU=0; unsigned char NB_RU=0;
#ifndef OPENAIR2
//unsigned char NB_eNB_INST=0;
//uint16_t NB_UE_INST=0;
//unsigned char NB_RN_INST=0;
//unsigned char NB_INST=0;
#endif
int number_of_cards; int number_of_cards;
-7
View File
@@ -57,13 +57,6 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
unsigned char NB_RU=0; unsigned char NB_RU=0;
#ifndef OPENAIR2
unsigned char NB_eNB_INST=0;
uint16_t NB_UE_INST=0;
unsigned char NB_RN_INST=0;
unsigned char NB_INST=0;
#endif
int number_of_cards; int number_of_cards;
-8
View File
@@ -47,14 +47,6 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
#include "SIMULATION/ETH_TRANSPORT/vars.h" #include "SIMULATION/ETH_TRANSPORT/vars.h"
#ifndef OPENAIR2
unsigned char NB_eNB_INST=0;
uint16_t NB_UE_INST=0;
unsigned char NB_RN_INST=0;
unsigned char NB_INST=0;
#endif
int number_of_cards; int number_of_cards;
-5
View File
@@ -22,11 +22,6 @@
#ifndef __openair_TYPES_NB_IOT_H__ #ifndef __openair_TYPES_NB_IOT_H__
#define __openair_TYPES_NB_IOT_H__ #define __openair_TYPES_NB_IOT_H__
#ifdef USER_MODE
#include <stdint.h> #include <stdint.h>
#else
#include <linux/types.h>
#endif
#endif /*__openair_TYPES_NB_IOT_H__ */ #endif /*__openair_TYPES_NB_IOT_H__ */
+6 -6
View File
@@ -403,8 +403,6 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
pthread_mutex_lock(&gNB->UL_INFO_mutex); pthread_mutex_lock(&gNB->UL_INFO_mutex);
int timing_advance_update, cqi;
int sync_pos;
NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ULSCH_id][0]; NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ULSCH_id][0];
NR_UL_gNB_HARQ_t *harq_process = ulsch->harq_processes[harq_pid]; NR_UL_gNB_HARQ_t *harq_process = ulsch->harq_processes[harq_pid];
NR_gNB_SCH_STATS_t *stats=get_ulsch_stats(gNB,ulsch); NR_gNB_SCH_STATS_t *stats=get_ulsch_stats(gNB,ulsch);
@@ -412,19 +410,20 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
nfapi_nr_pusch_pdu_t *pusch_pdu = &harq_process->ulsch_pdu; nfapi_nr_pusch_pdu_t *pusch_pdu = &harq_process->ulsch_pdu;
// pdu->data = gNB->ulsch[ULSCH_id+1][0]->harq_processes[harq_pid]->b; // pdu->data = gNB->ulsch[ULSCH_id+1][0]->harq_processes[harq_pid]->b;
sync_pos = nr_est_timing_advance_pusch(gNB, ULSCH_id); // estimate timing advance for MAC int sync_pos = nr_est_timing_advance_pusch(gNB, ULSCH_id); // estimate timing advance for MAC
// scale the 16 factor in N_TA calculation in 38.213 section 4.2 according to the used FFT size // scale the 16 factor in N_TA calculation in 38.213 section 4.2 according to the used FFT size
uint16_t bw_scaling = 16 * gNB->frame_parms.ofdm_symbol_size / 2048; uint16_t bw_scaling = 16 * gNB->frame_parms.ofdm_symbol_size / 2048;
int sync_pos_rounded;
// do some integer rounding to improve TA accuracy // do some integer rounding to improve TA accuracy
int sync_pos_rounded;
if (sync_pos > 0) if (sync_pos > 0)
sync_pos_rounded = sync_pos + (bw_scaling / 2) - 1; sync_pos_rounded = sync_pos + (bw_scaling / 2) - 1;
else else
sync_pos_rounded = sync_pos - (bw_scaling / 2) - 1; sync_pos_rounded = sync_pos - (bw_scaling / 2) + 1;
if (stats) stats->sync_pos = sync_pos; if (stats) stats->sync_pos = sync_pos;
timing_advance_update = sync_pos_rounded / bw_scaling; int timing_advance_update = sync_pos_rounded / bw_scaling;
// put timing advance command in 0..63 range // put timing advance command in 0..63 range
timing_advance_update += 31; timing_advance_update += 31;
@@ -449,6 +448,7 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
LOG_D(PHY, "Estimated SNR for PUSCH is = %f dB (ulsch_power %f, noise %f)\n", SNRtimes10/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot)/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot)/10.0); LOG_D(PHY, "Estimated SNR for PUSCH is = %f dB (ulsch_power %f, noise %f)\n", SNRtimes10/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot)/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot)/10.0);
int cqi;
if (SNRtimes10 < -640) cqi=0; if (SNRtimes10 < -640) cqi=0;
else if (SNRtimes10 > 635) cqi=255; else if (SNRtimes10 > 635) cqi=255;
else cqi=(640+SNRtimes10)/5; else cqi=(640+SNRtimes10)/5;
+1 -1
View File
@@ -48,4 +48,4 @@ int8_t nr_ue_scheduled_response_stub(nr_scheduled_response_t *scheduled_response
int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config); int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config);
#endif #endif
+4 -3
View File
@@ -768,7 +768,8 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_
uint16_t s1 = dlsch0_harq->nb_symbols; uint16_t s1 = dlsch0_harq->nb_symbols;
bool is_SI = dlsch0->rnti_type == _SI_RNTI_; bool is_SI = dlsch0->rnti_type == _SI_RNTI_;
LOG_D(PHY,"[UE %d] PDSCH type %d active in nr_slot_rx %d, harq_pid %d (%d), rb_start %d, nb_rb %d, symbol_start %d, nb_symbols %d, DMRS mask %x\n",ue->Mod_id,pdsch,nr_slot_rx,harq_pid,dlsch0_harq->status,pdsch_start_rb,pdsch_nb_rb,s0,s1,dlsch0_harq->dlDmrsSymbPos); LOG_D(PHY,"[UE %d] PDSCH type %d active in nr_slot_rx %d, harq_pid %d (%d), rb_start %d, nb_rb %d, symbol_start %d, nb_symbols %d, DMRS mask %x\n",
ue->Mod_id,pdsch,nr_slot_rx,harq_pid,dlsch0_harq->status,pdsch_start_rb,pdsch_nb_rb,s0,s1,dlsch0_harq->dlDmrsSymbPos);
for (m = s0; m < (s0 +s1); m++) { for (m = s0; m < (s0 +s1); m++) {
if (dlsch0_harq->dlDmrsSymbPos & (1 << m)) { if (dlsch0_harq->dlDmrsSymbPos & (1 << m)) {
@@ -1733,8 +1734,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
for (uint16_t l=0; l<nb_symb_pdcch; l++) { for (uint16_t l=0; l<nb_symb_pdcch; l++) {
// note: this only works if RBs for PDCCH are contigous! // note: this only works if RBs for PDCCH are contigous!
LOG_D(PHY, "pdcch_channel_estimation: first_carrier_offset %d, BWPStart %d, coreset_start_rb %d\n", LOG_D(PHY, "pdcch_channel_estimation: first_carrier_offset %d, BWPStart %d, coreset_start_rb %d, coreset_nb_rb %d\n",
fp->first_carrier_offset, pdcch_vars->pdcch_config[n_ss].BWPStart, coreset_start_rb); fp->first_carrier_offset, pdcch_vars->pdcch_config[n_ss].BWPStart, coreset_start_rb, coreset_nb_rb);
if (coreset_nb_rb > 0) if (coreset_nb_rb > 0)
nr_pdcch_channel_estimation(ue, nr_pdcch_channel_estimation(ue,
+4 -4
View File
@@ -19,10 +19,10 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include<stdio.h> #include <stdio.h>
#include<string.h> #include <string.h>
#include<gpib/ib.h> #include <gpib/ib.h>
#include"gpib_send.h" #include "gpib_send.h"
void gpib_send(unsigned int gpib_board, unsigned int gpib_device, char *command_string ) void gpib_send(unsigned int gpib_board, unsigned int gpib_device, char *command_string )
{ {
unsigned short addlist[2] = {gpib_device, NOADDR}; unsigned short addlist[2] = {gpib_device, NOADDR};
+1 -9
View File
@@ -22,9 +22,7 @@
#ifndef __MAC_RRC_PRIMITIVES_H__ #ifndef __MAC_RRC_PRIMITIVES_H__
#define __MAC_RRC_PRIMITIVES_H__ #define __MAC_RRC_PRIMITIVES_H__
#ifndef OPENAIR2_IN #include "LAYER2/RLC/rlc.h"
#include "LAYER2/RLC/rlc.h"
#endif
#include "COMMON/platform_types.h" #include "COMMON/platform_types.h"
#include "COMMON/platform_constants.h" #include "COMMON/platform_constants.h"
#include "openair2/RRC/LTE/rrc_defs.h" #include "openair2/RRC/LTE/rrc_defs.h"
@@ -306,8 +304,6 @@ typedef struct {
#ifndef OPENAIR2_IN
typedef struct { //RRC_INTERFACE_FUNCTIONS typedef struct { //RRC_INTERFACE_FUNCTIONS
unsigned int Frame_index; unsigned int Frame_index;
unsigned short UE_index[NB_MODULES_MAX][NB_SIG_CNX_UE]; unsigned short UE_index[NB_MODULES_MAX][NB_SIG_CNX_UE];
@@ -375,10 +371,6 @@ typedef struct {
} MAC_RLC_XFACE; } MAC_RLC_XFACE;
#endif
//#define IDLE 0 //#define IDLE 0
#define NEED_RADIO_CONFIG 3 #define NEED_RADIO_CONFIG 3
#define RADIO_CONFIG_TX 2 #define RADIO_CONFIG_TX 2
-195
View File
@@ -1,195 +0,0 @@
/*
* 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
*/
/*
rrm_config_structs.h
-------------------
AUTHOR : Linus GASSER modified by Lionel GAUTHIER Raymond KNOPP
COMPANY : EURECOM
EMAIL : linus.gasser@epfl.ch
EMAIL : lionel.gauthier@eurecom.fr
EMAIL : raymond.knopp@eurecom.fr
***************************************************************************/
#ifdef OLD_RRC_CELLULAR
# ifndef __RRM_CONFIG_STRUCTS_H__
# define __RRM_CONFIG_STRUCTS_H__
# include "platform_types.h"
# include "platform_constants.h"
# include "rrm_constants.h"
# include "rlc.h"
typedef volatile struct {
uint32_t e_r;
int timer_poll;
int timer_poll_prohibit;
int timer_discard;
int timer_poll_periodic;
int timer_status_prohibit;
int timer_status_periodic;
int timer_rst;
int timer_mrw;
int missing_pdu_indicator;
uint32_t pdu_size;
// int in_sequence_delivery; // not implemented
uint8_t max_rst;
uint8_t max_dat;
uint16_t poll_pdu;
uint16_t poll_sdu;
uint8_t poll_window;
uint32_t tx_window_size;
uint32_t rx_window_size;
uint8_t max_mrw;
uint8_t last_transmission_pdu_poll_trigger;
uint8_t last_retransmission_pdu_poll_trigger;
enum RLC_SDU_DISCARD_MODE sdu_discard_mode;
uint32_t send_mrw;
} AM;
typedef volatile struct {
uint32_t e_r;
uint32_t timer_discard;
uint32_t sdu_discard_mode;
uint32_t segmentation_indication;
uint32_t delivery_of_erroneous_sdu;
} TM;
typedef volatile struct {
uint32_t e_r;
uint32_t timer_discard;
uint32_t sdu_discard_mode;
} UM;
typedef volatile struct {
uint8_t logch_identity;
uint8_t mac_logch_priority;
} MAP_INFO;
typedef volatile struct {
uint32_t rlc_mode;
AM am;
TM tm;
UM um;
} RLC_INFO;
typedef volatile struct {
int header_compression_algorithm;
} PDCP_INFO;
typedef volatile struct {
rb_type_t rb_type;
RLC_INFO rlc_info;
PDCP_INFO pdcp_info;
uint16_t rb_id;
// Added for OPENAIR MAC
//LCHAN_DESC Lchan_desc;
} RADIOBEARER;
typedef volatile struct {
int TIMER300;
int TIMER302;
int TIMER305;
int TIMER307;
int TIMER308;
int TIMER312;
int TIMER313;
int TIMER314;
int TIMER315;
} L3TIMERS_;
typedef volatile struct {
int COUNTERN300;
int COUNTERN302;
int COUNTERN308;
int COUNTERN312;
int COUNTERN313;
} L3COUNTERS_;
typedef volatile struct {
int MaxNumRemote;
L3TIMERS_ Timers;
L3COUNTERS_ Counters;
} L3_;
typedef volatile struct {
uint8_t rrm_action; // ACTION_NULL,ADD,REMOVE,MODIFY
uint8_t rrm_element; // rb,trch,cctrch
uint8_t rrm_element_index; // rb/trch/cctrch index
} RRM_COMMAND_MT;
typedef volatile struct {
uint8_t rrm_action; // ACTION_NULL,ADD,REMOVE,MODIFY
uint8_t mobile;
uint8_t rrm_element; // rb,trch,cctrch
uint8_t rrm_element_index; // rb/trch/cctrch index
} RRM_COMMAND_RG;
typedef volatile struct {
uint8_t nb_commands;
RRM_COMMAND_RG rrm_commands[JRRM_MAX_COMMANDS_PER_TRANSACTION];
RADIOBEARER bearer[MAX_RB_RG];
L3_ L3;
} RG_CONFIG;
typedef volatile struct {
uint8_t nb_commands;
RRM_COMMAND_MT rrm_commands[JRRM_MAX_COMMANDS_PER_TRANSACTION];
RADIOBEARER bearer[MAX_RB_MOBILE];
L3_ L3;
} MT_CONFIG;
# ifdef NODE_RG
typedef volatile struct {
RG_CONFIG rg_config;
MT_CONFIG mt_config[MAX_MOBILES_PER_RG];
} RRM_VARS;
# else
/* NODE_RG */
typedef volatile struct {
MT_CONFIG mt_config[MAX_MANAGED_RG_PER_MOBILE];
} RRM_VARS;
# endif
/* NODE_RG */
//typedef MT_CONFIG MAIN_MOBILE ;
//typedef RG_CONFIG MAIN_RADIO_GATEWAY;
# endif
#endif
-3
View File
@@ -42,10 +42,7 @@
#include "ngap_messages_types.h" #include "ngap_messages_types.h"
#include "f1ap_messages_types.h" #include "f1ap_messages_types.h"
#ifdef CMAKER
#include "rrc_messages_types.h" #include "rrc_messages_types.h"
#endif
#include "intertask_interface.h" #include "intertask_interface.h"
#include "RRC/NR/nr_rrc_defs.h" #include "RRC/NR/nr_rrc_defs.h"
-2
View File
@@ -9,11 +9,9 @@
*/ */
#ifndef __LAYER2_MAC_DEFS_NB_IOT_H__ #ifndef __LAYER2_MAC_DEFS_NB_IOT_H__
#define __LAYER2_MAC_DEFS_NB_IOT_H__ #define __LAYER2_MAC_DEFS_NB_IOT_H__
#ifdef USER_MODE
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#endif
//#include "COMMON/openair_defs.h" //#include "COMMON/openair_defs.h"
#include "COMMON/platform_constants.h" #include "COMMON/platform_constants.h"
#include "COMMON/mac_rrc_primitives.h" #include "COMMON/mac_rrc_primitives.h"
-2
View File
@@ -105,13 +105,11 @@ eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_EN
eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8 eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
#ifdef OPENAIR2
unsigned char NB_eNB_INST = 0; unsigned char NB_eNB_INST = 0;
uint16_t NB_UE_INST = 0; uint16_t NB_UE_INST = 0;
uint16_t NB_THREAD_INST = 0; uint16_t NB_THREAD_INST = 0;
unsigned char NB_RN_INST = 0; unsigned char NB_RN_INST = 0;
unsigned char NB_INST = 0; unsigned char NB_INST = 0;
#endif
DCI0_5MHz_TDD_1_6_t UL_alloc_pdu; DCI0_5MHz_TDD_1_6_t UL_alloc_pdu;
-108
View File
@@ -77,13 +77,6 @@ static int mbms_mch_i=0;
//static int num_msi_per_CSA[28]; //static int num_msi_per_CSA[28];
/*
*
#ifndef USER_MODE
#define msg debug_msg
#endif
*/
mapping BSR_names[] = { mapping BSR_names[] = {
{"NONE", 0}, {"NONE", 0},
{"SHORT BSR", 1}, {"SHORT BSR", 1},
@@ -1249,65 +1242,6 @@ int ue_query_mch_fembms(module_id_t module_idP, uint8_t CC_id, uint32_t frameP,
} }
#ifdef OLD
// Acount for sf_allocable in CSA
int num_sf_alloc = 0;
for (l = 0; l < 8; l++) {
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l] == NULL)
continue;
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->subframeAllocation.present != LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame)
continue;
uint32_t common_mbsfn_SubframeConfig = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->subframeAllocation.choice.oneFrame.buf[0];
for (j = 0; j < 6; j++)
num_sf_alloc += ((common_mbsfn_SubframeConfig & (0x80 >> j)) == (0x80 >> j));
//num_sf_alloc=1;
}
num_sf_alloc = 10;
num_non_mbsfn_SubframeConfig = (UE_mac_inst[module_idP].non_mbsfn_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | UE_mac_inst[module_idP].non_mbsfn_SubframeConfig->subframeAllocation_r14.buf[0]>>7);
int ones=0;
for(j=0; j < 16; j++){
if(num_non_mbsfn_SubframeConfig & 1)
ones++;
num_non_mbsfn_SubframeConfig>>=1;
}
for (l = 0; l < 28; l++) {
if (UE_mac_inst[module_idP].pmch_stop_mtch[l] >= 1/*num_sf_alloc*/) {
if (UE_mac_inst[module_idP].pmch_stop_mtch[l] != 2047) {
if (UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch] != NULL){
mtch_mcs = UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch]->dataMCS_r9;
//int common_mbsfn_alloc_offset = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[0]->radioframeAllocationOffset;
long common_mbsfn_period = 1 << UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[0]->radioframeAllocationPeriod;
long commonSF_AllocPeriod = 4 << UE_mac_inst[module_idP].commonSF_AllocPeriod_r9;
if(UE_mac_inst[module_idP].common_num_sf_alloc >= UE_mac_inst[module_idP].pmch_stop_mtch[l]){
//LOG_E(MAC,"Attemp to UE_mac_inst[module_idP].common_num_sf_alloc %d\n",UE_mac_inst[module_idP].common_num_sf_alloc);
mtch_mcs = -1;
}/*else
OG_W(MAC,"Attemp to UE_mac_inst[module_idP].common_num_sf_alloc %d\n",UE_mac_inst[module_idP].common_num_sf_alloc);*/
LOG_D(MAC,"Attemp to UE_mac_inst[module_idP].common_num_sf_alloc %d num_sf_alloc %d commonSF_AllocPeriod %ld, common_mbsfn_period %ld num_non_mbsfn_SubframeConfig %x ones %d\n",UE_mac_inst[module_idP].common_num_sf_alloc,num_sf_alloc, commonSF_AllocPeriod,common_mbsfn_period,num_non_mbsfn_SubframeConfig,ones);
UE_mac_inst[module_idP].common_num_sf_alloc++;
UE_mac_inst[module_idP].common_num_sf_alloc = UE_mac_inst[module_idP].common_num_sf_alloc % (num_sf_alloc * commonSF_AllocPeriod / common_mbsfn_period-(1+ones)*(commonSF_AllocPeriod/4)); //TODO
}
else
mtch_mcs = -1;
mch_lcid = (uint8_t)l;
break;
}
}
}
#endif
{ {
// Acount for sf_allocable in Common SF Allocation // Acount for sf_allocable in Common SF Allocation
int num_sf_alloc = 0; int num_sf_alloc = 0;
@@ -1867,49 +1801,7 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
//} //}
} }
#ifdef OLD
// Acount for sf_allocable in CSA
int num_sf_alloc = 0;
for (l = 0; l < 8; l++) {
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l] == NULL)
continue;
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->subframeAllocation.present != LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame)
continue;
uint32_t common_mbsfn_SubframeConfig = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->subframeAllocation.choice.oneFrame.buf[0];
for (j = 0; j < 6; j++)
num_sf_alloc += ((common_mbsfn_SubframeConfig & (0x80 >> j)) == (0x80 >> j));
//num_sf_alloc=1;
}
for (l = 0; l < 28; l++) {
if (UE_mac_inst[module_idP].pmch_stop_mtch[l] >= 1/*num_sf_alloc*/) {
if (UE_mac_inst[module_idP].pmch_stop_mtch[l] != 2047) {
if (UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch] != NULL){
mtch_mcs = UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch]->dataMCS_r9;
long common_mbsfn_period = 1 << UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[0]->radioframeAllocationPeriod;
long commonSF_AllocPeriod = 4 << UE_mac_inst[module_idP].commonSF_AllocPeriod_r9;
if(UE_mac_inst[module_idP].common_num_sf_alloc >= UE_mac_inst[module_idP].pmch_stop_mtch[l]){
//LOG_E(MAC,"Attemp to UE_mac_inst[module_idP].common_num_sf_alloc %d\n",UE_mac_inst[module_idP].common_num_sf_alloc);
mtch_mcs = -1;
}/*else
LOG_W(MAC,"Attemp to UE_mac_inst[module_idP].common_num_sf_alloc %d\n",UE_mac_inst[module_idP].common_num_sf_alloc);*/
UE_mac_inst[module_idP].common_num_sf_alloc++;
UE_mac_inst[module_idP].common_num_sf_alloc = UE_mac_inst[module_idP].common_num_sf_alloc % (num_sf_alloc * commonSF_AllocPeriod / common_mbsfn_period);
}
else
mtch_mcs = -1;
mch_lcid = (uint8_t)l;
break;
}
}
}
#endif
{ {
// Acount for sf_allocable in Common SF Allocation // Acount for sf_allocable in Common SF Allocation
+3 -3
View File
@@ -573,7 +573,7 @@ void config_control_ue(NR_UE_MAC_INST_t *mac){
struct NR_PDCCH_Config__searchSpacesToAddModList *searchSpacesToAddModList = pdcch_Config->choice.setup->searchSpacesToAddModList; struct NR_PDCCH_Config__searchSpacesToAddModList *searchSpacesToAddModList = pdcch_Config->choice.setup->searchSpacesToAddModList;
AssertFatal(searchSpacesToAddModList != NULL, "searchSpacesToAddModList is null\n"); AssertFatal(searchSpacesToAddModList != NULL, "searchSpacesToAddModList is null\n");
AssertFatal(searchSpacesToAddModList->list.count > 0, "list of UE specifically configured Search Spaces is empty\n"); AssertFatal(searchSpacesToAddModList->list.count > 0, "list of UE specifically configured Search Spaces is empty\n");
AssertFatal(searchSpacesToAddModList->list.count < FAPI_NR_MAX_SS_PER_CORESET, "too many searchpaces per coreset %d\n", searchSpacesToAddModList->list.count); AssertFatal(searchSpacesToAddModList->list.count < FAPI_NR_MAX_SS, "too many searchpaces per coreset %d\n", searchSpacesToAddModList->list.count);
struct NR_UplinkConfig__uplinkBWP_ToAddModList *uplinkBWP_ToAddModList = scd->uplinkConfig->uplinkBWP_ToAddModList; struct NR_UplinkConfig__uplinkBWP_ToAddModList *uplinkBWP_ToAddModList = scd->uplinkConfig->uplinkBWP_ToAddModList;
if (ul_bwp_id > 0) { if (ul_bwp_id > 0) {
@@ -597,7 +597,7 @@ void config_control_ue(NR_UE_MAC_INST_t *mac){
AssertFatal(*ss->controlResourceSetId == mac->coreset[dl_bwp_id][coreset_id - 1]->controlResourceSetId, "ss->controlResourceSetId is unknown\n"); AssertFatal(*ss->controlResourceSetId == mac->coreset[dl_bwp_id][coreset_id - 1]->controlResourceSetId, "ss->controlResourceSetId is unknown\n");
AssertFatal(ss->monitoringSymbolsWithinSlot != NULL, "NR_SearchSpace->monitoringSymbolsWithinSlot is null\n"); AssertFatal(ss->monitoringSymbolsWithinSlot != NULL, "NR_SearchSpace->monitoringSymbolsWithinSlot is null\n");
AssertFatal(ss->monitoringSymbolsWithinSlot->buf != NULL, "NR_SearchSpace->monitoringSymbolsWithinSlot->buf is null\n"); AssertFatal(ss->monitoringSymbolsWithinSlot->buf != NULL, "NR_SearchSpace->monitoringSymbolsWithinSlot->buf is null\n");
mac->SSpace[dl_bwp_id][0][ss_id] = ss; mac->SSpace[dl_bwp_id][ss_id] = ss;
} }
// Check available CSSs in the commonSearchSpaceList (list of additional common search spaces) // Check available CSSs in the commonSearchSpaceList (list of additional common search spaces)
@@ -610,7 +610,7 @@ void config_control_ue(NR_UE_MAC_INST_t *mac){
AssertFatal(css->searchSpaceType != NULL, "css->searchSpaceType is null\n"); AssertFatal(css->searchSpaceType != NULL, "css->searchSpaceType is null\n");
AssertFatal(css->monitoringSymbolsWithinSlot != NULL, "css->monitoringSymbolsWithinSlot is null\n"); AssertFatal(css->monitoringSymbolsWithinSlot != NULL, "css->monitoringSymbolsWithinSlot is null\n");
AssertFatal(css->monitoringSymbolsWithinSlot->buf != NULL, "css->monitoringSymbolsWithinSlot->buf is null\n"); AssertFatal(css->monitoringSymbolsWithinSlot->buf != NULL, "css->monitoringSymbolsWithinSlot->buf is null\n");
mac->SSpace[dl_bwp_id][0][ss_id] = css; mac->SSpace[dl_bwp_id][ss_id] = css;
ss_id++; ss_id++;
} }
} }
+1 -1
View File
@@ -367,7 +367,7 @@ typedef struct {
NR_BWP_Downlink_t *DLbwp[MAX_NUM_BWP]; NR_BWP_Downlink_t *DLbwp[MAX_NUM_BWP];
NR_BWP_Uplink_t *ULbwp[MAX_NUM_BWP]; NR_BWP_Uplink_t *ULbwp[MAX_NUM_BWP];
NR_ControlResourceSet_t *coreset[MAX_NUM_BWP][FAPI_NR_MAX_CORESET_PER_BWP]; NR_ControlResourceSet_t *coreset[MAX_NUM_BWP][FAPI_NR_MAX_CORESET_PER_BWP];
NR_SearchSpace_t *SSpace[MAX_NUM_BWP][FAPI_NR_MAX_CORESET_PER_BWP][FAPI_NR_MAX_SS_PER_CORESET]; NR_SearchSpace_t *SSpace[MAX_NUM_BWP][FAPI_NR_MAX_SS];
lte_frame_type_t frame_type; lte_frame_type_t frame_type;
@@ -76,7 +76,6 @@ void fill_dci_search_candidates(NR_SearchSpace_t *ss,fapi_nr_dl_config_dci_dl_pd
void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15, fapi_nr_dl_config_request_t *dl_config, int rnti_type, int ss_id){ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15, fapi_nr_dl_config_request_t *dl_config, int rnti_type, int ss_id){
uint16_t monitoringSymbolsWithinSlot = 0; uint16_t monitoringSymbolsWithinSlot = 0;
uint8_t coreset_id = 1;
int sps = 0; int sps = 0;
AssertFatal(mac->scc == NULL || mac->scc_SIB == NULL, "both scc and scc_SIB cannot be non-null\n"); AssertFatal(mac->scc == NULL || mac->scc_SIB == NULL, "both scc and scc_SIB cannot be non-null\n");
@@ -97,11 +96,23 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
NR_SearchSpace_t *ss; NR_SearchSpace_t *ss;
NR_ControlResourceSet_t *coreset; NR_ControlResourceSet_t *coreset;
if(ss_id>=0) { if(ss_id>=0) {
ss = mac->SSpace[bwp_id][coreset_id - 1][ss_id]; if (rnti_type == NR_RNTI_TC || rnti_type == NR_RNTI_RA) {
ss = mac->ra.ss;
AssertFatal(mac->ra.ss->searchSpaceId == ss_id,"Search Space id %d does not correspond to the one in ra->ss %ld for RA procedures\n",
ss_id,mac->ra.ss->searchSpaceId);
}
else
ss = mac->SSpace[bwp_id][ss_id];
}
else
ss = mac->search_space_zero;
uint8_t coreset_id = *ss->controlResourceSetId;
if(coreset_id>0) {
coreset = mac->coreset[bwp_id][coreset_id - 1]; coreset = mac->coreset[bwp_id][coreset_id - 1];
rel15->coreset.CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG; rel15->coreset.CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG;
} else { } else {
ss = mac->search_space_zero;
coreset = mac->coreset0; coreset = mac->coreset0;
if(rnti_type == NR_RNTI_SI) { if(rnti_type == NR_RNTI_SI) {
rel15->coreset.CoreSetType = NFAPI_NR_CSET_CONFIG_MIB_SIB1; rel15->coreset.CoreSetType = NFAPI_NR_CSET_CONFIG_MIB_SIB1;
@@ -255,7 +266,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
RA_config_t *ra = &mac->ra; RA_config_t *ra = &mac->ra;
int ss_id; int ss_id;
uint8_t bwp_id = (mac->cg) ? mac->DL_BWP_Id : 0, coreset_id = (mac->cg) ? 1 : 0; uint8_t bwp_id = (mac->cg) ? mac->DL_BWP_Id : 0;
//NR_ServingCellConfig_t *scd = mac->scg->spCellConfig->spCellConfigDedicated; //NR_ServingCellConfig_t *scd = mac->scg->spCellConfig->spCellConfigDedicated;
NR_BWP_DownlinkDedicated_t *bwpd = (bwp_id>0) ? mac->DLbwp[bwp_id-1]->bwp_Dedicated : mac->cg->spCellConfig->spCellConfigDedicated->initialDownlinkBWP; NR_BWP_DownlinkDedicated_t *bwpd = (bwp_id>0) ? mac->DLbwp[bwp_id-1]->bwp_Dedicated : mac->cg->spCellConfig->spCellConfigDedicated->initialDownlinkBWP;
NR_BWP_DownlinkCommon_t *bwp_Common = (bwp_id>0) ? mac->DLbwp[bwp_id-1]->bwp_Common : &mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP; NR_BWP_DownlinkCommon_t *bwp_Common = (bwp_id>0) ? mac->DLbwp[bwp_id-1]->bwp_Common : &mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP;
@@ -264,9 +275,9 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
// loop over all available SS for CORESET ID 1 // loop over all available SS for CORESET ID 1
if (bwpd) { if (bwpd) {
for (ss_id = 0; ss_id < FAPI_NR_MAX_SS_PER_CORESET && mac->SSpace[bwp_id][coreset_id - 1][ss_id] != NULL; ss_id++){ for (ss_id = 0; ss_id < FAPI_NR_MAX_SS && mac->SSpace[bwp_id][ss_id] != NULL; ss_id++){
LOG_D(NR_MAC, "[DCI_CONFIG] ss_id %d\n",ss_id); LOG_D(NR_MAC, "[DCI_CONFIG] ss_id %d\n",ss_id);
NR_SearchSpace_t *ss = mac->SSpace[bwp_id][coreset_id - 1][ss_id]; NR_SearchSpace_t *ss = mac->SSpace[bwp_id][ss_id];
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &dl_config->dl_config_list[dl_config->number_pdus].dci_config_pdu.dci_config_rel15; fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &dl_config->dl_config_list[dl_config->number_pdus].dci_config_pdu.dci_config_rel15;
NR_SetupRelease_PDCCH_ConfigCommon_t *pdcch_ConfigCommon = bwp_Common->pdcch_ConfigCommon; NR_SetupRelease_PDCCH_ConfigCommon_t *pdcch_ConfigCommon = bwp_Common->pdcch_ConfigCommon;
struct NR_PhysicalCellGroupConfig *phy_cgc = mac->cg->physicalCellGroupConfig; struct NR_PhysicalCellGroupConfig *phy_cgc = mac->cg->physicalCellGroupConfig;
+1 -1
View File
@@ -925,7 +925,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_0; rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_0;
if (mac->ra.ra_state == WAIT_CONTENTION_RESOLUTION) if (mac->ra.ra_state == WAIT_CONTENTION_RESOLUTION)
rel15->dci_format_options[1] = NR_UL_DCI_FORMAT_0_0; // msg3 retransmission rel15->dci_format_options[1] = NR_UL_DCI_FORMAT_0_0; // msg3 retransmission
config_dci_pdu(mac, rel15, dl_config, mac->ra.ra_state == WAIT_RAR ? NR_RNTI_RA : NR_RNTI_TC , -1); config_dci_pdu(mac, rel15, dl_config, mac->ra.ra_state == WAIT_RAR ? NR_RNTI_RA : NR_RNTI_TC , mac->ra.ss->searchSpaceId);
fill_dci_search_candidates(mac->ra.ss, rel15); fill_dci_search_candidates(mac->ra.ss, rel15);
dl_config->number_pdus = 1; dl_config->number_pdus = 1;
LOG_D(MAC,"mac->cg %p: Calling fill_scheduled_response rnti %x, type0_pdcch, num_pdus %d\n",mac->cg,rel15->rnti,dl_config->number_pdus); LOG_D(MAC,"mac->cg %p: Calling fill_scheduled_response rnti %x, type0_pdcch, num_pdus %d\n",mac->cg,rel15->rnti,dl_config->number_pdus);
+9 -10
View File
@@ -60,22 +60,21 @@ uint16_t get_ssboffset_pointa(NR_ServingCellConfigCommon_t *scc,const long band)
int ratio; int ratio;
switch (*scc->ssbSubcarrierSpacing) { switch (*scc->ssbSubcarrierSpacing) {
case NR_SubcarrierSpacing_kHz15: case NR_SubcarrierSpacing_kHz15:
AssertFatal(band <= 79, AssertFatal(band <= 95,
"Band %ld is not possible for SSB with 15 kHz SCS\n", "Band %ld is not possible for SSB with 15 kHz SCS\n",
band); band);
if (band < 77) // below 3GHz // no band available above 3GHz using 15kHz
ratio = 3; // NRARFCN step is 5 kHz ratio = 3; // NRARFCN step is 5 kHz
else
ratio = 1; // NRARFCN step is 15 kHz
break; break;
case NR_SubcarrierSpacing_kHz30: case NR_SubcarrierSpacing_kHz30:
AssertFatal(band <= 79, AssertFatal(band <= 96,
"Band %ld is not possible for SSB with 15 kHz SCS\n", "Band %ld is not possible for SSB with 30 kHz SCS\n",
band); band);
if (band < 77) // below 3GHz if (band == 46 || band == 48 || band == 77 ||
ratio = 6; // NRARFCN step is 5 kHz band == 78 || band == 79 || band == 96) // above 3GHz
ratio = 2; // NRARFCN step is 15 kHz
else else
ratio = 2; // NRARFCN step is 15 kHz ratio = 6; // NRARFCN step is 5 kHz
break; break;
case NR_SubcarrierSpacing_kHz120: case NR_SubcarrierSpacing_kHz120:
AssertFatal(band >= 257, AssertFatal(band >= 257,
@@ -446,7 +446,7 @@ void nr_store_dlsch_buffer(module_id_t module_id,
if (sched_ctrl->num_total_bytes == 0 if (sched_ctrl->num_total_bytes == 0
&& !sched_ctrl->ta_apply) /* If TA should be applied, give at least one RB */ && !sched_ctrl->ta_apply) /* If TA should be applied, give at least one RB */
return; continue;
LOG_D(NR_MAC, LOG_D(NR_MAC,
"[%s][%d.%d], %s%d->DLSCH, RLC status %d bytes TA %d\n", "[%s][%d.%d], %s%d->DLSCH, RLC status %d bytes TA %d\n",
+1 -4
View File
@@ -68,9 +68,7 @@ typedef struct {
} pdcp_params_t; } pdcp_params_t;
#ifndef PDCP_USE_NETLINK #define PDCP_USE_NETLINK ( get_pdcp_optmask() & PDCP_USE_NETLINK_BIT)
#define PDCP_USE_NETLINK ( get_pdcp_optmask() & PDCP_USE_NETLINK_BIT)
#endif
#define LINK_ENB_PDCP_TO_IP_DRIVER ( get_pdcp_optmask() & LINK_ENB_PDCP_TO_IP_DRIVER_BIT) #define LINK_ENB_PDCP_TO_IP_DRIVER ( get_pdcp_optmask() & LINK_ENB_PDCP_TO_IP_DRIVER_BIT)
#define LINK_ENB_PDCP_TO_GTPV1U ( get_pdcp_optmask() & LINK_ENB_PDCP_TO_GTPV1U_BIT) #define LINK_ENB_PDCP_TO_GTPV1U ( get_pdcp_optmask() & LINK_ENB_PDCP_TO_GTPV1U_BIT)
#define UE_NAS_USE_TUN ( get_pdcp_optmask() & UE_NAS_USE_TUN_BIT) #define UE_NAS_USE_TUN ( get_pdcp_optmask() & UE_NAS_USE_TUN_BIT)
@@ -503,7 +501,6 @@ typedef struct {
#define REORDERING_WINDOW_SN_7BIT 64 #define REORDERING_WINDOW_SN_7BIT 64
#define REORDERING_WINDOW_SN_12BIT 2048 #define REORDERING_WINDOW_SN_12BIT 2048
extern signed int pdcp_2_nas_irq;
extern pdcp_stats_t UE_pdcp_stats[MAX_MOBILES_PER_ENB]; extern pdcp_stats_t UE_pdcp_stats[MAX_MOBILES_PER_ENB];
extern pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX]; extern pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];
@@ -37,7 +37,6 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
# include "rlc_tm_entity.h" # include "rlc_tm_entity.h"
# include "mem_block.h" # include "mem_block.h"
//# include "rrm_config_structs.h"
# include "rlc_tm_structs.h" # include "rlc_tm_structs.h"
//# include "rlc.h" //# include "rlc.h"
# include "platform_types.h" # include "platform_types.h"
@@ -27,7 +27,6 @@
#include "rlc_um.h" #include "rlc_um.h"
#include "rlc_primitives.h" #include "rlc_primitives.h"
#include "list.h" #include "list.h"
#include "rrm_config_structs.h"
#include "LAYER2/MAC/mac_extern.h" #include "LAYER2/MAC/mac_extern.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
@@ -33,7 +33,6 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
# include "rlc_um_entity.h" # include "rlc_um_entity.h"
# include "mem_block.h" # include "mem_block.h"
# include "rrm_config_structs.h"
# include "rlc_um_structs.h" # include "rlc_um_structs.h"
# include "rlc_um_constants.h" # include "rlc_um_constants.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
-259
View File
@@ -362,264 +362,5 @@ int dump_eNB_l2_stats(char *buffer, int length) {
return len + 1 /* SR: for trailing \0 */; return len + 1 /* SR: for trailing \0 */;
} }
#ifdef PROC
int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length) {
int len = 0,fg,Overhead, Sign;
unsigned int i,j,k,kk;
unsigned int Mod_id = 0,CH_index;
unsigned int tx_pdcp_sdu;
unsigned int tx_pdcp_sdu_discarded;
unsigned int tx_retransmit_pdu_unblock;
unsigned int tx_retransmit_pdu_by_status;
unsigned int tx_retransmit_pdu;
unsigned int tx_data_pdu;
unsigned int tx_control_pdu;
unsigned int rx_sdu;
unsigned int rx_error_pdu;
unsigned int rx_data_pdu;
unsigned int rx_data_pdu_out_of_window;
unsigned int rx_control_pdu;
// if (mac_xface->is_cluster_head == 0) {
for (k=0; k<NB_INST; k++) {
if (Mac_rlc_xface->Is_cluster_head[k] == 0) {
#ifndef PHY_EMUL_ONE_MACHINE
Mod_id=k-NB_CH_INST;
len+=sprintf(&buffer[len],"UE TTI: %d\n",Mac_rlc_xface->frame);
for (CH_index = 0; CH_index<NB_CNX_UE; CH_index++) {
if (UE_mac_inst[Mod_id].Dcch_lchan[CH_index].Active==1) {
len+=sprintf(&buffer[len],"CH %u: Wideband SINR %d dB---\n",
CH_index,UE_mac_inst[Mod_id].Def_meas[CH_index].Wideband_sinr);
len+=sprintf(&buffer[len],"CH %u: Subband SINR (dB) :",
CH_index);
for (fg=0; fg<NUMBER_OF_MEASUREMENT_SUBBANDS; fg++) {
len+=sprintf(&buffer[len],"%d ",UE_mac_inst[Mod_id].Def_meas[CH_index].Sinr_meas[0][fg]);
}
len+=sprintf(&buffer[len],"\n");
len+=sprintf(&buffer[len],"BCCH %d, NB_RX_MAC = %d (%d errors)\n",
UE_mac_inst[Mod_id].Bcch_lchan[CH_index].Lchan_info.Lchan_id.Index,
UE_mac_inst[Mod_id].Bcch_lchan[CH_index].Lchan_info.NB_RX,
UE_mac_inst[Mod_id].Bcch_lchan[CH_index].Lchan_info.NB_RX_ERRORS);
len+=sprintf(&buffer[len],"CCCH %d, NB_RX_MAC = %d (%d errors)\n",
UE_mac_inst[Mod_id].Ccch_lchan[CH_index].Lchan_info.Lchan_id.Index,
UE_mac_inst[Mod_id].Ccch_lchan[CH_index].Lchan_info.NB_RX,
UE_mac_inst[Mod_id].Ccch_lchan[CH_index].Lchan_info.NB_RX_ERRORS);
len+=sprintf(&buffer[len],"LCHAN %d (DCCH), NB_TX_MAC = %d (%d bits/TTI, %d kbits/sec), NB_RX_MAC = %d (%d errors)\n",
UE_mac_inst[Mod_id].Dcch_lchan[CH_index].Lchan_info.Lchan_id.Index,
UE_mac_inst[Mod_id].Dcch_lchan[CH_index].Lchan_info.NB_TX,
UE_mac_inst[Mod_id].Dcch_lchan[CH_index].Lchan_info.output_rate,
(10*UE_mac_inst[Mod_id].Dcch_lchan[CH_index].Lchan_info.output_rate)>>5,
UE_mac_inst[Mod_id].Dcch_lchan[CH_index].Lchan_info.NB_RX,
UE_mac_inst[Mod_id].Dcch_lchan[CH_index].Lchan_info.NB_RX_ERRORS);
for(i=1; i<NB_RAB_MAX; i++) {
if (UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Active==1) {
Overhead=UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.output_rate - Pdcp_stats_tx_rate[k][CH_index][i];
if(Overhead<0) {
Overhead=-Overhead;
Sign=-1;
} else {
Sign=1;
}
len+=sprintf(&buffer[len],
"[PDCP]LCHAN %d: NB_TX = %d ,Tx_rate =(%d bits/TTI ,%d Kbits/s), NB_RX = %d ,Rx_rate =(%d bits/TTI ,%d Kbits/s) , LAYER2 TX OVERHEAD: %d Kbits/s\n",
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
Pdcp_stats_tx[k][CH_index][i],
Pdcp_stats_tx_rate[k][CH_index][i],
(10*Pdcp_stats_tx_rate[k][CH_index][i])>>5,
Pdcp_stats_rx[k][CH_index][i],
Pdcp_stats_rx_rate[k][CH_index][i],
(10*Pdcp_stats_rx_rate[k][CH_index][i])>>5,
Sign*(10*Overhead)>>5);
int status = rlc_stat_req (k,
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
&tx_pdcp_sdu,
&tx_pdcp_sdu_discarded,
&tx_retransmit_pdu_unblock,
&tx_retransmit_pdu_by_status,
&tx_retransmit_pdu,
&tx_data_pdu,
&tx_control_pdu,
&rx_sdu,
&rx_error_pdu,
&rx_data_pdu,
&rx_data_pdu_out_of_window,
&rx_control_pdu) ;
if (status == RLC_OP_STATUS_OK) {
len+=sprintf(&buffer[len],"RLC LCHAN %d, NB_SDU_TO_TX = %u\tNB_SDU_DISC %u\tNB_RX_SDU %u\n",
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
tx_pdcp_sdu,
tx_pdcp_sdu_discarded,
rx_sdu);
len+=sprintf(&buffer[len],"RLC LCHAN %d, NB_TB_TX_DATA = %u\tNB_TB_TX_CONTROL %u\tNB_TX_TB_RETRANS %u",
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
tx_data_pdu,
tx_control_pdu,
tx_retransmit_pdu);
len+=sprintf(&buffer[len],"\tRLC LCHAN %d, NB_TX_TB_RETRANS_BY_STATUS = %u\tNB_TX_TB_RETRANS_PADD %u\n",
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
tx_retransmit_pdu_by_status,
tx_retransmit_pdu_unblock);
len+=sprintf(&buffer[len],"RLC LCHAN %d, NB_RX_DATA = %u\tNB_RX_TB_OUT_WIN %u\tNB_RX_TB_CORRUPT %u\n",
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
rx_data_pdu,
rx_data_pdu_out_of_window,
rx_error_pdu);
}
len+=sprintf(&buffer[len],"[MAC]: LCHAN %d, NB_TX_MAC = %d (%d bits/TTI, %d kbits/s), NB_RX_MAC = %d (%d errors)\n",
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.NB_TX,
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.output_rate,
(10*UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.output_rate)>>5,
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.NB_RX,
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.NB_RX_ERRORS);
len+=sprintf(&buffer[len]," TX per TB: ");
for(kk=0; kk<MAX_NUMBER_TB_PER_LCHAN/2; kk++) {
len+=sprintf(&buffer[len],"%d . ",UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.NB_TX_TB[kk]);
}
len+=sprintf(&buffer[len],"\n");
len+=sprintf(&buffer[len]," RXerr per TB: ");
for(kk=0; kk<MAX_NUMBER_TB_PER_LCHAN/2; kk++)
len+=sprintf(&buffer[len],"%d/%d . ",UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.NB_RX_ERRORS_TB[kk],
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.NB_RX_TB[kk]);
len+=sprintf(&buffer[len],"\n");
}
}
}
}
#endif //PHY_EMUL_ONE_MACHINE
} else if(Mac_rlc_xface->Is_cluster_head[k] ==1) {
Mod_id=k;
len+=sprintf(&buffer[len],
"------------------------------------------------------------------- TTI: %d------------------------------------------------------------------\n",
Mac_rlc_xface->frame);
for(i=1; i<=NB_CNX_CH; i++) {
if (CH_mac_inst[Mod_id].Dcch_lchan[i].Active==1) {
len+=sprintf(&buffer[len],"\nMR index %u: DL SINR (feedback) %d dB, CQI: %s\n\n",
i,//CH_rrc_inst[Mod_id].Info.UE_info[i].L2_id[0],
CH_mac_inst[Mod_id].Def_meas[i].Wideband_sinr,
print_cqi(CH_mac_inst[Mod_id].Def_meas[i].cqi));
len+=sprintf(&buffer[len],
"[MAC] LCHAN %d (DCCH), NB_TX_MAC= %d (%d bits/TTI, %d kbits/s), NB_RX_MAC= %d (errors %d, sacch errors %d, sach errors %d, sach_missing %d)\n\n",
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.Lchan_id.Index,
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.NB_TX,
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.output_rate,
(10*CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.output_rate)>>5,
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.NB_RX,
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.NB_RX_ERRORS,
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.NB_RX_SACCH_ERRORS,
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.NB_RX_SACH_ERRORS,
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.NB_RX_SACH_MISSING);
for(j=0; j<NB_RAB_MAX; j++) {
if (CH_mac_inst[Mod_id].Dtch_lchan[j][i].Active==1) {
Overhead=CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.output_rate - Pdcp_stats_tx_rate[k][i][j];
if(Overhead<0) {
Overhead=-Overhead;
Sign=-1;
} else {
Sign=1;
}
len+=sprintf(&buffer[len],
"[PDCP]LCHAN %d: NB_TX = %d ,Tx_rate =(%d bits/TTI ,%d Kbits/s), NB_RX = %d ,Rx_rate =(%d bits/TTI ,%d Kbits/s), LAYER2 TX OVERHEAD= %d Kbits/s\n",
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
Pdcp_stats_tx[k][i][j],
Pdcp_stats_tx_rate[k][i][j],
(10*Pdcp_stats_tx_rate[k][i][j])>>5,
Pdcp_stats_rx[k][i][j],
Pdcp_stats_rx_rate[k][i][j],
(10*Pdcp_stats_rx_rate[k][i][j])>>5,
Sign*(10*Overhead)>>5);
int status = rlc_stat_req (k,
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
&tx_pdcp_sdu,
&tx_pdcp_sdu_discarded,
&tx_retransmit_pdu_unblock,
&tx_retransmit_pdu_by_status,
&tx_retransmit_pdu,
&tx_data_pdu,
&tx_control_pdu,
&rx_sdu,
&rx_error_pdu,
&rx_data_pdu,
&rx_data_pdu_out_of_window,
&rx_control_pdu) ;
/*
if (status == RLC_OP_STATUS_OK) {
len+=sprintf(&buffer[len],"\t[RLC] LCHAN %d, NB_SDU_TO_TX = %d\tNB_SDU_DISC %d\tNB_RX_SDU %d\n",
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
tx_pdcp_sdu,
tx_pdcp_sdu_discarded,
rx_sdu);
len+=sprintf(&buffer[len],"\t[RLC] LCHAN %d, NB_TB_TX_DATA = %d\tNB_TB_TX_CONTROL %d\tNB_TX_TB_RETRANS %\n",
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
tx_data_pdu,
tx_control_pdu,
tx_retransmit_pdu);
len+=sprintf(&buffer[len],"\t[RLC] LCHAN %d, NB_TX_TB_RETRANS_BY_STATUS = %d\tNB_TX_TB_RETRANS_PADD %d\n",
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
tx_retransmit_pdu_by_status,
tx_retransmit_pdu_unblock);
len+=sprintf(&buffer[len],"\t[RLC] LCHAN %d, NB_RX_DATA = %d\tNB_RX_TB_OUT_WIN %d\tNB_RX_TB_CORRUPT %d\n",
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
rx_data_pdu,
rx_data_pdu_out_of_window,
rx_error_pdu);
}
*/
len+=sprintf(&buffer[len],
"[MAC]LCHAN %d (CNX %u,RAB %u), NB_TX_MAC= %d (%d bits/TTI, %d kbit/s), NB_RX_MAC= %d (errors %d, sacch_errors %d, sach_errors %d, sach_missing %d)\n",
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
i,j,
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_TX,
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.output_rate,
(10*CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.output_rate)>>5,
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX,
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX_ERRORS,
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX_SACCH_ERRORS,
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX_SACH_ERRORS,
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX_SACH_MISSING);
len+=sprintf(&buffer[len],"[MAC][SCHEDULER] TX Arrival Rate %d, TX Service Rate %d, RX Arrival rate %d, RX Service rate %d, NB_BW_REQ_RX %d\n\n",
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Arrival_rate,
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Tx_rate,
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Req_rate,
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Rx_rate,
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_BW_REQ_RX);
/*
len+=sprintf(&buffer[len]," TX per TB: ");
for(kk=0;kk<MAX_NUMBER_TB_PER_LCHAN/2;kk++)
len+=sprintf(&buffer[len],"%d.",CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_TX_TB[kk]);
len+=sprintf(&buffer[len],"\n");
len+=sprintf(&buffer[len]," RXerr per TB: ");
for(kk=0;kk<MAX_NUMBER_TB_PER_LCHAN/2;kk++)
len+=sprintf(&buffer[len],"%d/%d . ",CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX_ERRORS_TB[kk],
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX_TB[kk]);
len+=sprintf(&buffer[len],"\n");
*/
}
}
}
}
}
}
return len;
}
#endif
-84
View File
@@ -389,36 +389,19 @@ void nas_COMMON_QOS_send(struct sk_buff *skb, struct cx_entity *cx, struct class
pdcph.sourceL2Id = 0; pdcph.sourceL2Id = 0;
pdcph.destinationL2Id = 0; pdcph.destinationL2Id = 0;
#ifdef PDCP_USE_NETLINK
bytes_wrote = nas_netlink_send((char *)&pdcph,NAS_PDCPH_SIZE); bytes_wrote = nas_netlink_send((char *)&pdcph,NAS_PDCPH_SIZE);
#ifdef NAS_DEBUG_SEND #ifdef NAS_DEBUG_SEND
printk("[NAS] Wrote %d bytes (header for %d byte skb) to PDCP via netlink\n", printk("[NAS] Wrote %d bytes (header for %d byte skb) to PDCP via netlink\n",
bytes_wrote,skb->len); bytes_wrote,skb->len);
#endif #endif
#else
bytes_wrote = rtf_put(NAS2PDCP_FIFO, &pdcph, NAS_PDCPH_SIZE);
#ifdef NAS_DEBUG_SEND
printk("[NAS] Wrote %d bytes (header for %d byte skb) to PDCP fifo\n",
bytes_wrote,skb->len);
#endif
#endif //PDCP_USE_NETLINK
if (bytes_wrote != NAS_PDCPH_SIZE) { if (bytes_wrote != NAS_PDCPH_SIZE) {
printk("NAS_COMMON_QOS_SEND: problem while writing PDCP's header (bytes wrote = %d )\n",bytes_wrote); printk("NAS_COMMON_QOS_SEND: problem while writing PDCP's header (bytes wrote = %d )\n",bytes_wrote);
printk("rb_id %ld, Wrote %d, Header Size %lu\n", pdcph.rb_id , bytes_wrote, NAS_PDCPH_SIZE); printk("rb_id %ld, Wrote %d, Header Size %lu\n", pdcph.rb_id , bytes_wrote, NAS_PDCPH_SIZE);
#ifndef PDCP_USE_NETLINK
rtf_reset(NAS2PDCP_FIFO);
#endif //PDCP_USE_NETLINK
return; return;
} }
#ifdef PDCP_USE_NETLINK
bytes_wrote += nas_netlink_send((char *)skb->data,skb->len); bytes_wrote += nas_netlink_send((char *)skb->data,skb->len);
#else
bytes_wrote += rtf_put(NAS2PDCP_FIFO, skb->data, skb->len);
#endif //PDCP_USE_NETLINK
if (bytes_wrote != skb->len+NAS_PDCPH_SIZE) { if (bytes_wrote != skb->len+NAS_PDCPH_SIZE) {
printk("NAS_COMMON_QOS_SEND: Inst %d, RB_ID %ld: problem while writing PDCP's data, bytes_wrote = %d, Data_len %d, PDCPH_SIZE %lu\n", printk("NAS_COMMON_QOS_SEND: Inst %d, RB_ID %ld: problem while writing PDCP's data, bytes_wrote = %d, Data_len %d, PDCPH_SIZE %lu\n",
@@ -427,9 +410,6 @@ void nas_COMMON_QOS_send(struct sk_buff *skb, struct cx_entity *cx, struct class
bytes_wrote, bytes_wrote,
skb->len, skb->len,
NAS_PDCPH_SIZE); // congestion NAS_PDCPH_SIZE); // congestion
#ifndef PDCP_USE_NETLINK
rtf_reset(NAS2PDCP_FIFO);
#endif //PDCP_USE_NETLINK
return; return;
} }
@@ -449,69 +429,6 @@ void nas_COMMON_QOS_send(struct sk_buff *skb, struct cx_entity *cx, struct class
#endif #endif
} }
#ifndef PDCP_USE_NETLINK
//---------------------------------------------------------------------------
void nas_COMMON_QOS_receive()
{
//---------------------------------------------------------------------------
uint8_t sapi;
struct pdcp_data_ind_header_s pdcph;
unsigned char data_buffer[2048];
struct classifier_entity *rclass;
struct nas_priv *priv;
int bytes_read;
// Start debug information
#ifdef NAS_DEBUG_RECEIVE
printk("NAS_COMMON_QOS_RECEIVE - begin \n");
#endif
// End debug information
bytes_read = rtf_get(PDCP2PDCP_USE_RT_FIFO,&pdcph, NAS_PDCPH_SIZE);
while (bytes_read>0) {
if (bytes_read != NAS_PDCPH_SIZE) {
printk("NAS_COMMON_QOS_RECEIVE: problem while reading PDCP header\n");
return;
}
priv=netdev_priv(nasdev[pdcph.inst]);
rclass = nas_COMMON_search_class_for_rb(pdcph.rb_id,priv);
bytes_read+= rtf_get(PDCP2PDCP_USE_RT_FIFO,
data_buffer,
pdcph.data_size);
#ifdef NAS_DEBUG_RECEIVE
printk("NAS_COMMON_QOS_RECEIVE - Got header for RB %d, Inst %d \n",
pdcph.rb_id,
pdcph.inst);
#endif
if (rclass) {
#ifdef NAS_DEBUG_RECEIVE
printk("[NAS][COMMON] Found corresponding connection in classifier for RAB\n");
#endif //NAS_DEBUG_RECEIVE
nas_COMMON_receive(pdcph.data_size,
(void *)data_buffer,
pdcph.inst,
rclass,
pdcph.rb_id);
}
bytes_read = rtf_get(PDCP2PDCP_USE_RT_FIFO, &pdcph, NAS_PDCPH_SIZE);
}
#ifdef NAS_DEBUG_RECEIVE
printk("NAS_COMMON_QOS_RECEIVE - end \n");
#endif
}
#else
void nas_COMMON_QOS_receive(struct nlmsghdr *nlh) void nas_COMMON_QOS_receive(struct nlmsghdr *nlh)
{ {
@@ -542,7 +459,6 @@ void nas_COMMON_QOS_receive(struct nlmsghdr *nlh)
} }
} }
#endif //PDCP_USE_NETLINK
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
struct cx_entity *nas_COMMON_search_cx(nasLocalConnectionRef_t lcr,struct nas_priv *priv) struct cx_entity *nas_COMMON_search_cx(nasLocalConnectionRef_t lcr,struct nas_priv *priv)
-75
View File
@@ -53,10 +53,8 @@
struct net_device *nasdev[NB_INSTANCES_MAX]; struct net_device *nasdev[NB_INSTANCES_MAX];
#ifdef PDCP_USE_NETLINK
extern void nas_netlink_release(void); extern void nas_netlink_release(void);
extern int nas_netlink_init(void); extern int nas_netlink_init(void);
#endif
//int bytes_wrote; //int bytes_wrote;
//int bytes_read; //int bytes_read;
@@ -82,38 +80,6 @@ int find_inst(struct net_device *dev)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#ifndef PDCP_USE_NETLINK
//void interrupt(void){
void *nas_interrupt(void)
{
//---------------------------------------------------------------------------
uint8_t cxi;
// struct nas_priv *priv=netdev_priv(dev_id);
// unsigned int flags;
// priv->lock = SPIN_LOCK_UNLOCKED;
#ifdef DEBUG_INTERRUPT
printk("INTERRUPT - begin\n");
#endif
// spin_lock_irqsave(&priv->lock,flags);
cxi=0;
// mesh_GC_receive();
// mesh_DC_receive(naspriv->cx+cxi);
#ifndef PDCP_USE_NETLINK
nas_COMMON_QOS_receive();
#endif
// spin_unlock_irqrestore(&priv->lock,flags);
#ifdef DEBUG_INTERRUPT
printk("INTERRUPT: end\n");
#endif
// return 0;
return NULL;
}
#endif //NETLINK
//---------------------------------------------------------------------------
// Called by ifconfig when the device is activated by ifconfig // Called by ifconfig when the device is activated by ifconfig
int nas_open(struct net_device *dev) int nas_open(struct net_device *dev)
{ {
@@ -121,15 +87,6 @@ int nas_open(struct net_device *dev)
printk("OPEN: begin\n"); printk("OPEN: begin\n");
// MOD_INC_USE_COUNT; // MOD_INC_USE_COUNT;
// Address has already been set at init // Address has already been set at init
#ifndef PDCP_USE_NETLINK
if (pdcp_2_nas_irq==-EBUSY) {
printk("OPEN: irq failure\n");
return -EBUSY;
}
#endif //PDCP_USE_NETLINK
/* /*
netif_start_queue(dev); netif_start_queue(dev);
// //
@@ -449,16 +406,6 @@ int init_module (void)
printk("Starting NASMESH, number of IMEI paramters %d, IMEI %X%X\n",m_arg,nas_IMEI[0],nas_IMEI[1]); printk("Starting NASMESH, number of IMEI paramters %d, IMEI %X%X\n",m_arg,nas_IMEI[0],nas_IMEI[1]);
#ifndef PDCP_USE_NETLINK
if (pdcp_2_nas_irq == -EBUSY || pdcp_2_nas_irq == -EINVAL) {
printk("[NAS][INIT] No interrupt resource available\n");
return -EBUSY;
} else
printk("[NAS][INIT]: Interrupt %d\n", pdcp_2_nas_irq);
#endif //NETLINK
for (inst=0; inst<NB_INSTANCES_MAX; inst++) { for (inst=0; inst<NB_INSTANCES_MAX; inst++) {
printk("[NAS][INIT] nasmesh_init_module: begin init instance %d\n",inst); printk("[NAS][INIT] nasmesh_init_module: begin init instance %d\n",inst);
@@ -493,15 +440,11 @@ int init_module (void)
} }
} }
#ifdef PDCP_USE_NETLINK
if ((err=nas_netlink_init()) == -1) if ((err=nas_netlink_init()) == -1)
printk("[NAS][INIT] NETLINK failed\n"); printk("[NAS][INIT] NETLINK failed\n");
printk("[NAS][INIT] NETLINK INIT\n"); printk("[NAS][INIT] NETLINK INIT\n");
#endif //NETLINK
return err; return err;
} }
@@ -516,22 +459,6 @@ void cleanup_module(void)
printk("[NAS][CLEANUP]nasmesh_cleanup_module: begin\n"); printk("[NAS][CLEANUP]nasmesh_cleanup_module: begin\n");
#ifndef PDCP_USE_NETLINK
if (pdcp_2_nas_irq!=-EBUSY) {
pdcp_2_nas_irq=0;
// Start IRQ linux
// free_irq(priv->irq, NULL);
// End IRQ linux
}
#else // NETLINK
#endif //NETLINK
for (inst=0; inst<NB_INSTANCES_MAX; inst++) { for (inst=0; inst<NB_INSTANCES_MAX; inst++) {
#ifdef DEBUG_DEVICE #ifdef DEBUG_DEVICE
printk("nasmesh_cleanup_module: unregister and free net device instance %d\n",inst); printk("nasmesh_cleanup_module: unregister and free net device instance %d\n",inst);
@@ -541,9 +468,7 @@ void cleanup_module(void)
free_netdev(nasdev[inst]); free_netdev(nasdev[inst]);
} }
#ifdef PDCP_USE_NETLINK
nas_netlink_release(); nas_netlink_release();
#endif //PDCP_USE_NETLINK
printk("nasmesh_cleanup_module: end\n"); printk("nasmesh_cleanup_module: end\n");
} }
-6
View File
@@ -178,10 +178,4 @@ extern struct net_device *nasdev[NB_INSTANCES_MAX];
extern uint8_t NAS_NULL_IMEI[14]; extern uint8_t NAS_NULL_IMEI[14];
//global variables shared with RRC
#ifndef PDCP_USE_NETLINK
extern int pdcp_2_nas_irq;
#endif
#endif #endif
-52
View File
@@ -293,10 +293,6 @@ int nas_mesh_DC_send_cx_establish_request(struct cx_entity *cx,struct nas_priv *
nas_tool_print_buffer((char *)p,p->length); nas_tool_print_buffer((char *)p,p->length);
#endif #endif
++cx->retry; ++cx->retry;
#ifdef PDCP_USE_NETLINK
#else
// bytes_wrote = rtf_put(cx->sap[NAS_DC_INPUT_SAPI], p, p->length);
#endif
cx->countimer=gpriv->timer_establishment; cx->countimer=gpriv->timer_establishment;
if (bytes_wrote==p->length) { if (bytes_wrote==p->length) {
@@ -353,11 +349,6 @@ int nas_mesh_DC_send_cx_release_request(struct cx_entity *cx,
p->length = NAS_TL_SIZE + sizeof(struct NASConnReleaseReq); p->length = NAS_TL_SIZE + sizeof(struct NASConnReleaseReq);
p->nasUEDCPrimitive.conn_release_req.localConnectionRef = cx->lcr; p->nasUEDCPrimitive.conn_release_req.localConnectionRef = cx->lcr;
p->nasUEDCPrimitive.conn_release_req.releaseCause = NAS_CX_RELEASE_UNDEF_CAUSE; p->nasUEDCPrimitive.conn_release_req.releaseCause = NAS_CX_RELEASE_UNDEF_CAUSE;
#ifdef PDCP_USE_NETLINK
#else
// bytes_wrote = rtf_put(cx->sap[NAS_DC_INPUT_SAPI], p, p->length);
#endif
if (bytes_wrote==p->length) { if (bytes_wrote==p->length) {
cx->state=NAS_IDLE; cx->state=NAS_IDLE;
@@ -441,22 +432,12 @@ void nas_mesh_DC_send_sig_data_request(struct sk_buff *skb,
p->nasUEDCPrimitive.data_transfer_req.localConnectionRef = cx->lcr; p->nasUEDCPrimitive.data_transfer_req.localConnectionRef = cx->lcr;
p->nasUEDCPrimitive.data_transfer_req.priority = 3; // TBD p->nasUEDCPrimitive.data_transfer_req.priority = 3; // TBD
p->nasUEDCPrimitive.data_transfer_req.nasDataLength = (skb->len)+1; //adds category character p->nasUEDCPrimitive.data_transfer_req.nasDataLength = (skb->len)+1; //adds category character
#ifdef PDCP_USE_NETLINK
#else
// bytes_wrote = rtf_put(cx->sap[NAS_DC_INPUT_SAPI], p, p->length);
#endif
if (bytes_wrote!=p->length) { if (bytes_wrote!=p->length) {
printk("NAS_MESH_DC_SEND_SIG: Header sent failure in DC-FIFO\n"); printk("NAS_MESH_DC_SEND_SIG: Header sent failure in DC-FIFO\n");
return; return;
} }
#ifdef PDCP_USE_NETLINK
#else
// bytes_wrote += rtf_put(cx->sap[NAS_DC_INPUT_SAPI], &data_type, 1);
// bytes_wrote += rtf_put(cx->sap[NAS_DC_INPUT_SAPI], skb->data, skb->len);
#endif
if (bytes_wrote != p->length + skb->len + 1) { if (bytes_wrote != p->length + skb->len + 1) {
printk("NAS_MESH_DC_SEND_SIG: Data sent failure in DC-FIFO\n"); printk("NAS_MESH_DC_SEND_SIG: Data sent failure in DC-FIFO\n");
return; return;
@@ -511,22 +492,12 @@ void nas_mesh_DC_send_peer_sig_data_request(struct cx_entity *cx, uint8_t sig_ca
p->nasUEDCPrimitive.data_transfer_req.localConnectionRef = cx->lcr; p->nasUEDCPrimitive.data_transfer_req.localConnectionRef = cx->lcr;
p->nasUEDCPrimitive.data_transfer_req.priority = 3; // TBD p->nasUEDCPrimitive.data_transfer_req.priority = 3; // TBD
p->nasUEDCPrimitive.data_transfer_req.nasDataLength = (nas_length)+1; //adds category character p->nasUEDCPrimitive.data_transfer_req.nasDataLength = (nas_length)+1; //adds category character
#ifdef PDCP_USE_NETLINK
#else
// bytes_wrote = rtf_put(cx->sap[NAS_DC_INPUT_SAPI], p, p->length);
#endif
if (bytes_wrote!=p->length) { if (bytes_wrote!=p->length) {
printk("NAS_MESH_DC_PEER_SEND_SIG: Header sent failure in DC-FIFO\n"); printk("NAS_MESH_DC_PEER_SEND_SIG: Header sent failure in DC-FIFO\n");
return; return;
} }
#ifdef PDCP_USE_NETLINK
#else
// bytes_wrote += rtf_put(cx->sap[NAS_DC_INPUT_SAPI], &data_type, 1);
// bytes_wrote += rtf_put(cx->sap[NAS_DC_INPUT_SAPI], (char *)nas_data, nas_length);
#endif
if (bytes_wrote != p->length + nas_length + 1) { if (bytes_wrote != p->length + nas_length + 1) {
printk("NAS_MESH_DC_PEER_SEND_SIG: Data sent failure in DC-FIFO\n"); printk("NAS_MESH_DC_PEER_SEND_SIG: Data sent failure in DC-FIFO\n");
return; return;
@@ -665,9 +636,6 @@ void nas_mesh_DC_decode_sig_data_ind(struct cx_entity *cx, struct nas_ue_dc_elem
} }
// End debug information // End debug information
#ifndef PDCP_USE_NETLINK
// nas_COMMON_receive(p->length, p->nasUEDCPrimitive.data_transfer_ind.nasDataLength, cx->sap[NAS_DC_OUTPUT_SAPI]);
#endif
#ifdef NAS_DEBUG_DC #ifdef NAS_DEBUG_DC
printk("NAS_MESH_DC_RECEIVE: DATA_TRANSFER_IND reception\n"); printk("NAS_MESH_DC_RECEIVE: DATA_TRANSFER_IND reception\n");
printk(" Local Connection reference %u\n",p->nasUEDCPrimitive.data_transfer_ind.localConnectionRef); printk(" Local Connection reference %u\n",p->nasUEDCPrimitive.data_transfer_ind.localConnectionRef);
@@ -842,20 +810,12 @@ int nas_mesh_DC_receive(struct cx_entity *cx,struct nas_priv *gpriv)
} }
// End debug information // End debug information
#ifdef PDCP_USE_NETLINK
#else
// bytes_read = rtf_get(cx->sap[NAS_DC_OUTPUT_SAPI] , gpriv->rbuffer, NAS_TL_SIZE);
#endif
if (bytes_read>0) { if (bytes_read>0) {
struct nas_ue_dc_element *p; struct nas_ue_dc_element *p;
p= (struct nas_ue_dc_element *)(gpriv->rbuffer); p= (struct nas_ue_dc_element *)(gpriv->rbuffer);
//get the rest of the primitive //get the rest of the primitive
#ifdef PDCP_USE_NETLINK
#else
// bytes_read += rtf_get(cx->sap[NAS_DC_OUTPUT_SAPI], (uint8_t *)p+NAS_TL_SIZE, p->length-NAS_TL_SIZE);
#endif
if (bytes_read!=p->length) { if (bytes_read!=p->length) {
printk("NAS_MESH_DC_RECEIVE: Problem while reading primitive header\n"); printk("NAS_MESH_DC_RECEIVE: Problem while reading primitive header\n");
@@ -982,19 +942,11 @@ int nas_mesh_GC_receive(struct nas_priv *gpriv)
#ifdef NAS_DEBUG_GC #ifdef NAS_DEBUG_GC
printk("NAS_MESH_GC_RECEIVE - begin \n"); printk("NAS_MESH_GC_RECEIVE - begin \n");
#endif #endif
#ifdef PDCP_USE_NETLINK
#else
// bytes_read = rtf_get(gpriv->sap[NAS_GC_SAPI], gpriv->rbuffer, NAS_TL_SIZE);
#endif
if (bytes_read>0) { if (bytes_read>0) {
struct nas_ue_gc_element *p; struct nas_ue_gc_element *p;
p= (struct nas_ue_gc_element *)(gpriv->rbuffer); p= (struct nas_ue_gc_element *)(gpriv->rbuffer);
//get the rest of the primitive //get the rest of the primitive
#ifdef PDCP_USE_NETLINK
#else
// bytes_read += rtf_get(gpriv->sap[NAS_GC_SAPI], (uint8_t *)p+NAS_TL_SIZE, p->length-NAS_TL_SIZE);
#endif
if (bytes_read!=p->length) { if (bytes_read!=p->length) {
printk("NAS_MESH_GC_RECEIVE: Problem while reading primitive's header\n"); printk("NAS_MESH_GC_RECEIVE: Problem while reading primitive's header\n");
@@ -1004,10 +956,6 @@ int nas_mesh_GC_receive(struct nas_priv *gpriv)
// start decoding message // start decoding message
switch (p->type) { switch (p->type) {
case INFO_BROADCAST_IND : case INFO_BROADCAST_IND :
#ifdef PDCP_USE_NETLINK
#else
// bytes_read += rtf_get(gpriv->sap[NAS_GC_SAPI], (uint8_t *)p+p->length, p->nasUEGCPrimitive.broadcast_ind.nasDataLength);
#endif
if (bytes_read!=p->length+p->nasUEGCPrimitive.broadcast_ind.nasDataLength) { if (bytes_read!=p->length+p->nasUEGCPrimitive.broadcast_ind.nasDataLength) {
printk("NAS_MESH_GC_RECEIVE: INFO_BROADCAST_IND reception, Problem while reading primitive's data\n"); printk("NAS_MESH_GC_RECEIVE: INFO_BROADCAST_IND reception, Problem while reading primitive's data\n");
return bytes_read; return bytes_read;
@@ -110,14 +110,6 @@ void nas_COMMON_del_send(struct sk_buff *skb,
struct cx_entity *cx, struct cx_entity *cx,
struct classifier_entity *gc,int inst, struct nas_priv *gpriv); struct classifier_entity *gc,int inst, struct nas_priv *gpriv);
#ifndef PDCP_USE_NETLINK
/**
\fn void nas_COMMON_QOS_receive()
\brief Retrieve PDU from PDCP for connection
*/
void nas_COMMON_QOS_receive(void);
#endif //PDCP_USE_NETLINK
/** /**
\fn struct rb_entity *nas_COMMON_add_rb(struct cx_entity *cx, nasRadioBearerId_t rabi, nasQoSTrafficClass_t qos) \fn struct rb_entity *nas_COMMON_add_rb(struct cx_entity *cx, nasRadioBearerId_t rabi, nasQoSTrafficClass_t qos)
\brief Add a radio-bearer descriptor \brief Add a radio-bearer descriptor
@@ -168,7 +160,6 @@ struct classifier_entity
*/ */
void nas_COMMON_flush_rb(struct cx_entity *cx); void nas_COMMON_flush_rb(struct cx_entity *cx);
#ifdef PDCP_USE_NETLINK
/** /**
\fn int nas_netlink_send(unsigned char *data,unsigned int len) \fn int nas_netlink_send(unsigned char *data,unsigned int len)
\brief Request the transfer of data by PDCP via netlink socket \brief Request the transfer of data by PDCP via netlink socket
@@ -185,7 +176,6 @@ int nas_netlink_send(unsigned char *data,unsigned int len);
*/ */
void nas_COMMON_QOS_receive(struct nlmsghdr *nlh); void nas_COMMON_QOS_receive(struct nlmsghdr *nlh);
#endif //PDCP_USE_NETLINK
//nasmesh.c //nasmesh.c
/** /**
@@ -305,13 +295,10 @@ void nas_tool_print_buffer(char * buffer,int length);
void nas_print_rb_entity(struct rb_entity *rb); void nas_print_rb_entity(struct rb_entity *rb);
void nas_print_classifier(struct classifier_entity *gc); void nas_print_classifier(struct classifier_entity *gc);
#ifdef PDCP_USE_NETLINK
// nas_netlink.c // nas_netlink.c
void nas_netlink_release(void); void nas_netlink_release(void);
int nas_netlink_init(void); int nas_netlink_init(void);
#endif
/** @} */ /** @} */
#endif #endif
-29
View File
@@ -97,35 +97,6 @@ rrc_init_global_param(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
//#ifdef USER_MODE
// Rrc_xface = (RRC_XFACE*)malloc16(sizeof(RRC_XFACE));
//#endif //USRE_MODE
// Rrc_xface->openair_rrc_top_init = openair_rrc_top_init;
// Rrc_xface->openair_rrc_eNB_init = openair_rrc_eNB_init;
// Rrc_xface->openair_rrc_UE_init = openair_rrc_ue_init;
// Rrc_xface->mac_rrc_data_ind = mac_rrc_data_ind;
//Rrc_xface->mac_rrc_data_req = mac_rrc_data_req;
// Rrc_xface->rrc_data_indP = (void *)rlcrrc_data_ind;
// Rrc_xface->rrc_rx_tx = rrc_rx_tx;
// Rrc_xface->mac_rrc_meas_ind = mac_rrc_meas_ind;
// Rrc_xface->get_rrc_status = get_rrc_status;
//Rrc_xface->rrc_get_status = ...
// Mac_rlc_xface->mac_out_of_sync_ind=mac_out_of_sync_ind;
#ifndef NO_RRM
// Rrc_xface->fn_rrc=fn_rrc;
#endif
// LOG_D(RRC, "[RRC]INIT_GLOBAL_PARAM: Mac_rlc_xface %p, rrc_rlc_register %p,rlcrrc_data_ind%p\n",Mac_rlc_xface,Mac_rlc_xface->rrc_rlc_register_rrc,rlcrrc_data_ind);
/*
if((Mac_rlc_xface==NULL) || (Mac_rlc_xface->rrc_rlc_register_rrc==NULL) ||
(rlcrrc_data_ind==NULL)) {
LOG_E(RRC,"Data structured is not initialized \n");
return -1;
}
*/
rrc_rlc_register_rrc (rrc_data_ind, NULL); //register with rlc rrc_rlc_register_rrc (rrc_data_ind, NULL); //register with rlc
DCCH_LCHAN_DESC.transport_block_size = 4; DCCH_LCHAN_DESC.transport_block_size = 4;
@@ -28,7 +28,6 @@
* \email: raymond.knopp@eurecom.fr ,navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it * \email: raymond.knopp@eurecom.fr ,navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it
*/ */
#ifdef USER_MODE
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdlib.h> /* for atoi(3) */ #include <stdlib.h> /* for atoi(3) */
@@ -36,9 +35,6 @@
#include <string.h> /* for strerror(3) */ #include <string.h> /* for strerror(3) */
#include <sysexits.h> /* for EX_* exit codes */ #include <sysexits.h> /* for EX_* exit codes */
#include <errno.h> /* for errno */ #include <errno.h> /* for errno */
#else
#include <linux/module.h> /* Needed by all modules */
#endif
#include <asn_application.h> #include <asn_application.h>
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */ #include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
-522
View File
@@ -1,522 +0,0 @@
diff -cB /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/asn_codecs_prim.c patch_dir/asn_codecs_prim.c
*** /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/asn_codecs_prim.c 2011-03-31 10:22:56.000000000 +0200
--- patch_dir/asn_codecs_prim.c 2011-05-31 10:28:26.000000000 +0200
***************
*** 4,10 ****
*/
#include <asn_internal.h>
#include <asn_codecs_prim.h>
- #include <errno.h>
/*
* Decode an always-primitive type.
--- 4,9 ----
diff -cB /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/asn_internal.h patch_dir/asn_internal.h
*** /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/asn_internal.h 2011-03-31 10:22:57.000000000 +0200
--- patch_dir/asn_internal.h 2011-05-31 10:28:26.000000000 +0200
***************
*** 10,20 ****
--- 10,31 ----
#define _ASN_INTERNAL_H_
#include "asn_application.h" /* Application-visible API */
+ #ifndef USER_MODE
+ #include <rtai.h>
+ #include <rtai_malloc.h>
+ #include "rtai_mem.h"
+ #endif
#ifndef __NO_ASSERT_H__ /* Include assert.h only for internal use. */
#include <assert.h> /* for assert() macro */
#endif
+ #ifndef USER_MODE
+ #ifndef assert
+ #define assert(expr) ((expr) ? (void) 0 : printk("Assertion failed in %s:%d\n", __FILE__, __LINE__))
+ #endif
+ #endif
+
#ifdef __cplusplus
extern "C" {
#endif
***************
*** 23,32 ****
--- 34,51 ----
#define ASN1C_ENVIRONMENT_VERSION 922 /* Compile-time version */
int get_asn1c_environment_version(void); /* Run-time version */
+ #ifdef USER_MODE
#define CALLOC(nmemb, size) calloc(nmemb, size)
#define MALLOC(size) malloc(size)
#define REALLOC(oldptr, size) realloc(oldptr, size)
#define FREEMEM(ptr) free(ptr)
+ #else
+ #define CALLOC(nmemb, size) rt_calloc(nmemb,size)
+ #define MALLOC(size) rt_malloc(size)
+ #define REALLOC(oldptr, size) rt_realloc(oldptr, size)
+ #define FREEMEM(ptr) rt_free(ptr);
+ #endif
+
/*
* A macro for debugging the ASN.1 internals.
***************
*** 38,45 ****
#ifdef ASN_THREAD_SAFE
#define asn_debug_indent 0
#else /* !ASN_THREAD_SAFE */
! int asn_debug_indent;
#endif /* ASN_THREAD_SAFE */
#define ASN_DEBUG(fmt, args...) do { \
int adi = asn_debug_indent; \
while(adi--) fprintf(stderr, " "); \
--- 57,65 ----
#ifdef ASN_THREAD_SAFE
#define asn_debug_indent 0
#else /* !ASN_THREAD_SAFE */
! extern int asn_debug_indent;
#endif /* ASN_THREAD_SAFE */
+ #ifdef USER_MODE
#define ASN_DEBUG(fmt, args...) do { \
int adi = asn_debug_indent; \
while(adi--) fprintf(stderr, " "); \
***************
*** 47,52 ****
--- 67,81 ----
fprintf(stderr, " (%s:%d)\n", \
__FILE__, __LINE__); \
} while(0)
+ #else
+ #define ASN_DEBUG(fmt, args...) do { \
+ int adi = asn_debug_indent; \
+ while(adi--) printk(" "); \
+ printk(fmt, ##args); \
+ printk(" (%s:%d)\n", \
+ __FILE__, __LINE__); \
+ } while(0)
+ #endif
#else /* !__GNUC__ */
void ASN_DEBUG_f(const char *fmt, ...);
#define ASN_DEBUG ASN_DEBUG_f
diff -cB /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/asn_SET_OF.c patch_dir/asn_SET_OF.c
*** /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/asn_SET_OF.c 2011-03-31 10:22:56.000000000 +0200
--- patch_dir/asn_SET_OF.c 2011-05-31 10:28:26.000000000 +0200
***************
*** 4,10 ****
*/
#include <asn_internal.h>
#include <asn_SET_OF.h>
- #include <errno.h>
/*
* Add another element into the set.
--- 4,9 ----
***************
*** 21,26 ****
--- 20,27 ----
/*
* Make sure there's enough space to insert an element.
*/
+ ASN_DEBUG("SET ADD: count %d, size %d",as->count,as->size);
+
if(as->count == as->size) {
int _newsize = as->size ? (as->size << 1) : 4;
void *_new_arr;
diff -cB /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/asn_system.h patch_dir/asn_system.h
*** /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/asn_system.h 2011-03-31 10:22:57.000000000 +0200
--- patch_dir/asn_system.h 2011-05-31 10:28:26.000000000 +0200
***************
*** 13,25 ****
#include "config.h"
#endif
! #include <stdio.h> /* For snprintf(3) */
! #include <stdlib.h> /* For *alloc(3) */
! #include <string.h> /* For memcpy(3) */
! #include <sys/types.h> /* For size_t */
! #include <limits.h> /* For LONG_MAX */
! #include <stdarg.h> /* For va_start */
! #include <stddef.h> /* for offsetof and ptrdiff_t */
#ifdef WIN32
--- 13,39 ----
#include "config.h"
#endif
! #ifdef USER_MODE
! #include <stdio.h> // For snprintf(3)
! #include <stdlib.h> // For *alloc(3)
! #include <string.h> // For memcpy(3)
! #include <sys/types.h> // For size_t
! #include <limits.h> // For LONG_MAX
! #include <stdarg.h> // For va_start
! #include <stddef.h> // for offsetof and ptrdiff_t
! #include <errno.h> // For errno
! #else
! typedef char FILE;
! #include <linux/types.h>
! #include <linux/slab.h> // For snprintf
! #include <linux/sort.h> // For sort
! #define qsort(base,num,size,cmp_func) sort(base,num,size,cmp_func,NULL)
! #include <linux/errno.h>// For errno
! #ifndef errno
! extern int errno;
! #endif
! #include "bsearch.h"
! #endif
#ifdef WIN32
***************
*** 63,69 ****
#include <types/vxTypes.h>
#else /* !defined(__vxworks) */
! #include <inttypes.h> /* C99 specifies this file */
/*
* 1. Earlier FreeBSD version didn't have <stdint.h>,
* but <inttypes.h> was present.
--- 77,85 ----
#include <types/vxTypes.h>
#else /* !defined(__vxworks) */
! #ifdef USER_MODE
! #include <inttypes.h> /*C99 specifies this file */
! #endif
/*
* 1. Earlier FreeBSD version didn't have <stdint.h>,
* but <inttypes.h> was present.
***************
*** 81,91 ****
#define inline
#endif /* __GNUC__ */
#else
! #include <stdint.h> /* SUSv2+ and C99 specify this file, for uintXX_t */
#endif /* defined(sun) */
#endif
! #include <netinet/in.h> /* for ntohl() */
#define sys_ntohl(foo) ntohl(foo)
#endif /* defined(__vxworks) */
--- 97,109 ----
#define inline
#endif /* __GNUC__ */
#else
! #ifdef USER_MODE
! #include <stdint.h> /*SUSv2+ and C99 specify this file, for uintXX_t */
! #endif
#endif /* defined(sun) */
#endif
! /*#include <netinet/in.h> for ntohl() */
#define sys_ntohl(foo) ntohl(foo)
#endif /* defined(__vxworks) */
diff -cB /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/ber_tlv_tag.c patch_dir/ber_tlv_tag.c
*** /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/ber_tlv_tag.c 2011-03-31 10:22:56.000000000 +0200
--- patch_dir/ber_tlv_tag.c 2011-05-31 10:28:26.000000000 +0200
***************
*** 4,10 ****
*/
#include <asn_internal.h>
#include <ber_tlv_tag.h>
- #include <errno.h>
ssize_t
ber_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) {
--- 4,9 ----
***************
*** 57,63 ****
return 0; /* Want more */
}
!
ssize_t
ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *f) {
char buf[sizeof("[APPLICATION ]") + 32];
--- 56,62 ----
return 0; /* Want more */
}
! #ifdef USER_MODE
ssize_t
ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *f) {
char buf[sizeof("[APPLICATION ]") + 32];
***************
*** 71,76 ****
--- 70,76 ----
return fwrite(buf, 1, ret, f);
}
+ #endif
ssize_t
ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t size) {
diff -cB /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/constraints.c patch_dir/constraints.c
*** /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/constraints.c 2011-03-31 10:22:57.000000000 +0200
--- patch_dir/constraints.c 2011-05-31 10:28:26.000000000 +0200
***************
*** 1,4 ****
! #include "asn_internal.h"
#include "constraints.h"
int
--- 1,4 ----
! #include <asn_internal.h>
#include "constraints.h"
int
diff -cB /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/constr_TYPE.c patch_dir/constr_TYPE.c
*** /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/constr_TYPE.c 2011-03-31 10:22:56.000000000 +0200
--- patch_dir/constr_TYPE.c 2011-05-31 10:28:26.000000000 +0200
***************
*** 4,10 ****
*/
#include <asn_internal.h>
#include <constr_TYPE.h>
- #include <errno.h>
/*
* Version of the ASN.1 infrastructure shipped with compiler.
--- 4,9 ----
***************
*** 29,34 ****
--- 28,34 ----
return type_descriptor->outmost_tag(type_descriptor, struct_ptr, 0, 0);
}
+ #ifdef USER_MODE
/*
* Print the target language's structure in human readable form.
*/
***************
*** 75,77 ****
--- 75,78 ----
fprintf(stderr, "\n");
va_end(ap);
}
+ #endif
diff -cB /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/der_encoder.c patch_dir/der_encoder.c
*** /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/der_encoder.c 2011-03-31 10:22:56.000000000 +0200
--- patch_dir/der_encoder.c 2011-05-31 10:28:26.000000000 +0200
***************
*** 3,9 ****
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
- #include <errno.h>
static ssize_t der_write_TL(ber_tlv_tag_t tag, ber_tlv_len_t len,
asn_app_consume_bytes_f *cb, void *app_key, int constructed);
--- 3,8 ----
***************
*** 81,89 ****
--- 80,90 ----
asn_app_consume_bytes_f *cb,
void *app_key) {
ber_tlv_tag_t *tags; /* Copy of tags stream */
+ ber_tlv_tag_t tags_array[8];
int tags_count; /* Number of tags */
size_t overall_length;
ssize_t *lens;
+ ssize_t lens_array[8];
int i;
ASN_DEBUG("Writing tags (%s, tm=%d, tc=%d, tag=%s, mtc=%d)",
***************
*** 102,111 ****
* and initialize it appropriately.
*/
int stag_offset;
! tags = (ber_tlv_tag_t *)alloca((sd->tags_count + 1) * sizeof(ber_tlv_tag_t));
if(!tags) { /* Can fail on !x86 */
! errno = ENOMEM;
! return -1;
}
tags_count = sd->tags_count
+ 1 /* EXPLICIT or IMPLICIT tag is given */
--- 103,121 ----
* and initialize it appropriately.
*/
int stag_offset;
! //tags = (ber_tlv_tag_t *)alloca((sd->tags_count + 1) * sizeof(ber_tlv_tag_t));
! tags = &(tags_array[0]);
! if ((sd->tags_count + 1)>=8) {
! #ifdef USER_MODE
! printf("der_encoder.c: ERROR tags array too small. Increase size!\n");
! exit(-1);
! #endif
! errno = ENOMEM;
! return -1;
! }
if(!tags) { /* Can fail on !x86 */
! errno = ENOMEM;
! return -1;
}
tags_count = sd->tags_count
+ 1 /* EXPLICIT or IMPLICIT tag is given */
***************
*** 124,135 ****
if(tags_count == 0)
return 0;
! lens = (ssize_t *)alloca(tags_count * sizeof(lens[0]));
if(!lens) {
! errno = ENOMEM;
! return -1;
}
!
/*
* Array of tags is initialized.
* Now, compute the size of the TLV pairs, from right to left.
--- 134,154 ----
if(tags_count == 0)
return 0;
! //lens = (ssize_t *)alloca(tags_count * sizeof(lens[0]));
! lens = &(lens_array[0]);
! if (tags_count>=8) {
! #ifdef USER_MODE
! printf("der_encoder.c: ERROR lens array too small. Increase size!\n");
! exit(-1);
! #endif
! errno = ENOMEM;
! return -1;
! }
if(!lens) {
! errno = ENOMEM;
! return -1;
}
!
/*
* Array of tags is initialized.
* Now, compute the size of the TLV pairs, from right to left.
diff -cB /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/INTEGER.c patch_dir/INTEGER.c
*** /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/INTEGER.c 2011-03-31 10:22:56.000000000 +0200
--- patch_dir/INTEGER.c 2011-05-31 10:28:26.000000000 +0200
***************
*** 6,12 ****
#include <asn_internal.h>
#include <INTEGER.h>
#include <asn_codecs_prim.h> /* Encoder and decoder of a primitive type */
- #include <errno.h>
/*
* INTEGER basic type description.
--- 6,11 ----
***************
*** 103,109 ****
static ssize_t
INTEGER__dump(asn_TYPE_descriptor_t *td, const INTEGER_t *st, asn_app_consume_bytes_f *cb, void *app_key, int plainOrXER) {
asn_INTEGER_specifics_t *specs=(asn_INTEGER_specifics_t *)td->specifics;
! char scratch[32]; /* Enough for 64-bit integer */
uint8_t *buf = st->buf;
uint8_t *buf_end = st->buf + st->size;
signed long accum;
--- 102,108 ----
static ssize_t
INTEGER__dump(asn_TYPE_descriptor_t *td, const INTEGER_t *st, asn_app_consume_bytes_f *cb, void *app_key, int plainOrXER) {
asn_INTEGER_specifics_t *specs=(asn_INTEGER_specifics_t *)td->specifics;
! char scratch[128];
uint8_t *buf = st->buf;
uint8_t *buf_end = st->buf + st->size;
signed long accum;
***************
*** 142,149 ****
--- 141,152 ----
el = INTEGER_map_value2enum(specs, accum);
if(el) {
+ scrsize = sizeof(scratch);
+ scr = scratch;
+ /* cannot use alloca in kernel
scrsize = el->enum_len + 32;
scr = (char *)alloca(scrsize);
+ */
if(plainOrXER == 0)
ret = snprintf(scr, scrsize,
"%ld (%s)", accum, el->enum_name);
diff -cB /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/NativeEnumerated.c patch_dir/NativeEnumerated.c
*** /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/NativeEnumerated.c 2011-03-31 10:22:57.000000000 +0200
--- patch_dir/NativeEnumerated.c 2011-05-31 10:28:26.000000000 +0200
***************
*** 46,51 ****
--- 46,52 ----
asn_app_consume_bytes_f *cb, void *app_key) {
asn_INTEGER_specifics_t *specs=(asn_INTEGER_specifics_t *)td->specifics;
asn_enc_rval_t er;
+ char scratch[128];
const long *native = (const long *)sptr;
const asn_INTEGER_enum_map_t *el;
***************
*** 57,63 ****
el = INTEGER_map_value2enum(specs, *native);
if(el) {
size_t srcsize = el->enum_len + 5;
! char *src = (char *)alloca(srcsize);
er.encoded = snprintf(src, srcsize, "<%s/>", el->enum_name);
assert(er.encoded > 0 && (size_t)er.encoded < srcsize);
--- 58,64 ----
el = INTEGER_map_value2enum(specs, *native);
if(el) {
size_t srcsize = el->enum_len + 5;
! char *src = (char *)scratch; //alloca(srcsize);
er.encoded = snprintf(src, srcsize, "<%s/>", el->enum_name);
assert(er.encoded > 0 && (size_t)er.encoded < srcsize);
diff -cB /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/OCTET_STRING.c patch_dir/OCTET_STRING.c
*** /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/OCTET_STRING.c 2011-03-31 10:22:55.000000000 +0200
--- patch_dir/OCTET_STRING.c 2011-05-31 10:28:26.000000000 +0200
***************
*** 6,12 ****
#include <asn_internal.h>
#include <OCTET_STRING.h>
#include <BIT_STRING.h> /* for .bits_unused member */
- #include <errno.h>
/*
* OCTET STRING basic type description.
--- 6,11 ----
diff -cB /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/xer_encoder.c patch_dir/xer_encoder.c
*** /homes/kaltenbe/Devel/openair/openair_branches/openair_lte/openair2/RRC/LITE/MESSAGES/asn1c/asn1c/skeletons/xer_encoder.c 2011-04-11 18:03:26.000000000 +0200
--- patch_dir/xer_encoder.c 2011-05-31 10:28:26.000000000 +0200
***************
*** 3,10 ****
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
! #include <stdio.h>
! #include <errno.h>
/*
* The XER encoder of any type. May be invoked by the application.
--- 3,10 ----
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
! //#include <stdio.h>
! //#include <errno.h>
/*
* The XER encoder of any type. May be invoked by the application.
***************
*** 41,46 ****
--- 41,47 ----
* This is a helper function for xer_fprint, which directs all incoming data
* into the provided file descriptor.
*/
+ #ifdef USER_MODE
static int
xer__print2fp(const void *buffer, size_t size, void *app_key) {
FILE *stream = (FILE *)app_key;
***************
*** 65,67 ****
--- 66,69 ----
return fflush(stream);
}
+ #endif
-23
View File
@@ -422,15 +422,7 @@ char openair_rrc_ue_init( const module_id_t ue_mod_idP, const unsigned char eNB_
init_SI_UE(&ctxt,eNB_index); init_SI_UE(&ctxt,eNB_index);
LOG_D(RRC,PROTOCOL_RRC_CTXT_FMT" INIT: phy_sync_2_ch_ind\n", LOG_D(RRC,PROTOCOL_RRC_CTXT_FMT" INIT: phy_sync_2_ch_ind\n",
PROTOCOL_RRC_CTXT_ARGS(&ctxt)); PROTOCOL_RRC_CTXT_ARGS(&ctxt));
#ifndef NO_RRM
send_msg(&S_rrc,msg_rrc_phy_synch_to_CH_ind(ctxt.module_id,eNB_index,UE_rrc_inst[ctxt.module_id].Mac_id));
#endif
#ifndef NO_RRM
send_msg(&S_rrc,msg_rrc_phy_synch_to_CH_ind(ctxt.module_id,eNB_index,UE_rrc_inst[ctxt.module_id].Mac_id));
#endif
#ifdef NO_RRM //init ch SRB0, SRB1 & BDTCH
openair_rrc_on_ue(&ctxt); openair_rrc_on_ue(&ctxt);
#endif
return 0; return 0;
} }
@@ -2558,13 +2550,6 @@ rrc_ue_decode_dcch(
} }
} }
#ifndef NO_RRM
send_msg(&S_rrc,msg_rrc_end_scan_req(ctxt_pP->module_id,eNB_indexP));
#endif
if (0) //We're not done with underlying members of dl_dcch_msg (Use after free error when enabled)
{
SEQUENCE_free(&asn_DEF_LTE_DL_DCCH_Message, dl_dcch_msg, ASFM_FREE_EVERYTHING);
}
} }
const char siWindowLength[9][5] = {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","80ms","ERR"}; const char siWindowLength[9][5] = {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","80ms","ERR"};
@@ -2843,14 +2828,6 @@ int decode_BCCH_MBMS_DLSCH_Message(
break; break;
} }
}*/ }*/
/*if ((rrc_get_sub_state(ctxt_pP->module_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE)
#if defined(ENABLE_USE_MME)
&& (UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data != NULL)
#endif
) {
rrc_ue_generate_RRCConnectionRequest(ctxt_pP, 0);
rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_CONNECTING );
}*/
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_OUT ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_OUT );
return 0; return 0;
} }
-13
View File
@@ -173,13 +173,6 @@ extern pthread_mutex_t slrb_mutex;
//the thread function //the thread function
void *send_UE_status_notification(void *); void *send_UE_status_notification(void *);
//#include "COMMON/openair_defs.h"
#ifndef USER_MODE
//#include <rtai.h>
#endif
#include "LTE_SystemInformationBlockType1.h" #include "LTE_SystemInformationBlockType1.h"
#include "LTE_SystemInformation.h" #include "LTE_SystemInformation.h"
#include "LTE_RRCConnectionReconfiguration.h" #include "LTE_RRCConnectionReconfiguration.h"
@@ -217,12 +210,6 @@ void *send_UE_status_notification(void *);
#define NB_SIG_CNX_UE 2 //MAX_MANAGED_RG_PER_MOBILE #define NB_SIG_CNX_UE 2 //MAX_MANAGED_RG_PER_MOBILE
#define NB_CNX_UE 2//MAX_MANAGED_RG_PER_MOBILE #define NB_CNX_UE 2//MAX_MANAGED_RG_PER_MOBILE
#ifndef NO_RRM
#include "L3_rrc_interface.h"
#include "rrc_rrm_msg.h"
#include "rrc_rrm_interface.h"
#endif
#include "intertask_interface.h" #include "intertask_interface.h"
-8
View File
@@ -7303,9 +7303,6 @@ rrc_eNB_decode_ccch(
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
rrcConnectionReestablishmentRequest->ue_Identity.physCellId, rrcConnectionReestablishmentRequest->ue_Identity.physCellId,
ue_context_p->ue_context.reestablishment_cause); ue_context_p->ue_context.reestablishment_cause);
#ifndef NO_RRM
send_msg(&S_rrc, msg_rrc_MR_attach_ind(ctxt_pP->module_id, Mac_id));
#else
ue_context_p->ue_context.primaryCC_id = CC_id; ue_context_p->ue_context.primaryCC_id = CC_id;
//LG COMMENT Idx = (ue_mod_idP * NB_RB_MAX) + DCCH; //LG COMMENT Idx = (ue_mod_idP * NB_RB_MAX) + DCCH;
Idx = DCCH; Idx = DCCH;
@@ -7359,7 +7356,6 @@ rrc_eNB_decode_ccch(
); );
} }
#endif //NO_RRM
} }
break; break;
@@ -7548,9 +7544,6 @@ rrc_eNB_decode_ccch(
} }
} }
#ifndef NO_RRM
send_msg(&S_rrc, msg_rrc_MR_attach_ind(ctxt_pP->module_id, Mac_id));
#else
ue_context_p->ue_context.primaryCC_id = CC_id; ue_context_p->ue_context.primaryCC_id = CC_id;
//LG COMMENT Idx = (ue_mod_idP * NB_RB_MAX) + DCCH; //LG COMMENT Idx = (ue_mod_idP * NB_RB_MAX) + DCCH;
Idx = DCCH; Idx = DCCH;
@@ -7603,7 +7596,6 @@ rrc_eNB_decode_ccch(
); );
} }
#endif //NO_RRM
break; break;
default: default:
-277
View File
@@ -1,277 +0,0 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*!
*******************************************************************************
\file rrm_sock.c
\brief RRM (Radio Ressource Manager ) Socket: communication withe other medium:
- RRC ,
- CMM ,
- PUSU
\author BURLOT Pascal
\date 10/07/08
\par Historique:
P.BURLOT 2009-01-20
+ send a message via fifo:
- sending header
- and data if any
*******************************************************************************
*/
#ifndef RRC_RRM_FIFOS_XFACE
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
#else
#include<rtai_fifos.h>
#endif
#include "rrc_rrm_interface.h"
#include "defs.h"
//! \brief Taille maximale de la charge utile
#define SIZE_MAX_PAYLOAD 2048
//! \brief PID de l'espace utilisateur (Netlink mode)
//#define PID_USERSPACE 0xAA
#ifndef RRC_RRM_FIFOS_XFACE
/*!
*******************************************************************************
\brief This function opens a unix socket for the rrm communication
\return The return value is a socket handle
*/
int open_socket(
sock_rrm_t *s, ///< socket descriptor
char *path_local, ///< local socket path if unix socket
char *path_dest, ///< host Socket path if unix socket
int rrm_inst ///< instance of the rrm entity
) {
/* Unix socket */
int socket_fd ;
int len ;
if ((socket_fd = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) {
perror("unix socket");
return -1 ;
}
memset(&(s->un_local_addr), 0, sizeof(struct sockaddr_un));
s->un_local_addr.sun_family = AF_UNIX;
sprintf(s->un_local_addr.sun_path,"%s%d", path_local, rrm_inst );
unlink(s->un_local_addr.sun_path);
msg("local %s\n",s->un_local_addr.sun_path);
len = strlen((s->un_local_addr).sun_path) + sizeof((s->un_local_addr).sun_family);
if (bind(socket_fd, (struct sockaddr *)&(s->un_local_addr), len) == -1) {
perror("bind");
return -1 ;
}
memset(&(s->un_dest_addr), 0, sizeof(struct sockaddr_un));
s->un_dest_addr.sun_family = AF_UNIX;
sprintf(s->un_dest_addr.sun_path,"%s%d", path_dest, rrm_inst );
msg("Dest %s\n",s->un_dest_addr.sun_path);
s->s = socket_fd ;
return socket_fd ;
}
/*!
*******************************************************************************
\brief This function closes a RRM socket
\return none
*/
void close_socket(
sock_rrm_t *sock ///< the socket handle
) {
shutdown(sock->s, SHUT_RDWR);
close(sock->s);
}
/*!
*******************************************************************************
\brief This function send a buffer message to the unix socket
\return if OK then "0" is returned else "-1"
*/
char BUFF[2048];
int send_msg_sock(
sock_rrm_t *s, ///< socket descriptor
msg_t *smsg ///< the message to send
) {
/* Unix socket */
int ret = 0 ;
// char *buf = NULL;
struct msghdr msghd ;
struct iovec iov;
int taille = sizeof(msg_head_t) ;
if ( smsg == NULL ) {
return -1 ;
}
if ( smsg->data != NULL ) {
taille += smsg->head.size ;
}
//buf = RRM_MALLOC(char, taille);
//if (buf ==NULL)
//return -1 ;
memcpy( BUFF, &(smsg->head), sizeof(msg_head_t) ) ;
memcpy( BUFF+sizeof(msg_head_t), smsg->data, smsg->head.size ) ;
iov.iov_base = (void *)BUFF;
iov.iov_len = taille ;
msghd.msg_name = (void *)&(s->un_dest_addr);
msghd.msg_namelen = sizeof(s->un_dest_addr);
msghd.msg_iov = &iov;
msghd.msg_iovlen = 1;
msghd.msg_control = NULL ;
msghd.msg_controllen = 0 ;
if ( sendmsg(s->s, &msghd, 0) < 0 ) {
ret = -1;
msg("socket %d, dest %s\n",s->s,s->un_dest_addr.sun_path);
perror("sendmsg:unix socket");
}
//RRM_FREE(buf) ;
//RRM_FREE(msg->data) ;
//RRM_FREE(msg) ;
return ret ;
}
/*!
*******************************************************************************
\brief This function read a buffer from a unix socket
\return the function returns a message pointer. If the pointeur is NULL, a error
is happened.
*/
char *recv_msg(
sock_rrm_t *s ///< socket descriptor
) {
/* Unix socket */
char *buf = NULL;
char *smsg = NULL;
struct msghdr msghd ;
struct iovec iov;
int size_msg ;
msg_head_t *head ;
int ret ;
int taille = SIZE_MAX_PAYLOAD ;
buf = RRM_CALLOC( char,taille);
if ( buf == NULL ) {
return NULL ;
}
iov.iov_base = (void *)buf;
iov.iov_len = taille ;
msghd.msg_name = (void *)&(s->un_dest_addr);
msghd.msg_namelen = sizeof(s->un_dest_addr);
msghd.msg_iov = &iov;
msghd.msg_iovlen = 1;
msghd.msg_control = NULL ;
msghd.msg_controllen= 0 ;
ret = recvmsg(s->s, &msghd, 0 ) ;
if ( ret <= 0 ) {
// non-blocking socket
// perror("PB recvmsg_un");
RRM_FREE(buf);
return NULL ;
}
if (msghd.msg_flags != 0 ) {
fprintf(stderr,"error recvmsg_un: 0x%02x\n", msghd.msg_flags) ;
RRM_FREE(buf);
return NULL ;
}
head = (msg_head_t *) buf ;
size_msg = sizeof(msg_head_t) + head->size ;
smsg = RRM_CALLOC(char, size_msg ) ;
if ( smsg != NULL ) {
memcpy( smsg, buf, size_msg ) ;
}
RRM_FREE( buf ) ;
return smsg ;
}
#else //XFACE
int send_msg_fifo(int *s, msg_t *fmsg) {
int ret = 0, ret1;
int taille = sizeof(msg_head_t) ;
msg("write on fifos %d, msg %p\n",*s,fmsg);
if ( fmsg == NULL ) {
return -1 ;
}
// envoi le header
ret1 = rtf_put (*s,(char *) &(fmsg->head), taille);
if(ret1 <0) {
msg("rtf_put H ERR %d\n",ret1);
rtf_reset(*s);
return ret1;
}
ret=ret1;
// envoi les datas si elles sont definis
if ( fmsg->data != NULL ) {
ret1 += rtf_put (*s,(char *) fmsg->data, fmsg->head.size);
if(ret1 <0) {
msg("rtf_put D ERR %d\n",ret1);
rtf_reset(*s);
return ret1;
}
}
ret+=ret1;
return ret;
}
#endif //XFACE
int send_msg(void *s, msg_t *smsg) {
send_msg_sock((sock_rrm_t *)s, smsg);
}
-12
View File
@@ -135,18 +135,6 @@
#include "common/ran_context.h" #include "common/ran_context.h"
//#include "PHY/defs.h"
/*#ifndef USER_MODE
#define msg printk
#ifndef errno
int errno;
#endif
#else
# if !defined (msg)
# define msg printf
# endif
#endif*/
//#define XER_PRINT //#define XER_PRINT
typedef struct xer_sprint_string_s { typedef struct xer_sprint_string_s {
-51
View File
@@ -3277,57 +3277,6 @@ void *rrc_gnb_task(void *args_p) {
case GTPV1U_GNB_DELETE_TUNNEL_RESP: case GTPV1U_GNB_DELETE_TUNNEL_RESP:
break; break;
/*
#if defined(ENABLE_USE_MME)
// Messages from S1AP
case S1AP_DOWNLINK_NAS:
rrc_eNB_process_S1AP_DOWNLINK_NAS(msg_p, msg_name_p, instance, &rrc_gNB_mui);
break;
case S1AP_INITIAL_CONTEXT_SETUP_REQ:
rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p, msg_name_p, instance);
break;
case S1AP_UE_CTXT_MODIFICATION_REQ:
rrc_eNB_process_S1AP_UE_CTXT_MODIFICATION_REQ(msg_p, msg_name_p, instance);
break;
case S1AP_PAGING_IND:
LOG_D(RRC, "[eNB %d] Received Paging message from S1AP: %s\n", instance, msg_name_p);
rrc_eNB_process_PAGING_IND(msg_p, msg_name_p, instance);
break;
case S1AP_E_RAB_SETUP_REQ:
rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(msg_p, msg_name_p, instance);
LOG_D(RRC, "[eNB %d] Received the message %s\n", instance, msg_name_p);
break;
case S1AP_E_RAB_MODIFY_REQ:
rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(msg_p, msg_name_p, instance);
break;
case S1AP_E_RAB_RELEASE_COMMAND:
rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(msg_p, msg_name_p, instance);
break;
case S1AP_UE_CONTEXT_RELEASE_REQ:
rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_REQ(msg_p, msg_name_p, instance);
break;
case S1AP_UE_CONTEXT_RELEASE_COMMAND:
rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND(msg_p, msg_name_p, instance);
break;
case GTPV1U_ENB_DELETE_TUNNEL_RESP:
///Nothing to do. Apparently everything is done in S1AP processing
//LOG_I(RRC, "[eNB %d] Received message %s, not processed because procedure not synched\n",
//instance, msg_name_p);
AssertFatal(false, "Removed double mechanism for same feature: now delete_tunnel() function should be called\n");
break;
#endif
*/
/* Messages from gNB app */ /* Messages from gNB app */
case NRRRC_CONFIGURATION_REQ: case NRRRC_CONFIGURATION_REQ:
LOG_I(NR_RRC, "[gNB %ld] Received %s : %p\n", instance, msg_name_p,&NRRRC_CONFIGURATION_REQ(msg_p)); LOG_I(NR_RRC, "[gNB %ld] Received %s : %p\n", instance, msg_name_p,&NRRRC_CONFIGURATION_REQ(msg_p));

Some files were not shown because too many files have changed in this diff Show More