diff --git a/lib/src/common/threads.c b/lib/src/common/threads.c index e31592f3e..8d37a6406 100644 --- a/lib/src/common/threads.c +++ b/lib/src/common/threads.c @@ -80,7 +80,7 @@ bool threads_new_rt_cpu(pthread_t* thread, void* (*start_routine)(void*), void* #else // All threads have normal priority except prio_offset=0,1,2,3,4 if (prio_offset >= 0 && prio_offset < 5) { - param.sched_priority = 50 - prio_offset; + param.sched_priority = sched_get_priority_max(SCHED_FIFO) - prio_offset; if (pthread_attr_init(&attr)) { perror("pthread_attr_init"); } else { diff --git a/lib/src/upper/rlc_tm.cc b/lib/src/upper/rlc_tm.cc index 5b5de2976..9a40ae19b 100644 --- a/lib/src/upper/rlc_tm.cc +++ b/lib/src/upper/rlc_tm.cc @@ -140,9 +140,9 @@ int rlc_tm::read_pdu(uint8_t* payload, uint32_t nof_bytes) if (ul_queue.try_read(&buf)) { pdu_size = buf->N_bytes; memcpy(payload, buf->msg, buf->N_bytes); - log->debug("%s Complete SDU scheduled for tx. Stack latency: %ld us\n", + log->debug("%s Complete SDU scheduled for tx. Stack latency: %" PRIu64 " us\n", rrc->get_rb_name(lcid).c_str(), - buf->get_latency_us().count()); + (uint64_t)buf->get_latency_us().count()); log->info_hex(payload, pdu_size, "%s Tx %s PDU, queue size=%d, bytes=%d", diff --git a/lib/src/upper/rlc_um_lte.cc b/lib/src/upper/rlc_um_lte.cc index 0211df507..75addfecd 100644 --- a/lib/src/upper/rlc_um_lte.cc +++ b/lib/src/upper/rlc_um_lte.cc @@ -148,9 +148,9 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* #ifdef ENABLE_TIMESTAMP auto latency_us = tx_sdu->get_latency_us().count(); mean_pdu_latency_us.push(latency_us); - log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", + log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %" PRIu64 "/%ld us\n", rb_name.c_str(), - latency_us, + (uint64_t)latency_us, (long)mean_pdu_latency_us.value()); #else log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); @@ -187,9 +187,9 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* #ifdef ENABLE_TIMESTAMP auto latency_us = tx_sdu->get_latency_us().count(); mean_pdu_latency_us.push(latency_us); - log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", + log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %" PRIu64 "/%ld us\n", rb_name.c_str(), - latency_us, + (uint64_t)latency_us, (long)mean_pdu_latency_us.value()); #else log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); diff --git a/srsenb/hdr/stack/enb_stack_lte.h b/srsenb/hdr/stack/enb_stack_lte.h index cd0c88cf6..8929bbfc6 100644 --- a/srsenb/hdr/stack/enb_stack_lte.h +++ b/srsenb/hdr/stack/enb_stack_lte.h @@ -27,7 +27,6 @@ #include "upper/s1ap.h" #include "enb_stack_base.h" -#include "srsenb/hdr/enb.h" #include "srslte/interfaces/enb_interfaces.h" #include "srslte/interfaces/enb_rrc_interface_types.h" diff --git a/srsenb/test/upper/test_helpers.cc b/srsenb/test/upper/test_helpers.cc index eacfc21e0..70012ee38 100644 --- a/srsenb/test/upper/test_helpers.cc +++ b/srsenb/test/upper/test_helpers.cc @@ -23,6 +23,25 @@ srslte::LOG_LEVEL_ENUM log_level; namespace test_helpers { +int parse_default_cfg_phy(rrc_cfg_t* rrc_cfg, phy_cfg_t* phy_cfg, srsenb::all_args_t& args) +{ + *rrc_cfg = {}; + args.enb_files.sib_config = argparse::repository_dir + "/sib.conf.example"; + args.enb_files.rr_config = argparse::repository_dir + "/rr.conf.example"; + args.enb_files.drb_config = argparse::repository_dir + "/drb.conf.example"; + srslte::logmap::get("TEST")->debug("sib file path=%s\n", args.enb_files.sib_config.c_str()); + + args.enb.enb_id = 0x19B; + TESTASSERT(srslte::string_to_mcc("001", &args.stack.s1ap.mcc)); + TESTASSERT(srslte::string_to_mnc("01", &args.stack.s1ap.mnc)); + args.general.eia_pref_list = "EIA2, EIA1, EIA0"; + args.general.eea_pref_list = "EEA0, EEA2, EEA1"; + + args.general.rrc_inactivity_timer = 60000; + + return enb_conf_sections::parse_cfg_files(&args, rrc_cfg, phy_cfg); +} + int parse_default_cfg(rrc_cfg_t* rrc_cfg, srsenb::all_args_t& args) { args = {}; diff --git a/srsenb/test/upper/test_helpers.h b/srsenb/test/upper/test_helpers.h index 1ccc7f18f..d9b1e8014 100644 --- a/srsenb/test/upper/test_helpers.h +++ b/srsenb/test/upper/test_helpers.h @@ -209,6 +209,7 @@ public: namespace test_helpers { int parse_default_cfg(rrc_cfg_t* rrc_cfg, srsenb::all_args_t& args); +int parse_default_cfg_phy(rrc_cfg_t* rrc_cfg, phy_cfg_t* phy_cfg, srsenb::all_args_t& args); template bool unpack_asn1(ASN1Type& asn1obj, srslte::const_byte_span pdu)