From 51f8ba60da02ee8610b10319705f738afb2473e6 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Fri, 1 May 2020 15:23:27 +0100 Subject: [PATCH] Make MBMS MCS configurable for the eNB. --- srsenb/enb.conf.example | 2 ++ srsenb/hdr/stack/enb_stack_base.h | 1 + srsenb/hdr/stack/rrc/rrc_config.h | 1 + srsenb/src/enb_cfg_parser.cc | 1 + srsenb/src/main.cc | 3 ++- srsenb/src/stack/rrc/rrc.cc | 10 +++++++++- 6 files changed, 16 insertions(+), 2 deletions(-) diff --git a/srsenb/enb.conf.example b/srsenb/enb.conf.example index b721e5545..18f5e78e8 100644 --- a/srsenb/enb.conf.example +++ b/srsenb/enb.conf.example @@ -165,12 +165,14 @@ pusch_max_mcs = 16 # enable: Enable MBMS transmission in the eNB # m1u_multiaddr: Multicast addres the M1-U socket will register to # m1u_if_addr: Address of the inteferface the M1-U interface will listen for multicast packets. +# mcs: Modulation and Coding scheme for MBMS traffic. # ##################################################################### [embms] #enable = false #m1u_multiaddr = 239.255.0.1 #m1u_if_addr = 127.0.1.201 +#mcs = 20 diff --git a/srsenb/hdr/stack/enb_stack_base.h b/srsenb/hdr/stack/enb_stack_base.h index 8a5ae91d8..ec54fc939 100644 --- a/srsenb/hdr/stack/enb_stack_base.h +++ b/srsenb/hdr/stack/enb_stack_base.h @@ -35,6 +35,7 @@ typedef struct { bool enable; std::string m1u_multiaddr; std::string m1u_if_addr; + uint16_t mcs; } embms_args_t; typedef struct { diff --git a/srsenb/hdr/stack/rrc/rrc_config.h b/srsenb/hdr/stack/rrc/rrc_config.h index 393cd04e7..9e8755d19 100644 --- a/srsenb/hdr/stack/rrc/rrc_config.h +++ b/srsenb/hdr/stack/rrc/rrc_config.h @@ -73,6 +73,7 @@ struct rrc_cfg_t { rrc_cfg_cqi_t cqi_cfg; rrc_cfg_qci_t qci_cfg[MAX_NOF_QCI]; bool enable_mbsfn; + uint16_t mbms_mcs; uint32_t inactivity_timeout_ms; srslte::CIPHERING_ALGORITHM_ID_ENUM eea_preference_list[srslte::CIPHERING_ALGORITHM_ID_N_ITEMS]; srslte::INTEGRITY_ALGORITHM_ID_ENUM eia_preference_list[srslte::INTEGRITY_ALGORITHM_ID_N_ITEMS]; diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index 86819d1cb..a5c9644bd 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -955,6 +955,7 @@ int set_derived_args(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_ rrc_cfg_->inactivity_timeout_ms = args_->general.rrc_inactivity_timer; rrc_cfg_->enable_mbsfn = args_->stack.embms.enable; + rrc_cfg_->mbms_mcs = args_->stack.embms.mcs; // Check number of control symbols if (args_->stack.mac.sched.min_nof_ctrl_symbols > args_->stack.mac.sched.max_nof_ctrl_symbols) { diff --git a/srsenb/src/main.cc b/srsenb/src/main.cc index f17f942b8..ac80f1204 100644 --- a/srsenb/src/main.cc +++ b/srsenb/src/main.cc @@ -195,6 +195,7 @@ void parse_args(all_args_t* args, int argc, char* argv[]) ("embms.enable", bpo::value(&args->stack.embms.enable)->default_value(false), "Enables MBMS in the eNB") ("embms.m1u_multiaddr", bpo::value(&args->stack.embms.m1u_multiaddr)->default_value("239.255.0.1"), "M1-U Multicast address the eNB joins.") ("embms.m1u_if_addr", bpo::value(&args->stack.embms.m1u_if_addr)->default_value("127.0.1.201"), "IP address of the interface the eNB will listen for M1-U traffic.") + ("embms.mcs", bpo::value(&args->stack.embms.mcs)->default_value(20), "Modulation and Coding scheme of MBMS traffic.") ; // Positional options - config file location @@ -276,7 +277,7 @@ void parse_args(all_args_t* args, int argc, char* argv[]) } } - // Covert eNB Id + // Convert eNB Id std::size_t pos = {}; try { args->enb.enb_id = std::stoi(enb_id, &pos, 0); diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index 0a77b01e8..901742aaf 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -790,7 +790,15 @@ void rrc::configure_mbsfn_sibs(sib_type2_s* sib2_, sib_type13_r9_s* sib13_) &byte[0], 3); // TODO: Check if service is set to 1 } - pmch_item->pmch_cfg_r9.data_mcs_r9 = 20; + + uint16_t mbms_mcs = cfg.mbms_mcs; + if (mbms_mcs > 28){ + mbms_mcs = 28; // TS 36.213, Table 8.6.1-1 + rrc_log->warning("PMCH data MCS too high, setting it to 28\n"); + } + + rrc_log->debug("PMCH data MCS=%d\n", mbms_mcs); + pmch_item->pmch_cfg_r9.data_mcs_r9 = mbms_mcs; pmch_item->pmch_cfg_r9.mch_sched_period_r9 = pmch_cfg_r9_s::mch_sched_period_r9_e_::rf64; pmch_item->pmch_cfg_r9.sf_alloc_end_r9 = 64 * 6;