Skip to content
Snippets Groups Projects
Commit 9ee14574 authored by Teodora Vladic's avatar Teodora Vladic
Browse files

Update README files and use gcc-10 for address sanitizer

parent 255a2b39
No related branches found
No related tags found
1 merge request!29Dev to master before release 2
......@@ -94,7 +94,7 @@ elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
message(FATAL_ERROR "Due to bug in gcc 11.3.0 when implementing C11 _Generics, it does not compile FlexRIC.
Alternatively use gcc-10, gcc-12 or gcc-13 e.g., sudo update-alternatives --config gcc ")
elseif(${SANITIZER} STREQUAL "ADDRESS")
if(NOT CMAKE_C_COMPILER_VERSION STREQUAL "10.4.0")
if(NOT CMAKE_C_COMPILER_VERSION MATCHES "^10.*")
message(FATAL_ERROR "ASan not supported by newer versions of gcc when using nested functions needed e.g., defer.
Change the compiler to gcc-10 using e.g., sudo update-alternatives --config gcc")
endif()
......
# FlexRIC
This repository contains [O-RAN Alliance](https://www.o-ran.org/) compliant E2 Node Agent emulators, a nearRT-RIC, and xApps written in C/C++ and Python.
It implements various service models (O-RAN standard KPM v2.01, KPM v2.03, KPM v3.01 and RC v1.03, as well as customized NG/GTP, PDCP, RLC, MAC, SC and TC).
It implements various service models (O-RAN standard KPM v2.01/v2.03/v3.00 and RC v1.03, as well as customized NG/GTP, PDCP, RLC, MAC, SC and TC).
Depending on the service model, different encoding schemes have been developed (ASN.1, flatbuffer, plain).
The indication data received in the xApp uses as persistence mechanism an sqlite3 database for enabling offline processing applications (e.g., ML/AI).
Moreover it supports E2AP v1/v2 and v3 for all the SMs.
Moreover it supports E2AP v1.01/v2.03/v3.01 for all the SMs.
If you want to know more about FlexRIC and its original architecture, you can find more details at: Robert Schmidt, Mikel Irazabal, and Navid Nikaein. 2021.
FlexRIC: an SDK for next-generation SD-RANs. In Proceedings of the 17th International Conference on emerging Networking EXperiments and Technologies (CoNEXT
......@@ -13,16 +13,16 @@ https://bit.ly/3uOXuCV
Below is the list of features available in this version divided per component and per service model:
| | OAI-4g |OAI-5g| SRS-4g | E2 Agent emulator | Near RT-RIC | xApp c/c++ SDK | xApp python SDK| O-RAN standardized|
|:-----|:-------|:-----|:-------|:------------------|:------------|:------------------|:---------------|:--------------|
| KPM | Y | Y | Y | Y | Y | Y | N | Y |
| RC | Y | Y | N | Y | Y | Y | N | Y |
| MAC | Y | Y | Y | Y | Y | Y | Y | N |
| RLC | Y | Y | Y | Y | Y | Y | Y | N |
| PDCP | Y | Y | Y | Y | Y | Y | Y | N |
| SLICE| Y | N | Y | Y | Y | Y | Y | N |
| TC | N | N | N | Y | Y | Y | N | N |
| GTP | N | N | N | Y | Y | Y | N | N |
| |OAI-5g| SRS-5g | E2 Agent emulator | Near RT-RIC | xApp c/c++ SDK | xApp python SDK| O-RAN standardized|
|:-----|:-----|:-------|:------------------|:------------|:------------------|:---------------|:--------------|
| KPM | Y | Y | Y | Y | Y | N | Y |
| RC | Y | Y | Y | Y | Y | N | Y |
| MAC | Y | N | Y | Y | Y | Y | N |
| RLC | Y | N | Y | Y | Y | Y | N |
| PDCP | Y | N | Y | Y | Y | Y | N |
| SLICE| N | N | Y | Y | Y | Y | N |
| TC | N | N | Y | Y | Y | N | N |
| GTP | N | N | Y | Y | Y | N | N |
## 1. Installation
......@@ -32,7 +32,7 @@ Below is the list of features available in this version divided per component an
On Ubuntu, you might want to use [this PPA](https://apt.kitware.com/) to install an up-to-date version.
- SWIG (at least v.4.0).
- SWIG (at least v.4.1).
We use SWIG as an interface generator to enable the multi-language feature (i.e., C/C++ and Python) for the xApps. Please, check your SWIG version (i.e, `swig
-version`) and install it from scratch if necessary as described here: https://swig.org/svn.html or via the code below:
......@@ -74,18 +74,28 @@ sudo apt install libsctp-dev python3.8 cmake-curses-gui libpcre2-dev python-dev
$ cd flexric && mkdir build && cd build && cmake .. && make -j8
```
Note:
Supported E2AP versions: v1.01/v2.03/v3.01
Supported KPM SM versions: v2.01/v2.03/v3.00
By default, FlexRIC will build the nearRT-RIC with E2AP v2.03 and KPM v2.03. If you are interested in other available versions, please, execute this command:
```bash
mkdir build && cd build && cmake .. -DE2AP_VERSION=<e2ap_version> -DKPM_VERSION=<kpm_version> && make -j8
```
* Install
You can install the Service Models (SM) in your computer via:
```bash
sudo make install
```
By default the service model libraries will be installed in the path /usr/local/lib/flexric while the
configuration file in /usr/local/etc/flexric.
By default the service model libraries will be installed in the path `/usr/local/lib/flexric` while the
configuration file in `/usr/local/etc/flexric`.
Note: Command `sudo make install` installs shared libraries that represent Service Models. Every time E2AP or/and KPM versions are modified, this command must be executed afterwards.
Check that everything went fine running the tests:
```bash
ctest()
ctest
```
......@@ -93,14 +103,15 @@ sudo apt install libsctp-dev python3.8 cmake-curses-gui libpcre2-dev python-dev
There are some tests you can run. Precisely:
* 3 nodes test. See directory `build/examples/xApp/c/monitor`. This test simulates an scenario with an E2 node, a nearRT-RIC and an xApp. Data is randomly filled. Example running in 3 terminals.
```bash
# terminal 1: start E2 Node agent
./build/examples/emulator/agent/agent_1
# terminal 2: start nearRT-RIC
./build/examples/ric/nearRT-RIC
# terminal 3
build/examples/xApp/c/monitor/xapp_gtp_mac_rlc_pdcp_moni
```
```bash
# terminal 1: start E2 Node agent
./build/examples/emulator/agent/emu_agent_gnb
# terminal 2: start nearRT-RIC
./build/examples/ric/nearRT-RIC
# terminal 3
./build/examples/xApp/c/monitor/xapp_gtp_mac_rlc_pdcp_moni
```
## 2. Usage/deployment
Before starting the nearRT-RIC, check that the IP address where your nearRT-RIC will be listening is the desired one at `/usr/local/lib/flexric/flexric.conf`.
......@@ -154,18 +165,19 @@ Learning/Artificial Intelligence applications). Please, check the example folder
## 3. Integration with RAN and example of deployment
### 3.1 Integration with OpenAirInterface 4G/5G RAN
### 3.1 Integration with OpenAirInterface 5G RAN
Follow the instructions https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/openair2/E2AP/README.md
Follow the instructions https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/openair2/E2AP?ref_type=heads
### 3.2 Integration with srsRAN 4G/5G RAN
### 3.2 Integration with srsRAN 5G RAN
Follow the instructions https://docs.srsran.com/projects/project/en/latest/tutorials/source/flexric/source/index.html
### 3.3 Integration with Keysight RICtest
The nearRT-RIC has been successfully tested with Keysight's RICtest RAN emulator https://www.keysight.com/us/en/product/P8828S/rictest-ran-intelligent-controller-test-solutions.html,
as demonstrated at O-RAN PlugFest 2023. Specifically, the nearRT-RIC with the xApp XXXXX where tested.
as demonstrated at O-RAN PlugFest Fall 2023. Specifically, the nearRT-RIC with the xApp XXXXX were tested.
### 3.4 (opt) Synchronize clock
......@@ -195,7 +207,7 @@ sudo phc2sys -m -s InterfaceName -w
```bash
# gNB
$ cd oai/cmake_targets/ran_build/build
$ sudo ./nr-softmodem -O path/to/flexric/multiRAT/oai/gnb.sa.band78.fr1.106PRB.usrpb210.conf --sa -E --continuous-tx
$ sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --rfsim --sa -E
```
* Start the nearRT-RIC
......@@ -206,7 +218,7 @@ sudo phc2sys -m -s InterfaceName -w
* Start different xApps
e.g, start the kpm monitoring xApp via `$ ./build/examples/xApp/c/monitor/kpm_moni`. The controlling sequence diagram is represented below:
e.g, start the kpm monitoring xApp via `$ ./build/examples/xApp/c/monitor/xapp_kpm_moni`. The controlling sequence diagram is represented below:
![alt text](fig/4.png)
......@@ -217,8 +229,7 @@ FlexRIC's E2 Agent (and OAI RAN that is embedded on it) has also been successful
Follow OSC nearRT-RIC installation guide. The xApp can be found at https://github.com/mirazabal/kpm_rc-xapp. Please, note that we do not give support for the OSC nearRT-RIC.
XXXXXXX
Robert videos
Recorded presentation at Phoenix, October 2023 (4th minute): https://zoom.us/rec/play/N5mnAQUcEVRf8HN6qLYa4k7kjNq3bK4hQiYqHGv9KUoLfcR6GHiE-GvnmAudT6xccmZSbkxxYHRwTaxk.Zi7d8Sl1kQ6Sk1SH?canPlayFromShare=true&from=share_recording_detail&continueMode=true&componentName=rec-play&originRequestUrl=https%3A%2F%2Fzoom.us%2Frec%2Fshare%2FwiYXulPlAqIIDY_vLPQSGqYIj-e5Ef_UCxveMjrDNGgXLLvEcDF4v1cmVBe8imb4.WPi-DA_dfPDBQ0FH
## 5. Support/further resources
......@@ -229,6 +240,10 @@ Robert videos
* [ppt](https://gitlab.eurecom.fr/mosaic5g/flexric/-/wikis/home) presentation with a gentle introduction to flexric
* [Original FlexRIC paper ACM CoNEXT 2021](https://bit.ly/3uOXuCV)
## 6. Roadmap
## 6. OAM Project Group & Roadmap
Check https://openairinterface.org/projects/oam-project-group/
## 7. FlexRIC Milestone
Check https://gitlab.eurecom.fr/mosaic5g/flexric/-/milestones
/*
* 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
*/
#include "../../../../src/xApp/e42_xapp_api.h"
#include "../../../../src/util/alg_ds/alg/defer.h"
#include "../../../../src/util/time_now_us.h"
#include "../../../../src/sm/gtp_sm/gtp_sm_id.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
static
void sm_cb_gtp(sm_ag_if_rd_t const* rd)
{
assert(rd != NULL);
assert(rd->type ==INDICATION_MSG_AGENT_IF_ANS_V0);
assert(rd->ind.type == GTP_STATS_V0);
int64_t now = time_now_us();
printf("GTP ind_msg latency = %ld μs\n", now - rd->ind.gtp.msg.tstamp);
}
int main(int argc, char *argv[])
{
fr_args_t args = init_fr_args(argc, argv);
//Init the xApp
init_xapp_api(&args);
sleep(1);
e2_node_arr_t nodes = e2_nodes_xapp_api();
defer({ free_e2_node_arr(&nodes); });
assert(nodes.len > 0);
printf("Connected E2 nodes = %d\n", nodes.len);
// gtp indication
const char* i_2 = "1_ms";
sm_ans_xapp_t* gtp_handle = NULL;
if(nodes.len > 0){
gtp_handle = calloc( nodes.len, sizeof(sm_ans_xapp_t) );
assert(gtp_handle != NULL);
}
for (int i = 0; i < nodes.len; i++) {
e2_node_connected_t* n = &nodes.n[i];
for (size_t j = 0; j < n->len_rf; j++)
printf("Registered node %d ran func id = %d \n ", i, n->ack_rf[j].id);
gtp_handle[i] = report_sm_xapp_api(&nodes.n[i].id, SM_GTP_ID, (void*)i_2, sm_cb_gtp);
assert(gtp_handle[i].success == true);
}
sleep(10);
for(int i = 0; i < nodes.len; ++i){
// Remove the handle previously returned
rm_report_sm_xapp_api(gtp_handle[i].u.handle);
}
if(nodes.len > 0){
free(gtp_handle);
}
//Stop the xApp
while(try_stop_xapp_api() == false)
usleep(1000);
printf("Test xApp run SUCCESSFULLY\n");
}
......@@ -6,7 +6,7 @@ Follow the instructions https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/
Follow the instructions https://docs.srsran.com/projects/project/en/latest/tutorials/source/flexric/source/index.html
## 3. Keysigth RICtest
## 3. Keysight RICtest
The nearRT-RIC has been successfully tested with Keysight's RICtest RAN emulator https://www.keysight.com/us/en/product/P8828S/rictest-ran-intelligent-controller-test-solutions.html
......
FlexRIC supports multiple O-RAN E2AP versions - v1.01/v2.03/v3.01.
By default, E2AP v2.03 is compiled. If you would like to change the version, please, execute this command:
```bash
mkdir build && cd build && cmake .. -DE2AP_VERSION=<e2ap_version> && make -j8
sudo make install
```
Note: Command `sudo make install` installs shared libraries that represent Service Models. Every time E2AP or/and KPM versions are modified, this command must be executed afterwards.
FlexRIC supports multiple O-RAN KPM SM versions - v2.01/v2.03/v3.00.
By default, KPM v2.03 is compiled. If you would like to change the version, please, execute this command:
```bash
mkdir build && cd build && cmake .. -DKPM_VERSION=<kpm_version> && make -j8
sudo make install
```
Note: Command `sudo make install` installs shared libraries that represent Service Models. Every time E2AP or/and KPM versions are modified, this command must be executed afterwards.
The document 28_552_kpm_meas.txt contains the list of all measurements defined in 3GPP TS 28.552.
At the moment, the following measurements are supported in OAI RAN:
"DRB.PdcpSduVolumeDL"
"DRB.PdcpSduVolumeUL"
"DRB.RlcSduDelayDl"
"DRB.UEThpDl"
"DRB.UEThpUl"
"RRU.PrbTotDl"
"RRU.PrbTotUl"
FlexRIC supports O-RAN RC SM v1.03.
At the moment, OAI RAN supports the RAN control function "QoS flow mapping configuration", i.e. creating a new DRB.
We have showcased this feature at O-RAN meetings:
1. OAI RAN + FlexRIC demo - Osaka, June 2023:
- 55th minute: https://zoom.us/rec/play/1JdMqJPufSsZna09aLgauwmEo-CgKYFyxKPoEIxweJ4FCDvsTjmeUFzjfSTZJn8w9-MxTG1Bb0gG3GN_.orz4ka7mAZV4o6J8?canPlayFromShare=true&from=share_recording_detail&continueMode=true&componentName=rec-play&originRequestUrl=https%3A%2F%2Fzoom.us%2Frec%2Fshare%2F-Q87TBaTxMPII0SOBA44scg7NexCM1XwhY1X2iGIeGbDHc0kIA-_n1X-I3kJDMc.4fBtTHqeXJUHMHnG&autoplay=true&startTime=1687252602000
2. OAI RAN + OSC nearRT-RIC demo - Phoenix, October 2023:
- 4th minute: https://zoom.us/rec/play/N5mnAQUcEVRf8HN6qLYa4k7kjNq3bK4hQiYqHGv9KUoLfcR6GHiE-GvnmAudT6xccmZSbkxxYHRwTaxk.Zi7d8Sl1kQ6Sk1SH?canPlayFromShare=true&from=share_recording_detail&continueMode=true&componentName=rec-play&originRequestUrl=https%3A%2F%2Fzoom.us%2Frec%2Fshare%2FwiYXulPlAqIIDY_vLPQSGqYIj-e5Ef_UCxveMjrDNGgXLLvEcDF4v1cmVBe8imb4.WPi-DA_dfPDBQ0FH
In addition, RC SM has been further tested against Keysight RAN simulator at O-RAN PlugFest Fall 2023:
- RAN report function "Call Process Outcome"
- RAN control function "DRB QoS Configuration"
For more information, please refer to the corresponding xApp:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment