sched,nr: use MAC-NR as prefix for NR scheduler

master
Francisco Paisana 3 years ago committed by Andre Puschmann
parent aabec3d7af
commit e1a4e63ec8

@ -69,7 +69,7 @@ public:
bool pdsch_enabled = true;
bool pusch_enabled = true;
bool auto_refill_buffer = false;
std::string logger_name = "MAC";
std::string logger_name = "MAC-NR";
};
struct ue_cc_cfg_t {

@ -65,7 +65,9 @@ private:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
sched_nr::sched_nr(const sched_cfg_t& sched_cfg) : cfg(sched_cfg), logger(srslog::fetch_basic_logger("MAC-NR")) {}
sched_nr::sched_nr(const sched_cfg_t& sched_cfg) :
cfg(sched_cfg), logger(srslog::fetch_basic_logger(sched_cfg.logger_name))
{}
sched_nr::~sched_nr() {}

@ -17,7 +17,9 @@
namespace srsenb {
namespace sched_nr_impl {
si_sched::si_sched(const bwp_params& bwp_cfg_) : bwp_cfg(&bwp_cfg_), logger(srslog::fetch_basic_logger("MAC")) {}
si_sched::si_sched(const bwp_params& bwp_cfg_) :
bwp_cfg(&bwp_cfg_), logger(srslog::fetch_basic_logger(bwp_cfg_.sched_cfg.logger_name))
{}
void si_sched::run_slot(bwp_slot_allocator& slot_alloc)
{
@ -75,7 +77,9 @@ void si_sched::run_slot(bwp_slot_allocator& slot_alloc)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ra_sched::ra_sched(const bwp_params& bwp_cfg_) : bwp_cfg(&bwp_cfg_), logger(srslog::fetch_basic_logger("MAC")) {}
ra_sched::ra_sched(const bwp_params& bwp_cfg_) :
bwp_cfg(&bwp_cfg_), logger(srslog::fetch_basic_logger(bwp_cfg_.sched_cfg.logger_name))
{}
alloc_result
ra_sched::allocate_pending_rar(bwp_slot_allocator& slot_grid, const pending_rar_t& rar, uint32_t& nof_grants_alloc)
@ -223,7 +227,7 @@ bwp_ctxt::bwp_ctxt(const bwp_params& bwp_cfg) :
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
serv_cell_manager::serv_cell_manager(const sched_cell_params& cell_cfg_) :
cfg(cell_cfg_), logger(srslog::fetch_basic_logger("MAC"))
cfg(cell_cfg_), logger(srslog::fetch_basic_logger(cell_cfg_.sched_cfg.logger_name))
{
for (uint32_t bwp_id = 0; bwp_id < cfg.cell_cfg.bwps.size(); ++bwp_id) {
bwps.emplace_back(cell_cfg_.bwps[bwp_id]);

@ -162,13 +162,14 @@ void log_sched_bwp_result(srslog::basic_logger& logger,
if (pdcch.dci.ctx.rnti_type == srsran_rnti_type_c) {
const slot_ue& ue = slot_ues[pdcch.dci.ctx.rnti];
fmt::format_to(fmtbuf,
"SCHED: UL {}, cc={}, rnti=0x{:x}, pid={}, f={}, nrtx={}, tbs={}, tti_pusch={}",
"SCHED: UL {}, cc={}, rnti=0x{:x}, pid={}, f={}, nrtx={}, pending_bytes={}, tbs={}, tti_pusch={}",
ue.h_ul->nof_retx() == 0 ? "tx" : "retx",
res_grid.cfg->cc,
ue.rnti,
pdcch.dci.pid,
srsran_dci_format_nr_string(pdcch.dci.ctx.format),
ue.h_ul->nof_retx(),
ue.ul_pending_bytes,
ue.h_ul->tbs(),
ue.pusch_slot);
} else if (pdcch.dci.ctx.rnti_type == srsran_rnti_type_tc) {

@ -17,7 +17,10 @@ namespace srsenb {
namespace sched_nr_impl {
slot_cc_worker::slot_cc_worker(serv_cell_manager& cc_sched) :
cell(cc_sched), cfg(cc_sched.cfg), bwp_alloc(cc_sched.bwps[0].grid), logger(srslog::fetch_basic_logger("MAC"))
cell(cc_sched),
cfg(cc_sched.cfg),
bwp_alloc(cc_sched.bwps[0].grid),
logger(srslog::fetch_basic_logger(cc_sched.cfg.sched_cfg.logger_name))
{}
void slot_cc_worker::enqueue_cc_event(srsran::move_callback<void()> ev)
@ -202,7 +205,7 @@ void slot_cc_worker::postprocess_decisions()
sched_worker_manager::sched_worker_manager(ue_map_t& ue_db_,
const sched_params& cfg_,
srsran::span<std::unique_ptr<serv_cell_manager> > cells_) :
cfg(cfg_), ue_db(ue_db_), logger(srslog::fetch_basic_logger("MAC")), cells(cells_)
cfg(cfg_), ue_db(ue_db_), logger(srslog::fetch_basic_logger(cfg_.sched_cfg.logger_name)), cells(cells_)
{
cc_worker_list.reserve(cfg.cells.size());
for (uint32_t cc = 0; cc < cfg.cells.size(); ++cc) {

Loading…
Cancel
Save