From a5c0f96fa7bc74c9b70c3f0b01d5a002e8db688e Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Tue, 23 Jun 2020 11:29:47 +0200 Subject: [PATCH] srsue: limit sync queue length to 1 for ZMQ radio apply same change that we've done on the eNB also on the UE to avoid the PHY processing TTIs faster than the stack. Without that, we see lots of those in the logs: ... 08:39:17.580325 [STCK] [W] Detected slow task processing (sync_queue_len=7). ... --- srsue/hdr/stack/ue_stack_base.h | 1 + srsue/src/main.cc | 8 ++++++++ srsue/src/stack/ue_stack_lte.cc | 5 ++++- srsue/test/ttcn3/src/ttcn3_dut.cc | 2 ++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/srsue/hdr/stack/ue_stack_base.h b/srsue/hdr/stack/ue_stack_base.h index 5a16b8637..1de62f8a8 100644 --- a/srsue/hdr/stack/ue_stack_base.h +++ b/srsue/hdr/stack/ue_stack_base.h @@ -68,6 +68,7 @@ typedef struct { std::string ue_category_str; nas_args_t nas; gw_args_t gw; + uint32_t sync_queue_size; // Max allowed difference between PHY and Stack clocks (in TTI) bool have_tti_time_stats; } stack_args_t; diff --git a/srsue/src/main.cc b/srsue/src/main.cc index 263283757..6d3d3732b 100644 --- a/srsue/src/main.cc +++ b/srsue/src/main.cc @@ -558,6 +558,14 @@ static int parse_args(all_args_t* args, int argc, char* argv[]) } } + // Set sync queue capacity to 1 for ZMQ + if (args->rf.device_name == "zmq") { + args->stack.sync_queue_size = 1; + } else { + // use default size + args->stack.sync_queue_size = MULTIQUEUE_DEFAULT_CAPACITY; + } + return SRSLTE_SUCCESS; } diff --git a/srsue/src/stack/ue_stack_lte.cc b/srsue/src/stack/ue_stack_lte.cc index 3ca6ad318..b18ffce83 100644 --- a/srsue/src/stack/ue_stack_lte.cc +++ b/srsue/src/stack/ue_stack_lte.cc @@ -49,10 +49,10 @@ ue_stack_lte::ue_stack_lte() : tti_tprof("tti_tprof", "STCK", TTI_STAT_PERIOD) { ue_queue_id = pending_tasks.add_queue(); - sync_queue_id = pending_tasks.add_queue(); gw_queue_id = pending_tasks.add_queue(); stack_queue_id = pending_tasks.add_queue(); background_queue_id = pending_tasks.add_queue(); + // sync_queue is added in init() background_tasks.start(); } @@ -125,6 +125,9 @@ int ue_stack_lte::init(const stack_args_t& args_, srslte::logger* logger_) return SRSLTE_ERROR; } + // add sync queue + sync_queue_id = pending_tasks.add_queue(args.sync_queue_size); + mac.init(phy, &rlc, &rrc, this); rlc.init(&pdcp, &rrc, &timers, 0 /* RB_ID_SRB0 */); pdcp.init(&rlc, &rrc, gw); diff --git a/srsue/test/ttcn3/src/ttcn3_dut.cc b/srsue/test/ttcn3/src/ttcn3_dut.cc index a9c2a6e3d..912bdbaa6 100644 --- a/srsue/test/ttcn3/src/ttcn3_dut.cc +++ b/srsue/test/ttcn3/src/ttcn3_dut.cc @@ -106,6 +106,8 @@ all_args_t parse_args(ttcn3_dut_args_t* args, int argc, char* argv[]) all_args.stack.log.gw_hex_limit = args->log_hex_level; all_args.stack.log.usim_hex_limit = args->log_hex_level; + all_args.stack.sync_queue_size = 1; + return all_args; }