Backport misc changes from the fapi repo.

master
faluco 4 years ago committed by Ismael Gomez
parent 88611fe0ab
commit 92b11c1adb

@ -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 {

@ -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",

@ -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());

@ -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"

@ -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 = {};

@ -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 <typename ASN1Type>
bool unpack_asn1(ASN1Type& asn1obj, srslte::const_byte_span pdu)

Loading…
Cancel
Save