Skip to content

Commit

Permalink
Update main
Browse files Browse the repository at this point in the history
  • Loading branch information
codebot committed Dec 3, 2024
2 parents cda0033 + e570a95 commit e5d5b44
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 33 deletions.
2 changes: 2 additions & 0 deletions .gitlab/ci/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ custom e2e:
when: never
- if: $ON_WEB
- if: $ON_API
timeout: 28 hours
needs:
- *retina-needs
- custom build
Expand Down Expand Up @@ -494,6 +495,7 @@ viavi-extended:
- if: $CI_DESCRIPTION =~ /Weekly/
variables:
KEYWORDS: "extended and not 24h"
timeout: 28 hours
needs:
- job: "basic avx512 dpdk"
artifacts: true
Expand Down
42 changes: 25 additions & 17 deletions .gitlab/run_viavi_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,22 @@
DEFAULT_BUILD_ARGS = '-DCMAKE_BUILD_TYPE=Release -DFORCE_DEBUG_INFO=True -DENABLE_UHD=False -DENABLE_DPDK=True -DENABLE_ZEROMQ=False -DMARCH="x86-64-v4"'
DEFAULT_DPDK_VERSION = "23.11.1_avx512"


# pylint: disable=too-many-instance-attributes
@dataclass
class _TestDefinition:
"""
"""
""" """

campaign_filename: str = ""
id: str = ""
campaign_filename: str = ""
test_name: str = ""
description: str = ""


# pylint: disable=too-many-instance-attributes
@dataclass
class _ArgsDefinition:
"""
"""
""" """

testlist: bool = False
token: str = ""
Expand All @@ -46,20 +47,25 @@ class _ArgsDefinition:
build_args: str = DEFAULT_BUILD_ARGS
dpdk_version: str = DEFAULT_DPDK_VERSION


def get_viavi_tests():
viavi_test_declaration = (pathlib.Path(__file__).parent / '..' / 'tests' / 'e2e' / 'tests' / 'viavi' / 'test_declaration.yml').resolve()
with open(viavi_test_declaration, 'r') as file:
viavi_test_declaration = (
pathlib.Path(__file__).parent / ".." / "tests" / "e2e" / "tests" / "viavi" / "test_declaration.yml"
).resolve()
with open(viavi_test_declaration, "r", encoding="utf-8") as file:
data = yaml.safe_load(file)

test_list : List[_TestDefinition] = []
for test in data['tests']:
test_list: List[_TestDefinition] = []
for test in data["tests"]:
test_definition = _TestDefinition()
test_definition.campaign_filename = test['campaign_filename']
test_definition.id = test['id']
test_definition.description = test.get('description', '')
test_definition.id = test["id"]
test_definition.campaign_filename = test["campaign_filename"]
test_definition.test_name = test["test_name"]
test_definition.description = test.get("description", "")
test_list.append(test_definition)
return test_list


def validate_args(args) -> _ArgsDefinition:
args_definition = _ArgsDefinition()
args_definition.testlist = args.testlist
Expand Down Expand Up @@ -87,6 +93,7 @@ def validate_args(args) -> _ArgsDefinition:
exit(1)
return args_definition


def show_test_list():
test_list = get_viavi_tests()
print("Available tests:")
Expand Down Expand Up @@ -114,7 +121,7 @@ def run_test(args_definition: _ArgsDefinition, test_definition: _TestDefinition)
TESTBED = "viavi"
MARKERS = "viavi_manual"

PYARGS = f'--viavi-manual-campaign-filename "{test_definition.campaign_filename}" --viavi-manual-test-name "{test_definition.id}" --viavi-manual-test-timeout {timeout} --retina-pod-timeout 900'
PYARGS = f'--viavi-manual-campaign-filename "{test_definition.campaign_filename}" --viavi-manual-test-name "{test_definition.test_name}" --viavi-manual-test-timeout {timeout} --retina-pod-timeout 900'
if args_definition.gnb_extra:
PYARGS += f' --viavi-manual-extra-gnb-arguments "{args_definition.gnb_extra}"'

Expand Down Expand Up @@ -153,6 +160,8 @@ def run_test(args_definition: _ArgsDefinition, test_definition: _TestDefinition)
pipeline_url = pipeline.web_url

print(f"Pipeline created: {pipeline_url}")


def main():
"""
Entrypoint runner.
Expand All @@ -173,7 +182,7 @@ def main():

parser.add_argument(
"--testid",
help='[REQUIRED] Testid in the campaign.',
help="[REQUIRED] Testid in the campaign.",
)

parser.add_argument(
Expand All @@ -194,9 +203,7 @@ def main():
default=DEFAULT_DPDK_VERSION,
)

parser.add_argument(
"--timeout", help="Timeout in seconds for the test"
)
parser.add_argument("--timeout", help="Timeout in seconds for the test")

args_definition = validate_args(parser.parse_args())
if args_definition.testlist:
Expand All @@ -211,5 +218,6 @@ def main():
print(f"Testid {args_definition.testid} not found.")
exit(1)


if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ std::vector<o_du_high_unit> srsran::make_multicell_with_multi_du(const o_du_high
tmp_cfg.du_high_cfg.config.cells_cfg.resize(1);
tmp_cfg.du_high_cfg.config.cells_cfg[0] = du_hi.cells_cfg[i];
tmp_cfg.fapi_cfg = o_du_high_unit_cfg.fapi_cfg;
tmp_cfg.e2_cfg = o_du_high_unit_cfg.e2_cfg;
srs_du::o_du_high_dependencies sector_deps;
sector_deps.sectors.push_back(dependencies.o_du_hi_dependencies.sectors[i]);

Expand Down
4 changes: 2 additions & 2 deletions lib/e2/common/e2_entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ using namespace srsran;
using namespace asn1::e2ap;
using metrics_interface = std::variant<e2_du_metrics_interface*, e2_cu_metrics_interface*>;

e2_entity::e2_entity(const e2ap_configuration& cfg_,
e2_entity::e2_entity(const e2ap_configuration cfg_,
e2_connection_client& e2_client_,
metrics_interface e2_metrics_,
srs_du::f1ap_ue_id_translator* f1ap_ue_id_translator_,
Expand Down Expand Up @@ -76,7 +76,7 @@ e2_entity::e2_entity(const e2ap_configuration& cfg_,
e2sm_mngr->add_e2sm_service(e2sm_rc_asn1_packer::oid, std::move(e2sm_rc_iface));
}

e2ap = std::make_unique<e2_impl>(cfg_, *this, timers_, e2_client_, *subscription_mngr, *e2sm_mngr, task_exec_);
e2ap = std::make_unique<e2_impl>(cfg, *this, timers_, e2_client_, *subscription_mngr, *e2sm_mngr, task_exec_);
}

void e2_entity::build_e2_kpm_du(metrics_interface e2_metrics_, srs_du::f1ap_ue_id_translator* f1ap_ue_id_translator)
Expand Down
6 changes: 3 additions & 3 deletions lib/e2/common/e2_entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace srsran {
class e2_entity final : public e2_agent
{
public:
e2_entity(const e2ap_configuration& cfg_,
e2_entity(const e2ap_configuration cfg_,
e2_connection_client& e2_client_,
std::variant<e2_du_metrics_interface*, e2_cu_metrics_interface*> e2_metrics_,
srs_du::f1ap_ue_id_translator* f1ap_ue_id_translator_,
Expand All @@ -62,8 +62,8 @@ class e2_entity final : public e2_agent
void on_e2_disconnection() override;

private:
srslog::basic_logger& logger;
const e2ap_configuration& cfg;
srslog::basic_logger& logger;
const e2ap_configuration cfg;

void build_e2_kpm_du(std::variant<e2_du_metrics_interface*, e2_cu_metrics_interface*> e2_metrics_,
srs_du::f1ap_ue_id_translator* f1ap_ue_id_translator);
Expand Down
6 changes: 3 additions & 3 deletions lib/e2/e2sm/e2sm_kpm/e2sm_kpm_du_meas_provider_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ e2sm_kpm_du_meas_provider_impl::e2sm_kpm_du_meas_provider_impl(srs_du::f1ap_ue_i
e2sm_kpm_supported_metric_t{
NO_LABEL, ALL_LEVELS, true, &e2sm_kpm_du_meas_provider_impl::get_drb_ul_rlc_sdu_latency});

supported_metrics.emplace(
"RACH.PreambleDedCell",
e2sm_kpm_supported_metric_t{NO_LABEL, ALL_LEVELS, true, &e2sm_kpm_du_meas_provider_impl::get_prach_cell_count});
supported_metrics.emplace("RACH.PreambleDedCell",
e2sm_kpm_supported_metric_t{
NO_LABEL, E2_NODE_LEVEL, true, &e2sm_kpm_du_meas_provider_impl::get_prach_cell_count});

// Check if the supported metrics are matching e2sm_kpm metrics definitions.
check_e2sm_kpm_metrics_definitions(get_e2sm_kpm_28_552_metrics());
Expand Down
2 changes: 1 addition & 1 deletion lib/ofh/receiver/ofh_closed_rx_window_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void closed_rx_window_handler::handle_prach_context(slot_symbol_point symbol_poi

if (log_unreceived_messages) {
logger.warning("Missed incoming User-Plane PRACH messages for slot '{}' and sector#{}",
ctx_value.context.sector,
ctx_value.context.slot,
ctx_value.context.sector);
}

Expand Down
20 changes: 16 additions & 4 deletions tests/benchmarks/pdcp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,22 @@ include_directories(../../..)

add_executable(pdcp_tx_benchmark pdcp_tx_benchmark.cpp)
target_link_libraries(pdcp_tx_benchmark srsran_pdcp srsran_security srslog)
add_test(pdcp_tx_benchmark pdcp_tx_benchmark)
set_tests_properties(pdcp_tx_benchmark PROPERTIES LABELS "tsan")
add_test(pdcp_tx_benchmark_nea0 pdcp_tx_benchmark -a0 -R3)
add_test(pdcp_tx_benchmark_nea1 pdcp_tx_benchmark -a1 -R1)
add_test(pdcp_tx_benchmark_nea2 pdcp_tx_benchmark -a2 -R3)
add_test(pdcp_tx_benchmark_nea3 pdcp_tx_benchmark -a3 -R1)
set_tests_properties(pdcp_tx_benchmark_nea0 PROPERTIES LABELS "tsan")
set_tests_properties(pdcp_tx_benchmark_nea1 PROPERTIES LABELS "tsan")
set_tests_properties(pdcp_tx_benchmark_nea2 PROPERTIES LABELS "tsan")
set_tests_properties(pdcp_tx_benchmark_nea3 PROPERTIES LABELS "tsan")

add_executable(pdcp_rx_benchmark pdcp_rx_benchmark.cpp)
target_link_libraries(pdcp_rx_benchmark srsran_pdcp srsran_security srslog)
add_test(pdcp_rx_benchmark pdcp_rx_benchmark)
set_tests_properties(pdcp_rx_benchmark PROPERTIES LABELS "tsan")
add_test(pdcp_rx_benchmark_nea0 pdcp_rx_benchmark -a0 -R3)
add_test(pdcp_rx_benchmark_nea1 pdcp_rx_benchmark -a1 -R1)
add_test(pdcp_rx_benchmark_nea2 pdcp_rx_benchmark -a2 -R3)
add_test(pdcp_rx_benchmark_nea3 pdcp_rx_benchmark -a3 -R1)
set_tests_properties(pdcp_rx_benchmark_nea0 PROPERTIES LABELS "tsan")
set_tests_properties(pdcp_rx_benchmark_nea1 PROPERTIES LABELS "tsan")
set_tests_properties(pdcp_rx_benchmark_nea2 PROPERTIES LABELS "tsan")
set_tests_properties(pdcp_rx_benchmark_nea3 PROPERTIES LABELS "tsan")
2 changes: 1 addition & 1 deletion tests/benchmarks/pdcp/pdcp_rx_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class pdcp_rx_test_frame : public pdcp_tx_status_handler,
};

struct bench_params {
unsigned nof_repetitions = 8;
unsigned nof_repetitions = 10;
unsigned nof_crypto_threads = 8;
unsigned crypto_queue_size = 4096;
bool print_timing_info = false;
Expand Down
2 changes: 1 addition & 1 deletion tests/benchmarks/pdcp/pdcp_tx_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class pdcp_tx_gen_frame : public pdcp_tx_lower_notifier, public pdcp_tx_upper_co
};

struct bench_params {
unsigned nof_repetitions = 8;
unsigned nof_repetitions = 10;
bool print_timing_info = false;
unsigned nof_sdus = 1024;
unsigned sdu_len = 1500;
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/tests/viavi.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ def get_viavi_configuration_from_testname(
"""
Get Viavi configuration from dict
"""
test_declaration = None
config = load_yaml_config("test_declaration.yml")
for test_config in config:
if test_config.test_name == test_name:
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/viavi/test_declaration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

campaign_filename: &campaign_filename "C:\\ci\\CI 4x4 ORAN-FH-complete.xml"
gnb_extra_commands: &gnb_extra_commands "log --metrics_level=info metrics --rlc_report_period=1000"
gnb_extra_commands_no_warn: &gnb_extra_commands_no_warn "log --all_level=error metrics --stdout_metrics_period=5000 --rlc_report_period=5000"
gnb_extra_commands_no_warn: &gnb_extra_commands_no_warn "log --all_level=error metrics --sched_report_period=5000 --rlc_report_period=5000"

test_timeout: &test_timeout 2400

Expand Down

0 comments on commit e5d5b44

Please sign in to comment.