Skip to content

Commit

Permalink
Update main
Browse files Browse the repository at this point in the history
  • Loading branch information
codebot committed Apr 17, 2024
2 parents 8f2a3ea + 5ff8aa1 commit c9e26f5
Show file tree
Hide file tree
Showing 171 changed files with 2,941 additions and 918 deletions.
2 changes: 2 additions & 0 deletions .gitlab/ci/build.yml
Expand Up @@ -1777,6 +1777,8 @@ basic avx512 dpdk:
extends: .build_and_unit
rules:
- if: $CI_DESCRIPTION =~ /Nightly E2E Tests/
when: delayed
start_in: 2 hours
retry: 2
interruptible: false
variables:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/e2e.yml
Expand Up @@ -502,7 +502,7 @@ viavi:
MARKERS: "viavi"
E2E_LOG_LEVEL: "warning"
KUBECONFIG_VAR_NAME: "RETINA_NAMESPACE_KUBECONFIG"
RETINA_ARGS: "gnb.all.metrics_enable=True"
RETINA_ARGS: "gnb.all.metrics_enable=True gnb.all.pcap=True gnb.all.rlc_enable=True gnb.all.rlc_rb_type=srb"
needs:
- job: "basic avx512 dpdk"
artifacts: true
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/e2e/.env
@@ -1,6 +1,6 @@
SRSGNB_REGISTRY_URI=registry.gitlab.com/softwareradiosystems/srsgnb
RETINA_REGISTRY_PREFIX=registry.gitlab.com/softwareradiosystems/ci/retina
RETINA_VERSION=0.46.13
RETINA_VERSION=0.46.16
UBUNTU_VERSION=24.04
AMARISOFT_VERSION=2023-09-08
SRSUE_VERSION=23.11
Expand Down
2 changes: 2 additions & 0 deletions .gitlab/ci/e2e/retina_request_zmq_srsue.yml
Expand Up @@ -22,6 +22,8 @@
ephemeral-storage:
requests: "6G"
limits: "6G"
environment:
- RETINA_AGENT_ARGS: --grpc.max_size_file_artifact 209715200

- name: srs-gnb
type: gnb
Expand Down
3 changes: 3 additions & 0 deletions .gitlab/configuration.json
Expand Up @@ -12,6 +12,9 @@
"protected_branches": [],
"rule_type": "any_approver",
"users": []
},
{
"name": "release freeze"
}
],
"approvals": {
Expand Down
1 change: 1 addition & 0 deletions apps/examples/du/phy_factory.cpp
Expand Up @@ -101,6 +101,7 @@ std::unique_ptr<upper_phy> srsran::create_upper_phy(const upper_phy_params&
upper_config.pusch_executor = ul_executor;
upper_config.pusch_decoder_executor = nullptr;
upper_config.prach_executor = ul_executor;
upper_config.srs_executor = ul_executor;
upper_config.rx_symbol_request_notifier = rx_symbol_request_notifier;
upper_config.crc_calculator_type = "auto";
upper_config.ldpc_rate_dematcher_type = "auto";
Expand Down
5 changes: 5 additions & 0 deletions apps/examples/phy/radio_ssb.cpp
Expand Up @@ -36,6 +36,7 @@
#include "upper_phy_ssb_example.h"
#include "srsran/adt/spsc_queue.h"
#include "srsran/phy/adapters/phy_error_adapter.h"
#include "srsran/phy/adapters/phy_metrics_adapter.h"
#include "srsran/phy/adapters/phy_rg_gateway_adapter.h"
#include "srsran/phy/adapters/phy_rx_symbol_adapter.h"
#include "srsran/phy/adapters/phy_rx_symbol_request_adapter.h"
Expand Down Expand Up @@ -430,6 +431,7 @@ lower_phy_configuration create_lower_phy_configuration(task_executor*
task_executor* dl_task_executor,
task_executor* prach_task_executor,
lower_phy_error_notifier* error_notifier,
lower_phy_metrics_notifier* metrics_notifier,
lower_phy_rx_symbol_notifier* rx_symbol_notifier,
lower_phy_timing_notifier* timing_notifier,
srslog::basic_logger* logger)
Expand All @@ -447,6 +449,7 @@ lower_phy_configuration create_lower_phy_configuration(task_executor*
phy_config.rx_symbol_notifier = rx_symbol_notifier;
phy_config.timing_notifier = timing_notifier;
phy_config.error_notifier = error_notifier;
phy_config.metric_notifier = metrics_notifier;
phy_config.rx_task_executor = rx_task_executor;
phy_config.tx_task_executor = tx_task_executor;
phy_config.ul_task_executor = ul_task_executor;
Expand Down Expand Up @@ -592,6 +595,7 @@ int main(int argc, char** argv)

// Create adapters.
phy_error_adapter error_adapter(logger);
phy_metrics_adapter metrics_adapter;
phy_rx_symbol_adapter rx_symbol_adapter;
phy_rg_gateway_adapter rg_gateway_adapter;
phy_timing_adapter timing_adapter;
Expand All @@ -606,6 +610,7 @@ int main(int argc, char** argv)
dl_task_executor.get(),
prach_task_executor.get(),
&error_adapter,
&metrics_adapter,
&rx_symbol_adapter,
&timing_adapter,
&logger);
Expand Down
1 change: 1 addition & 0 deletions apps/examples/radio/rx_power_analyzer.cpp
Expand Up @@ -45,6 +45,7 @@
#include "srsran/support/executors/task_worker.h"
#include "srsran/support/file_sink.h"
#include <csignal>
#include <getopt.h>
#include <random>

using namespace srsran;
Expand Down
4 changes: 2 additions & 2 deletions apps/gnb/gnb_appconfig.h
Expand Up @@ -212,7 +212,7 @@ struct pdsch_appconfig {
/// retransmission is cancelled.
uint8_t harq_la_ri_drop_threshold{1};
/// Position for additional DM-RS in DL, see Tables 7.4.1.1.2-3 and 7.4.1.1.2-4 in TS 38.211.
uint8_t dmrs_add_pos{1};
unsigned dmrs_add_pos{2};
};

/// PUSCH application configuration.
Expand Down Expand Up @@ -270,7 +270,7 @@ struct pusch_appconfig {
/// Maximum CQI offset that the OLLA algorithm can apply to the reported CQI.
float olla_max_snr_offset{5.0};
/// Position for additional DM-RS in UL (see TS 38.211, clause 6.4.1.1.3).
uint8_t dmrs_add_pos{2};
unsigned dmrs_add_pos{2};
};

struct pucch_appconfig {
Expand Down
Expand Up @@ -38,6 +38,7 @@ static du_low_configuration create_du_low_config(const gnb_appconfig&
task_executor* pusch_executor,
task_executor* pusch_decoder_executor,
task_executor* prach_executor,
task_executor* srs_executor,
task_executor* pdsch_codeblock_executor,
upper_phy_rx_symbol_request_notifier* rx_symbol_request_notifier)
{
Expand Down Expand Up @@ -78,6 +79,7 @@ static du_low_configuration create_du_low_config(const gnb_appconfig&
cfg.pusch_executor = pusch_executor;
cfg.pusch_decoder_executor = pusch_decoder_executor;
cfg.prach_executor = prach_executor;
cfg.srs_executor = srs_executor;
cfg.rx_symbol_request_notifier = rx_symbol_request_notifier;
cfg.crc_calculator_type = "auto";
cfg.ldpc_rate_dematcher_type = "auto";
Expand Down Expand Up @@ -150,6 +152,7 @@ std::vector<std::unique_ptr<du>> srsran::make_gnb_dus(const gnb_appconfig&
workers.upper_pusch_exec[i],
workers.upper_pusch_decoder_exec[i],
workers.upper_prach_exec[i],
workers.upper_srs_exec[i],
workers.upper_pdsch_exec[i],
&rx_symbol_request_notifier);
// DU-high configuration.
Expand Down
5 changes: 5 additions & 0 deletions apps/services/console_helper.cpp
Expand Up @@ -357,6 +357,10 @@ void console_helper::handle_command(const std::string& command)
} else if (arg_list.front() == "log") {
arg_list.pop_front();
handle_log_command(arg_list);
} else if (arg_list.front() == "ru_metrics") {
if (radio_controller.has_value()) {
radio_controller.value()->print_metrics();
}
} else if (arg_list.front() == "sleep") {
arg_list.pop_front();
handle_sleep_command(arg_list);
Expand All @@ -379,6 +383,7 @@ void console_helper::print_help()
fmt::print("\t Allowed channels are: {}\n", span<const std::string>(dynamic_log_channels));
fmt::print("\t Note: Certain log messages might not be available if they depend on\n");
fmt::print("\t logging decorators that are not instanced with the initial log level.\n");
fmt::print("\tru_metrics: Prints RU metrics once.\n");
fmt::print("\tsleep <seconds>: stops the execution of console sequential commands for the specified time\n");
fmt::print("\tho <serving pci> <rnti> <target pci>: force UE handover\n");
fmt::print("\n");
Expand Down
15 changes: 9 additions & 6 deletions apps/services/worker_manager.cpp
Expand Up @@ -386,6 +386,7 @@ void worker_manager::create_du_low_executors(bool is_block
for (unsigned cell_id = 0, cell_end = cells_cfg.size(); cell_id != cell_end; ++cell_id) {
upper_pusch_exec.push_back(exec_mng.executors().at("phy_exec"));
upper_pucch_exec.push_back(exec_mng.executors().at("phy_exec"));
upper_srs_exec.push_back(exec_mng.executors().at("phy_exec"));
upper_prach_exec.push_back(exec_mng.executors().at("phy_exec"));
upper_pdsch_exec.push_back(exec_mng.executors().at("phy_exec"));
du_low_dl_executors[cell_id].emplace_back(exec_mng.executors().at("phy_exec"));
Expand All @@ -409,14 +410,16 @@ void worker_manager::create_du_low_executors(bool is_block
}

// Instantiate PHY UL workers.
create_worker_pool(name_ul,
nof_ul_workers,
task_worker_queue_size,
{{"upper_pusch_exec#" + cell_id_str}, {"upper_pucch_exec#" + cell_id_str}},
prio,
ul_cpu_masks);
create_worker_pool(
name_ul,
nof_ul_workers,
task_worker_queue_size,
{{"upper_pusch_exec#" + cell_id_str}, {"upper_pucch_exec#" + cell_id_str}, {"upper_srs_exec#" + cell_id_str}},
prio,
ul_cpu_masks);
upper_pusch_exec.push_back(exec_mng.executors().at("upper_pusch_exec#" + cell_id_str));
upper_pucch_exec.push_back(exec_mng.executors().at("upper_pucch_exec#" + cell_id_str));
upper_srs_exec.push_back(exec_mng.executors().at("upper_srs_exec#" + cell_id_str));

// Instantiate dedicated PRACH worker.
const std::string name_prach = "phy_prach#" + cell_id_str;
Expand Down
1 change: 1 addition & 0 deletions apps/services/worker_manager.h
Expand Up @@ -62,6 +62,7 @@ struct worker_manager {
std::vector<task_executor*> upper_pusch_decoder_exec;
std::vector<task_executor*> upper_pucch_exec;
std::vector<task_executor*> upper_prach_exec;
std::vector<task_executor*> upper_srs_exec;
std::vector<task_executor*> upper_pdsch_exec;
task_executor* radio_exec = nullptr;
task_executor* ru_printer_exec = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Expand Up @@ -33,7 +33,7 @@ services:
- ${OPEN_5GS_ENV_FILE:-open5gs/open5gs.env}
privileged: true
ports:
- "3000:3000/tcp"
- "9999:9999/tcp"
# Uncomment port to use the 5gc from outside the docker network
# - "38412:38412/sctp"
command: 5gc -c open5gs-5gc.yml
Expand Down
4 changes: 2 additions & 2 deletions docker/open5gs/README.md
Expand Up @@ -58,7 +58,7 @@ You can overwrite open5gs version by adding `--build-arg OPEN5GS_VERSION=v2.6.6`

Then run the docker container with:

`docker run --net open5gsnet --ip 10.53.1.2 --env-file open5gs.env --privileged --publish 3000:3000 open5gs-docker ./build/tests/app/5gc -c open5gs-5gc.yml`
`docker run --net open5gsnet --ip 10.53.1.2 --env-file open5gs.env --privileged --publish 9999:9999 open5gs-docker ./build/tests/app/5gc -c open5gs-5gc.yml`

To use this container with srsgnb, the `addr` option under `amf` section in gnb configuration must be set OPEN5GS_IP (here: 10.53.1.2).
It could also be required to modify `bind_addr` option under `amf` section in gnb configuration to the local ethernet/wifi IP address for the host or container where gnb is running, not a localhost IP.
Expand All @@ -69,4 +69,4 @@ To ping a connected UE setup the necessary route to the UE_IP_BASE + ".0/24" (he

## Note

The Open5GS WebUI to manually add/change UEs to the mongodb can be accessed at [localhost:3000](localhost:3000).
The Open5GS WebUI to manually add/change UEs to the mongodb can be accessed at [localhost:9999](localhost:9999).
69 changes: 69 additions & 0 deletions include/srsran/cu_cp/cu_cp_configuration_helpers.h
Expand Up @@ -45,6 +45,75 @@ inline srs_cu_cp::cu_cp_configuration make_default_cu_cp_config()
inline std::map<five_qi_t, srs_cu_cp::cu_cp_qos_config> make_default_cu_cp_qos_config_list()
{
std::map<five_qi_t, srs_cu_cp::cu_cp_qos_config> qos_list = {};
{
// 5QI=1
srs_cu_cp::cu_cp_qos_config cfg{};
pdcp_config pdcp_cfg{};

pdcp_cfg.rb_type = pdcp_rb_type::drb;
pdcp_cfg.rlc_mode = pdcp_rlc_mode::um;
pdcp_cfg.ciphering_required = true;
pdcp_cfg.integrity_protection_required = false;

// > Tx
pdcp_cfg.tx.sn_size = pdcp_sn_size::size12bits;
pdcp_cfg.tx.discard_timer = pdcp_discard_timer::infinity;
pdcp_cfg.tx.status_report_required = false;

// > Rx
pdcp_cfg.rx.sn_size = pdcp_sn_size::size12bits;
pdcp_cfg.rx.out_of_order_delivery = false;
pdcp_cfg.rx.t_reordering = pdcp_t_reordering::ms80;

cfg.pdcp = pdcp_cfg;
qos_list[uint_to_five_qi(1)] = cfg;
}
{
// 5QI=2
srs_cu_cp::cu_cp_qos_config cfg{};
pdcp_config pdcp_cfg{};

pdcp_cfg.rb_type = pdcp_rb_type::drb;
pdcp_cfg.rlc_mode = pdcp_rlc_mode::um;
pdcp_cfg.ciphering_required = true;
pdcp_cfg.integrity_protection_required = false;

// > Tx
pdcp_cfg.tx.sn_size = pdcp_sn_size::size12bits;
pdcp_cfg.tx.discard_timer = pdcp_discard_timer::infinity;
pdcp_cfg.tx.status_report_required = false;

// > Rx
pdcp_cfg.rx.sn_size = pdcp_sn_size::size12bits;
pdcp_cfg.rx.out_of_order_delivery = false;
pdcp_cfg.rx.t_reordering = pdcp_t_reordering::ms80;

cfg.pdcp = pdcp_cfg;
qos_list[uint_to_five_qi(2)] = cfg;
}
{
// 5QI=5
srs_cu_cp::cu_cp_qos_config cfg{};
pdcp_config pdcp_cfg{};

pdcp_cfg.rb_type = pdcp_rb_type::drb;
pdcp_cfg.rlc_mode = pdcp_rlc_mode::am;
pdcp_cfg.ciphering_required = true;
pdcp_cfg.integrity_protection_required = false;

// > Tx
pdcp_cfg.tx.sn_size = pdcp_sn_size::size12bits;
pdcp_cfg.tx.discard_timer = pdcp_discard_timer::infinity;
pdcp_cfg.tx.status_report_required = false;

// > Rx
pdcp_cfg.rx.sn_size = pdcp_sn_size::size12bits;
pdcp_cfg.rx.out_of_order_delivery = false;
pdcp_cfg.rx.t_reordering = pdcp_t_reordering::ms80;

cfg.pdcp = pdcp_cfg;
qos_list[uint_to_five_qi(5)] = cfg;
}
{
// 5QI=7
srs_cu_cp::cu_cp_qos_config cfg{};
Expand Down
10 changes: 5 additions & 5 deletions include/srsran/cu_cp/cu_cp_types.h
Expand Up @@ -412,14 +412,13 @@ struct cu_cp_pdu_session_res_release_resp_transfer {

struct cu_cp_pdu_session_res_released_item_rel_res {
pdu_session_id_t pdu_session_id = pdu_session_id_t::invalid;
cu_cp_pdu_session_res_release_resp_transfer pdu_session_res_release_resp_transfer;
cu_cp_pdu_session_res_release_resp_transfer resp_transfer;
};

struct cu_cp_pdu_session_resource_release_response {
slotted_id_vector<pdu_session_id_t, cu_cp_pdu_session_res_released_item_rel_res>
pdu_session_res_released_list_rel_res;
optional<cu_cp_user_location_info_nr> user_location_info;
optional<crit_diagnostics_t> crit_diagnostics;
slotted_id_vector<pdu_session_id_t, cu_cp_pdu_session_res_released_item_rel_res> released_pdu_sessions;
optional<cu_cp_user_location_info_nr> user_location_info;
optional<crit_diagnostics_t> crit_diagnostics;
};

using cu_cp_qos_flow_add_or_mod_item = qos_flow_setup_request_item;
Expand Down Expand Up @@ -480,6 +479,7 @@ struct cu_cp_pdu_session_resource_modify_response {
struct cu_cp_ue_context_release_command {
ue_index_t ue_index = ue_index_t::invalid;
ngap_cause_t cause;
bool requires_rrc_release = true;
};

struct cu_cp_ue_context_release_request {
Expand Down
2 changes: 0 additions & 2 deletions include/srsran/cu_cp/up_resource_manager.h
Expand Up @@ -87,8 +87,6 @@ struct up_pdu_session_context_update {
// resource manager. For removal of PDU sessions or DRBs only the respective identifiers are included.
struct up_config_update {
bool initial_context_creation = true; // True if this is the first PDU session to be created.
bool context_removal_required =
false; // Set to true if all UP resources will be removed and the context can be deleted.
std::map<pdu_session_id_t, up_pdu_session_context_update>
pdu_sessions_to_setup_list; // List of PDU sessions to be added.
std::map<pdu_session_id_t, up_pdu_session_context_update>
Expand Down
27 changes: 27 additions & 0 deletions include/srsran/cu_up/cu_up_configuration_helpers.h
Expand Up @@ -34,6 +34,33 @@ inline std::map<five_qi_t, srs_cu_up::cu_up_qos_config>
make_default_cu_up_qos_config_list(bool warn_on_drop, timer_duration metrics_period)
{
std::map<five_qi_t, srs_cu_up::cu_up_qos_config> qos_list = {};
{
// 5QI=1
srs_cu_up::cu_up_qos_config cfg{};
cfg.pdcp_custom_cfg = pdcp_custom_config{}; // defaults are configured as member-initialization within the struct
cfg.pdcp_custom_cfg.metrics_period = metrics_period;
cfg.pdcp_custom_cfg.tx.warn_on_drop = warn_on_drop;

qos_list[uint_to_five_qi(1)] = cfg;
}
{
// 5QI=2
srs_cu_up::cu_up_qos_config cfg{};
cfg.pdcp_custom_cfg = pdcp_custom_config{}; // defaults are configured as member-initialization within the struct
cfg.pdcp_custom_cfg.metrics_period = metrics_period;
cfg.pdcp_custom_cfg.tx.warn_on_drop = warn_on_drop;

qos_list[uint_to_five_qi(2)] = cfg;
}
{
// 5QI=5
srs_cu_up::cu_up_qos_config cfg{};
cfg.pdcp_custom_cfg = pdcp_custom_config{}; // defaults are configured as member-initialization within the struct
cfg.pdcp_custom_cfg.metrics_period = metrics_period;
cfg.pdcp_custom_cfg.tx.warn_on_drop = warn_on_drop;

qos_list[uint_to_five_qi(5)] = cfg;
}
{
// 5QI=7
srs_cu_up::cu_up_qos_config cfg{};
Expand Down

0 comments on commit c9e26f5

Please sign in to comment.