Skip to content

Commit eee7bd1

Browse files
Merge branch 'main' into agpl_main
2 parents 77be7d3 + 616f154 commit eee7bd1

File tree

58 files changed

+547
-377
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+547
-377
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ pages:
326326
- sed -i 's/commit_hash/'$CI_COMMIT_SHA'/' public/index.html
327327
- sed -i 's/zmq_job_id/'$( cat ./zmq/job.env )'/' public/index.html
328328
- sed -i 's/zmq-tsan_job_id/'$( cat ./zmq-tsan/job.env )'/' public/index.html
329-
- sed -i 's/zmq-asan_job_id/'$( cat ./zmq-asan/job.env )'/' public/index.html
329+
# - sed -i 's/zmq-asan_job_id/'$( cat ./zmq-asan/job.env )'/' public/index.html
330330
- sed -i 's/rf_job_id/'$( cat ./rf/job.env )'/' public/index.html
331331

332332
needs:
@@ -342,8 +342,8 @@ pages:
342342
artifacts: true
343343
- job: zmq-tsan
344344
artifacts: true
345-
- job: zmq-asan
346-
artifacts: true
345+
# - job: zmq-asan
346+
# artifacts: true
347347
- job: rf
348348
artifacts: true
349349
artifacts:

.gitlab/ci/build.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -563,20 +563,20 @@ avx2 [tsan, clean]:
563563
- if: $CI_MERGE_REQUEST_LABELS =~ /no-cache/
564564
cache: []
565565

566-
avx2 [asan]:
567-
extends: .avx
568-
rules:
569-
- if: $CI_DESCRIPTION =~ /Nightly/
570-
variables:
571-
OS: ubuntu-22.04
572-
TEST_MODE: asan
573-
COMPILER: gcc
574-
BUILD_TYPE: Debug
575-
ENABLE_ASAN: "True"
576-
ASSERT_LEVEL: PARANOID
577-
CPU_FLAG: "avx2"
578-
ENABLE_AVX512: "False"
579-
ENABLE_AVX2: "True"
566+
# avx2 [asan]:
567+
# extends: .avx
568+
# rules:
569+
# - if: $CI_DESCRIPTION =~ /Nightly/
570+
# variables:
571+
# OS: ubuntu-22.04
572+
# TEST_MODE: asan
573+
# COMPILER: gcc
574+
# BUILD_TYPE: Debug
575+
# ENABLE_ASAN: "True"
576+
# ASSERT_LEVEL: PARANOID
577+
# CPU_FLAG: "avx2"
578+
# ENABLE_AVX512: "False"
579+
# ENABLE_AVX2: "True"
580580

581581
avx512:
582582
extends: .avx

.gitlab/ci/e2e.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,20 @@
2727
2828
.e2e-run:
2929
stage: e2e
30-
timeout: 10h
30+
resource_group: e2e
31+
timeout: 4h
3132
interruptible: false
3233
image:
33-
name: registry.gitlab.com/softwareradiosystems/retina/launcher/3.11-alpine:0.0.16
34+
name: registry.gitlab.com/softwareradiosystems/retina/launcher/3.11-alpine:0.0.18
3435
entrypoint: ["/bin/sh", "-c"]
3536
variables:
3637
REQUEST: "" # Retina YAML request
37-
LOG_LEVEL: "debug"
38+
LOG_LEVEL: "info"
3839
MARKERS: ""
3940
ARGS: ""
40-
FORCE_DOWNLOAD: "true"
41+
FORCE_DOWNLOAD: "false" # Download only failed tests by default
42+
PCAP: "" # Disabled by default
43+
FAIL_IF_INTERNAL_ERRORS: "true" # Enabled by default
4144
tags:
4245
- on-prem-amd64
4346
extends:
@@ -57,24 +60,31 @@
5760
export LOGNAME=$GITLAB_USER_LOGIN
5861
export RETINA_LOGLEVEL="$LOG_LEVEL"
5962
export RETINA_FORCE_DOWNLOAD_REPORT="$FORCE_DOWNLOAD"
63+
export RETINA_PCAP_ENABLE="$PCAP"
64+
export RETINA_FAIL_IF_INTERNAL_ERRORS="$FAIL_IF_INTERNAL_ERRORS"
6065
- retina-launcher --retina-request ${REQUEST} --self-contained-html --html=./log/report.html --junitxml=out.xml "${ARGS}" -m "${MARKERS}" .
6166
after_script:
6267
- |
6368
echo "*******************************************************************************************************************************"
6469
echo "Test report ---> https://softwareradiosystems.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/$CI_JOB_NAME/report.html"
6570
echo "*******************************************************************************************************************************"
71+
- du -hs tests/e2e/log/
6672
- mv tests/e2e/log ${CI_PROJECT_DIR}/$CI_JOB_NAME
6773
- echo "$CI_JOB_ID" >> ${CI_PROJECT_DIR}/$CI_JOB_NAME/job.env
6874

6975
smoke-zmq-tsan:
7076
extends: .e2e-run
7177
rules:
78+
- if: $ON_MR == "true" && $CI_MERGE_REQUEST_APPROVED == "true"
7279
- if: $ON_MR
80+
when: manual
81+
allow_failure: false
7382
variables:
7483
REQUEST: "${CI_PROJECT_DIR}/.gitlab/ci/retina_request_zmq.yml"
7584
MARKERS: "smoke and not tcp and not multiue"
7685
ARGS: "-x"
77-
FORCE_DOWNLOAD: "false"
86+
LOG_LEVEL: "debug"
87+
PCAP: "true"
7888
needs:
7989
- job: "avx2 [tsan, cached]"
8090
artifacts: true
@@ -110,11 +120,11 @@ zmq-tsan:
110120
artifacts: true
111121
optional: true
112122

113-
zmq-asan:
114-
extends: zmq
115-
needs:
116-
- job: "avx2 [asan]"
117-
artifacts: true
123+
# zmq-asan:
124+
# extends: zmq
125+
# needs:
126+
# - job: "avx2 [asan]"
127+
# artifacts: true
118128

119129
zmq-multiue:
120130
extends: zmq
@@ -125,10 +135,11 @@ rf:
125135
extends: .e2e-run
126136
rules:
127137
- if: $CI_DESCRIPTION =~ /Nightly/
128-
allow_failure: true
129138
variables:
130139
REQUEST: "${CI_PROJECT_DIR}/.gitlab/ci/retina_request_rf.yml"
131140
MARKERS: "rf and not tcp and not multiue"
141+
LOG_LEVEL: "warning"
142+
FAIL_IF_INTERNAL_ERRORS: ""
132143
needs:
133144
- job: "avx2 [basic]"
134145
artifacts: true

.gitlab/ci/retina_request_rf.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
- name: amarisoft-ue
2222
type: ue
23-
image: registry.gitlab.com/softwareradiosystems/retina/images/amarisoftue:2021-09-18_ba49eb7_47a0213a4_0.2.0
23+
image: registry.gitlab.com/softwareradiosystems/retina/images/amarisoftue:2021-09-18_97e143d_344d33aee_0.2.8
2424
resources:
2525
- type: sdr
2626
model: b200
@@ -29,12 +29,12 @@
2929

3030
- name: srs-gnb
3131
type: gnb
32-
image: registry.gitlab.com/softwareradiosystems/retina/images/srsgnb:0.1.1_0.2.2
32+
image: registry.gitlab.com/softwareradiosystems/retina/images/srsgnb:0.1.1_0.2.8
3333
resources:
3434
- type: sdr
3535
model: b200
3636
path: ../../build/apps/gnb/gnb
3737

3838
- name: open5gs
3939
type: epc
40-
image: registry.gitlab.com/softwareradiosystems/retina/images/open5gs:2.5.6_0.2.0
40+
image: registry.gitlab.com/softwareradiosystems/retina/images/open5gs:2.5.6_0.2.4

.gitlab/ci/retina_request_zmq.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020

2121
- name: amarisoft-ue
2222
type: ue
23-
image: registry.gitlab.com/softwareradiosystems/retina/images/amarisoftue:2021-09-18_ba49eb7_47a0213a4_0.2.0
23+
image: registry.gitlab.com/softwareradiosystems/retina/images/amarisoftue:2021-09-18_97e143d_344d33aee_0.2.8
2424
resources:
2525
- type: zmq
2626
- type: license
2727
model: amarisoft-5g
2828

2929
- name: srs-gnb
3030
type: gnb
31-
image: registry.gitlab.com/softwareradiosystems/retina/images/srsgnb:0.1.1_0.2.2
31+
image: registry.gitlab.com/softwareradiosystems/retina/images/srsgnb:0.1.1_0.2.8
3232
resources:
3333
- type: zmq
3434
path: ../../build/apps/gnb/gnb
3535

3636
- name: open5gs
3737
type: epc
38-
image: registry.gitlab.com/softwareradiosystems/retina/images/open5gs:2.5.6_0.2.0
38+
image: registry.gitlab.com/softwareradiosystems/retina/images/open5gs:2.5.6_0.2.4

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ if (ENABLE_EXPORT)
7777
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
7878
endif (ENABLE_EXPORT)
7979

80+
########################################################################
81+
# Install Dirs
82+
########################################################################
83+
84+
set(DATA_DIR share/${CMAKE_PROJECT_NAME})
85+
8086
########################################################################
8187
# Compiler specific setup
8288
########################################################################
@@ -297,6 +303,7 @@ add_custom_target(all_srsran_headers SOURCES ${ALL_HEADER_FILES})
297303
########################################################################
298304

299305
add_subdirectory(apps)
306+
add_subdirectory(configs)
300307
add_subdirectory(docs)
301308
add_subdirectory(external)
302309
add_subdirectory(lib)

apps/gnb/gnb.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,9 @@ int main(int argc, char** argv)
378378

379379
// Set log-level of app and all non-layer specific components to app level.
380380
srslog::basic_logger& gnb_logger = srslog::fetch_basic_logger("GNB");
381-
for (const auto& id : {"GNB", "ALL", "SCTP-GW", "IO-EPOLL", "UDP-GW"}) {
381+
for (const auto& id : {"GNB", "ALL", "SCTP-GW", "IO-EPOLL", "UDP-GW", "PCAP"}) {
382382
auto& logger = srslog::fetch_basic_logger(id, false);
383-
logger.set_level(srslog::str_to_basic_level(gnb_cfg.log_cfg.app_level));
383+
logger.set_level(srslog::str_to_basic_level(gnb_cfg.log_cfg.lib_level));
384384
logger.set_hex_dump_max_size(gnb_cfg.log_cfg.hex_max_size);
385385
}
386386

@@ -391,7 +391,7 @@ int main(int argc, char** argv)
391391
du_logger.set_hex_dump_max_size(gnb_cfg.log_cfg.hex_max_size);
392392
}
393393

394-
for (const auto& id : {"CU-CP", "CU-CP-F1", "CU-CP-E1", "NGAP"}) {
394+
for (const auto& id : {"CU-CP", "CU-CP-F1", "CU-CP-E1"}) {
395395
auto& cu_cp_logger = srslog::fetch_basic_logger(id, false);
396396
cu_cp_logger.set_level(srslog::str_to_basic_level(gnb_cfg.log_cfg.cu_level));
397397
cu_cp_logger.set_hex_dump_max_size(gnb_cfg.log_cfg.hex_max_size);
@@ -430,6 +430,10 @@ int main(int argc, char** argv)
430430
rrc_logger.set_level(srslog::str_to_basic_level(gnb_cfg.log_cfg.rrc_level));
431431
rrc_logger.set_hex_dump_max_size(gnb_cfg.log_cfg.hex_max_size);
432432

433+
auto& ngap_logger = srslog::fetch_basic_logger("NGAP", false);
434+
ngap_logger.set_level(srslog::str_to_basic_level(gnb_cfg.log_cfg.ngap_level));
435+
ngap_logger.set_hex_dump_max_size(gnb_cfg.log_cfg.hex_max_size);
436+
433437
auto& sdap_logger = srslog::fetch_basic_logger("SDAP", false);
434438
sdap_logger.set_level(srslog::str_to_basic_level(gnb_cfg.log_cfg.sdap_level));
435439
sdap_logger.set_hex_dump_max_size(gnb_cfg.log_cfg.hex_max_size);
@@ -628,7 +632,7 @@ int main(int argc, char** argv)
628632
// DU QoS config
629633
const std::map<uint8_t, du_qos_config>& du_qos_cfg = generate_du_qos_config(gnb_cfg);
630634
for (const auto& it : du_qos_cfg) {
631-
gnb_logger.info("QoS RLC configuration: 5QI={} RLC={}", it.first, it.second.rlc);
635+
gnb_logger.debug("QoS RLC configuration: 5QI={} RLC={}", it.first, it.second.rlc);
632636
}
633637

634638
// Cell configuration.
@@ -692,6 +696,10 @@ int main(int argc, char** argv)
692696
ngap_p->close();
693697
mac_p->close();
694698

699+
gnb_logger.info("Stopping radio...");
700+
radio->stop();
701+
gnb_logger.info("Radio stopped successfully");
702+
695703
gnb_logger.info("Stopping lower PHY...");
696704
lower->get_controller().stop();
697705
gnb_logger.info("Lower PHY stopped successfully");

apps/gnb/gnb_appconfig.h

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -198,24 +198,25 @@ struct amf_appconfig {
198198
};
199199

200200
struct log_appconfig {
201-
std::string filename = "/tmp/gnb.log"; // Path to write log file or "stdout" to print to console.
202-
std::string all_level = "info"; // Default log level for all layers.
203-
std::string app_level = "info"; // Generic log level assigned to all layers without layer-specific level.
204-
std::string du_level = "info";
205-
std::string cu_level = "info";
206-
std::string phy_level = "info";
207-
std::string radio_level = "info";
208-
std::string mac_level = "info";
209-
std::string rlc_level = "info";
210-
std::string f1u_level = "info";
211-
std::string pdcp_level = "info";
212-
std::string rrc_level = "info";
213-
std::string sdap_level = "info";
214-
std::string gtpu_level = "info";
215-
std::string fapi_level = "info";
216-
uint32_t hex_max_size = 32; // Maximum number of bytes to write when dumping hex arrays.
217-
bool broadcast_enabled = false; // Set to true to log broadcasting messages and all PRACH opportunities.
218-
std::string phy_rx_symbols_filename = ""; // Set to a valid file path to print the received symbols.
201+
std::string filename = "/tmp/gnb.log"; // Path to write log file or "stdout" to print to console.
202+
std::string all_level = "warning"; // Default log level for all layers.
203+
std::string lib_level = "warning"; // Generic log level assigned to library components without layer-specific level.
204+
std::string du_level = "warning";
205+
std::string cu_level = "warning";
206+
std::string phy_level = "warning";
207+
std::string radio_level = "warning";
208+
std::string mac_level = "warning";
209+
std::string rlc_level = "warning";
210+
std::string f1u_level = "warning";
211+
std::string pdcp_level = "warning";
212+
std::string rrc_level = "warning";
213+
std::string ngap_level = "warning";
214+
std::string sdap_level = "warning";
215+
std::string gtpu_level = "warning";
216+
std::string fapi_level = "warning";
217+
uint32_t hex_max_size = 0; // Maximum number of bytes to write when dumping hex arrays.
218+
bool broadcast_enabled = false; // Set to true to log broadcasting messages and all PRACH opportunities.
219+
std::string phy_rx_symbols_filename = ""; // Set to a valid file path to print the received symbols.
219220
};
220221

221222
struct pcap_appconfig {

apps/gnb/gnb_appconfig_cli11_schema.cpp

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,26 @@ static void configure_cli11_log_args(CLI::App& app, log_appconfig& log_params)
3838
};
3939

4040
app.add_option("--filename", log_params.filename, "Log file output path")->capture_default_str();
41-
app.add_option("--all_level", log_params.all_level, "Log level of all loggers")
41+
app.add_option(
42+
"--all_level", log_params.all_level, "Default log level for PHY, MAC, RLC, PDCP, RRC, SDAP, NGAP and GTPU")
4243
->capture_default_str()
4344
->check(level_check);
44-
app.add_option("--app_level", log_params.app_level, "Generic log level")->capture_default_str()->check(level_check);
45-
app.add_option("--du_level", log_params.du_level, "Log level for the DU")->capture_default_str()->check(level_check);
46-
app.add_option("--cu_level", log_params.cu_level, "Log level for the CU")->capture_default_str()->check(level_check);
4745
app.add_option("--phy_level", log_params.phy_level, "PHY log level")->capture_default_str()->check(level_check);
48-
app.add_option("--radio_level", log_params.radio_level, "Radio log level")->capture_default_str()->check(level_check);
4946
app.add_option("--mac_level", log_params.mac_level, "MAC log level")->capture_default_str()->check(level_check);
5047
app.add_option("--rlc_level", log_params.rlc_level, "RLC log level")->capture_default_str()->check(level_check);
51-
app.add_option("--f1u_level", log_params.f1u_level, "F1-U log level")->capture_default_str()->check(level_check);
5248
app.add_option("--pdcp_level", log_params.pdcp_level, "PDCP log level")->capture_default_str()->check(level_check);
5349
app.add_option("--rrc_level", log_params.rrc_level, "RRC log level")->capture_default_str()->check(level_check);
5450
app.add_option("--sdap_level", log_params.sdap_level, "SDAP log level")->capture_default_str()->check(level_check);
51+
app.add_option("--ngap_level", log_params.ngap_level, "NGAP log level")->capture_default_str()->check(level_check);
5552
app.add_option("--gtpu_level", log_params.gtpu_level, "GTPU log level")->capture_default_str()->check(level_check);
53+
app.add_option("--radio_level", log_params.radio_level, "Radio log level")->capture_default_str()->check(level_check);
5654
app.add_option("--fapi_level", log_params.fapi_level, "FAPI log level")->capture_default_str()->check(level_check);
57-
app.add_option("--hex_max_size", log_params.hex_max_size, "Maximum number of bytes to print in hex")
55+
app.add_option("--f1u_level", log_params.f1u_level, "F1-U log level")->capture_default_str()->check(level_check);
56+
app.add_option("--du_level", log_params.du_level, "Log level for the DU")->capture_default_str()->check(level_check);
57+
app.add_option("--cu_level", log_params.cu_level, "Log level for the CU")->capture_default_str()->check(level_check);
58+
app.add_option("--lib_level", log_params.lib_level, "Generic log level")->capture_default_str()->check(level_check);
59+
app.add_option(
60+
"--hex_max_size", log_params.hex_max_size, "Maximum number of bytes to print in hex (zero for no hex dumps)")
5861
->capture_default_str()
5962
->check(CLI::Range(0, 1024));
6063
app.add_option("--broadcast_enabled",
@@ -68,30 +71,15 @@ static void configure_cli11_log_args(CLI::App& app, log_appconfig& log_params)
6871

6972
// Post-parsing callback. This allows us to set the log level to "all" level, if no level is provided.
7073
app.callback([&]() {
71-
if (app.count("--app_level") == 0) {
72-
log_params.app_level = log_params.all_level;
73-
}
74-
if (app.count("--du_level") == 0) {
75-
log_params.du_level = log_params.all_level;
76-
}
77-
if (app.count("--cu_level") == 0) {
78-
log_params.cu_level = log_params.all_level;
79-
}
8074
if (app.count("--phy_level") == 0) {
8175
log_params.phy_level = log_params.all_level;
8276
}
83-
if (app.count("--radio_level") == 0) {
84-
log_params.radio_level = log_params.all_level;
85-
}
8677
if (app.count("--mac_level") == 0) {
8778
log_params.mac_level = log_params.all_level;
8879
}
8980
if (app.count("--rlc_level") == 0) {
9081
log_params.rlc_level = log_params.all_level;
9182
}
92-
if (app.count("--f1u_level") == 0) {
93-
log_params.f1u_level = log_params.all_level;
94-
}
9583
if (app.count("--pdcp_level") == 0) {
9684
log_params.pdcp_level = log_params.all_level;
9785
}
@@ -101,10 +89,10 @@ static void configure_cli11_log_args(CLI::App& app, log_appconfig& log_params)
10189
if (app.count("--sdap_level") == 0) {
10290
log_params.sdap_level = log_params.all_level;
10391
}
104-
if (app.count("--gtpu_level") == 0) {
105-
log_params.gtpu_level = log_params.all_level;
92+
if (app.count("--ngap_level") == 0) {
93+
log_params.ngap_level = log_params.all_level;
10694
}
107-
if (app.count("--fapi_level") == 0) {
95+
if (app.count("--gtpu_level") == 0) {
10896
log_params.gtpu_level = log_params.all_level;
10997
}
11098
});

0 commit comments

Comments
 (0)