Commit 38aec139 authored by Raphael Defosseux's avatar Raphael Defosseux

doc(oran-integration): updating the ORAN FHI Library support documentation

 * Proper version(s) of DPDK
 * Support for both Bronze and E releases
 * Minor fixes on E-patches and build system
Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent aa215b76
...@@ -246,7 +246,7 @@ function main() { ...@@ -246,7 +246,7 @@ function main() {
RU=1 RU=1
TARGET_LIST="$TARGET_LIST oairu" TARGET_LIST="$TARGET_LIST oairu"
echo_info "Will compile RRU" echo_info "Will compile RRU"
shift;; shift;;
--UE) --UE)
UE=1 UE=1
TARGET_LIST="$TARGET_LIST lte-uesoftmodem" TARGET_LIST="$TARGET_LIST lte-uesoftmodem"
...@@ -300,14 +300,13 @@ function main() { ...@@ -300,14 +300,13 @@ function main() {
TARGET_LIST="$TARGET_LIST oai_eth_transpro" TARGET_LIST="$TARGET_LIST oai_eth_transpro"
CMAKE_CMD="$CMAKE_CMD -DOAI_${2^^}=ON" # ^^ makes uppercase CMAKE_CMD="$CMAKE_CMD -DOAI_${2^^}=ON" # ^^ makes uppercase
;; ;;
"benetel4g" | "benetel5g" | "oran_fhlib_5g" | "oran_fhlib_4g") "benetel4g" | "benetel5g" | "oran_fhlib_4g")
TARGET_LIST="$TARGET_LIST $2" TARGET_LIST="$TARGET_LIST $2"
CMAKE_CMD="$CMAKE_CMD -DOAI_${2^^}=ON" # ^^ makes uppercase CMAKE_CMD="$CMAKE_CMD -DOAI_${2^^}=ON" # ^^ makes uppercase
;; ;;
"oran_fhlib_5g") "oran_fhlib_5g")
TARGET_LIST="$TARGET_LIST $2" TARGET_LIST="$TARGET_LIST $2"
CMAKE_CMD="$CMAKE_CMD -DOAI_${2^^}=ON" ;;
;;
"None") "None")
;; ;;
*) *)
...@@ -388,7 +387,7 @@ function main() { ...@@ -388,7 +387,7 @@ function main() {
echo_info "Enabling build of optional shared library $lib" echo_info "Enabling build of optional shared library $lib"
done done
fi fi
shift 2;; shift 2;;
--noavx512) --noavx512)
CMAKE_CMD="$CMAKE_CMD -DAVX512=OFF" CMAKE_CMD="$CMAKE_CMD -DAVX512=OFF"
echo_info "Disabling AVX512 instructions" echo_info "Disabling AVX512 instructions"
...@@ -422,8 +421,8 @@ function main() { ...@@ -422,8 +421,8 @@ function main() {
-h | --help) -h | --help)
print_help print_help
exit 1;; exit 1;;
*) *)
print_help print_help
echo_fatal "Unknown option $1" echo_fatal "Unknown option $1"
break;; break;;
esac esac
...@@ -495,6 +494,12 @@ function main() { ...@@ -495,6 +494,12 @@ function main() {
eval $CMAKE_CMD eval $CMAKE_CMD
compilations $BUILD_DIR all.txt $TARGET_LIST compilations $BUILD_DIR all.txt $TARGET_LIST
# TODO: once we got the CMakeLists.txt file done for the ORAN files, remove the following lines
if [[ $TARGET_LIST =~ "oran_fhlib_5g" ]]; then
rm -f liboai_transpro.so
ln -s liboran_fhlib_5g.so liboai_transpro.so
fi
if [ "$UE" = 1 ] ; then if [ "$UE" = 1 ] ; then
echo_info "Compiling UE specific part" echo_info "Compiling UE specific part"
......
...@@ -52,8 +52,8 @@ index de141bf..96572e4 100644 ...@@ -52,8 +52,8 @@ index de141bf..96572e4 100644
#-qopt-report=5 -qopt-matmul -qopt-report-phase=all #-qopt-report=5 -qopt-matmul -qopt-report-phase=all
-CPP_COMP := -O3 -DNDEBUG -xcore-avx512 -fPIE -restrict -fasm-blocks -CPP_COMP := -O3 -DNDEBUG -xcore-avx512 -fPIE -restrict -fasm-blocks
-CPP_COMP_SNC := -O3 -DNDEBUG -march=icelake-server -fPIE -restrict -fasm-blocks -CPP_COMP_SNC := -O3 -DNDEBUG -march=icelake-server -fPIE -restrict -fasm-blocks
+CPP_COMP := -O3 -DNDEBUG -fPIE +CPP_COMP := -O3 -DNDEBUG -fPIE
+CPP_COMP_SNC := -O3 -DNDEBUG -march=icelake-server -fPIE +CPP_COMP_SNC := -O3 -DNDEBUG -march=icelake-server -fPIE
CC_FLAGS_FULL := $(CC_FLAGS) $(INC) $(DEF) CC_FLAGS_FULL := $(CC_FLAGS) $(INC) $(DEF)
CPP_FLAGS_FULL := $(CPP_FLAGS) $(CPP_COMP) $(INC) $(DEF) CPP_FLAGS_FULL := $(CPP_FLAGS) $(CPP_COMP) $(INC) $(DEF)
CPP_FLAGS_FULL_SNC := $(CPP_FLAGS) $(CPP_COMP_SNC) $(INC) $(DEF) CPP_FLAGS_FULL_SNC := $(CPP_FLAGS) $(CPP_COMP_SNC) $(INC) $(DEF)
...@@ -180,7 +180,7 @@ index baa673f..bf89bc7 100644 ...@@ -180,7 +180,7 @@ index baa673f..bf89bc7 100644
- return 0; - return 0;
+ /*if (process_ring(ctx->rx_ring[i][qi], i, qi)) + /*if (process_ring(ctx->rx_ring[i][qi], i, qi))
+ return 0;*/ + return 0;*/
+ process_ring(ctx->rx_ring[i][qi],i,qi); + process_ring(ctx->rx_ring[i][qi],i,qi);
} }
} }
......
...@@ -51,14 +51,15 @@ Radio units we are testing/integrating: ...@@ -51,14 +51,15 @@ Radio units we are testing/integrating:
|-----------|---------| |-----------|---------|
|VVDN LPRU |06-v1.0.9| |VVDN LPRU |06-v1.0.9|
|LiteON RU |01.00.08 | |LiteON RU |01.00.08 |
|Benetel 550|v0.6 | |Benetel 550|v0.8.1 |
|Benetel 650|v0.6 | |Benetel 650|v0.8.1 |
Tested libxran releases: Tested libxran releases:
|Vendor | | Vendor |
|--------------------------| |---------------------------------|
|oran_release_bronze_v1.1 | | oran_release_bronze_v1.1 |
| oran_e_maintenance_release_v1.0 |
## 1.1 Configure your server ## 1.1 Configure your server
...@@ -215,6 +216,8 @@ cd ...@@ -215,6 +216,8 @@ cd
wget http://fast.dpdk.org/rel/dpdk-20.11.7.tar.xz wget http://fast.dpdk.org/rel/dpdk-20.11.7.tar.xz
``` ```
Note tht you can also use a more recent version of DPDK: `wget http://fast.dpdk.org/rel/dpdk-20.11.8.tar.xz`.
### DPDK Compilation and Installation ### DPDK Compilation and Installation
```bash ```bash
...@@ -271,6 +274,15 @@ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib64/pkgconfig/ ...@@ -271,6 +274,15 @@ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib64/pkgconfig/
pkg-config --libs libdpdk --static pkg-config --libs libdpdk --static
``` ```
### If you want to de-install this version of DPDK
Go back to the version folder you used to build and install
```
cd ~/dpdk-stable-20.11.7
sudo ninja deinstall -C build
```
# 2. Build OAI-FHI gNB # 2. Build OAI-FHI gNB
Clone OAI code base in a suitable repository, here we are cloning in `~/openairinterface5g` directory, Clone OAI code base in a suitable repository, here we are cloning in `~/openairinterface5g` directory,
...@@ -286,29 +298,34 @@ We have made patches for the different releases of the FHI library: ...@@ -286,29 +298,34 @@ We have made patches for the different releases of the FHI library:
```bash ```bash
# TODO when merging: remove the 2 following lines # TODO when merging: remove the 2 following lines
# At the time of writing, the `use_msgq_new_fhidriver_build_fix` was not yet merged into `develop` # At the time of writing, the `fhidriver_E_rk` was not yet merged into `develop`
git checkout use_msgq_new_fhidriver_build_fix git checkout fhidriver_E_rk
# If the `use_msgq_new_fhidriver_build_fix` does not exist anymore, then they are in `develop` branch # If the `fhidriver_E_rk` does not exist anymore, then they are in `develop` branch
git checkout develop git checkout develop
# TODO: if we have different versions of patches per O-RAN releases # We have different versions of patches per O-RAN releases
ls cmake_targets/tools/oran_fhi_integration_patches/ ls cmake_targets/tools/oran_fhi_integration_patches/
E bronze
``` ```
## 2.1 Build ORAN Fronthaul Interface Library ## 2.1 Build ORAN Fronthaul Interface Library
Download ORAN FHI library Download ORAN FHI DU library
```bash ```bash
git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git ~/phy git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git ~/phy
cd ~/phy cd ~/phy
# If you want to use the Bronze release ```
### 2.1.1. Using the Bronze Release
```bash
git checkout oran_release_bronze_v1.1 git checkout oran_release_bronze_v1.1
``` ```
Apply patches (available in `oai_folder/cmake_targets/tools/oran_fhi_integration_patches/`) Apply patches (available in `oai_folder/cmake_targets/tools/oran_fhi_integration_patches/bronze`)
```bash ```bash
cp ~/openairinterface5g/cmake_targets/tools/oran_fhi_integration_patches/oran-fhi-*.patch . cp ~/openairinterface5g/cmake_targets/tools/oran_fhi_integration_patches/bronze/oran-fhi-*.patch .
git apply oran-fhi-1-compile-libxran-using-gcc-and-disable-avx512.patch git apply oran-fhi-1-compile-libxran-using-gcc-and-disable-avx512.patch
git apply oran-fhi-2-return-correct-slot_id.patch git apply oran-fhi-2-return-correct-slot_id.patch
...@@ -317,6 +334,22 @@ git apply oran-fhi-4-process_all_rx_ring.patch ...@@ -317,6 +334,22 @@ git apply oran-fhi-4-process_all_rx_ring.patch
git apply oran-fhi-5-remove-not-used-dependencies.patch git apply oran-fhi-5-remove-not-used-dependencies.patch
``` ```
### 2.1.2. Using the E Release
```bash
git checkout oran_e_maintenance_release_v1.0
```
Apply patches (available in `oai_folder/cmake_targets/tools/oran_fhi_integration_patches/E`)
```bash
cp ~/openairinterface5g/cmake_targets/tools/oran_fhi_integration_patches/bronze/*.patch .
git apply oaioran_E.patch
```
### 2.1.3. Build (valid for any release)
Set up the environment (change the path if you use different folders). We recommend you copy all variables in a file and then you source that file evertime you compile the source code. Set up the environment (change the path if you use different folders). We recommend you copy all variables in a file and then you source that file evertime you compile the source code.
```bash ```bash
...@@ -332,16 +365,22 @@ Compile Fronthaul Interface Library ...@@ -332,16 +365,22 @@ Compile Fronthaul Interface Library
```bash ```bash
cd ~/phy/fhi_lib/lib cd ~/phy/fhi_lib/lib
make clean make clean
make LIB_XRAN_SO=1 make XRAN_LIB_SO=1
... ...
[AR] build/libxran.so [AR] build/libxran.so
./build/libxran.so ./build/libxran.so
GTEST_ROOT is not set. Unit tests are not compiled
"echo "GTEST_ROOT is not set. Unit tests are not compiled"" command exited with code 0.
``` ```
The shared library object `~/phy/fhi_lib/lib/build` SHALL be generated. The shared library object `~/phy/fhi_lib/lib/build` SHALL be generated.
Copy it to `/usr/local/lib`:
```bash
sudo cp ~/phy/fhi_lib/lib/build/libxran.so /usr/local/lib
sudo ldconfig -v | grep libxran
libxran.so -> libxran.so
```
## 2.2 Build OAI gNB ## 2.2 Build OAI gNB
```bash ```bash
...@@ -371,7 +410,7 @@ ldd ran_build/build/lliboran_fhlib_5g.so ...@@ -371,7 +410,7 @@ ldd ran_build/build/lliboran_fhlib_5g.so
/lib64/ld-linux-x86-64.so.2 (0x00007f2da93d3000) /lib64/ld-linux-x86-64.so.2 (0x00007f2da93d3000)
``` ```
In case `liboai_transpro.so` is missing `libxran.so` then you can copy XRAN shared library object: In case `liboai_transpro.so` does not find `libxran.so`, then you can copy XRAN shared library object:
```bash ```bash
sudo cp ~/phy/fhi_lib/lib/build/libxran.so /usr/local/lib sudo cp ~/phy/fhi_lib/lib/build/libxran.so /usr/local/lib
...@@ -380,13 +419,17 @@ sudo ldconfig ...@@ -380,13 +419,17 @@ sudo ldconfig
# 3. Configure OAI gNB # 3. Configure OAI gNB
On this source branch (ie `use_msgq_new_fhidriver_build_fix`) and later on for `develop` branch, the configuration of the OAI-DU is based on 2 files: On this source branch (ie `fhidriver_E_rk`) and later on for `develop` branch, the configuration of the OAI-DU is based on 2 files:
1. the usual OAI gNB/DU configuration file: `~/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/oran.fh.band78.fr1.273PRB.conf` 1. the usual OAI gNB/DU configuration file: `~/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/oran.fh.band78.fr1.273PRB.conf`
2. a fronthaul interface configuration dat file: for example: `~/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/o-ran-dat-files/config_o_du_static_vvdn.dat` 2. a fronthaul interface configuration dat file: for example: `~/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/o-ran-dat-files/config_o_du_static_vvdn.dat`
## 3.1. Adapt the OAI-DU configuration file to your system/workspace ## 3.1. Adapt the OAI-DU configuration file to your system/workspace
**CAUTION: this section is correct for the Bronze Release support.**
**TODO: update for E Release.**
Edit the `targets/PROJECTS/GENERIC-NR-5GC/CONF/oran.fh.band78.fr1.273PRB.conf` with: Edit the `targets/PROJECTS/GENERIC-NR-5GC/CONF/oran.fh.band78.fr1.273PRB.conf` with:
* The PLMN section shall match the one defined in the AMF * The PLMN section shall match the one defined in the AMF
...@@ -469,4 +512,4 @@ cd ran_build/build ...@@ -469,4 +512,4 @@ cd ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/oran.fh.band78.fr1.273PRB.conf --sa --reorder-thread-disable --thread-pool <list of non isolated cpus> sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/oran.fh.band78.fr1.273PRB.conf --sa --reorder-thread-disable --thread-pool <list of non isolated cpus>
``` ```
For example if you have two numa nodes (for example 18 CPU per socket) in your system and odd cores are non isolated then you can put the thread-pool on `1,3,5,7,9,11,13,15`. Else if you have 1 numa node either you can use isolated cores or non isolated. Just make sure that isolated cores are not the ones defined earlier. For example if you have two numa nodes (for example 18 CPU per socket) in your system and odd cores are non isolated then you can put the thread-pool on `1,3,5,7,9,11,13,15`. Else if you have 1 numa node either you can use isolated cores or non isolated. Just make sure that isolated cores are not the ones defined earlier.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment