diff --git a/srsenb/hdr/upper/gtpu.h b/srsenb/hdr/upper/gtpu.h index c097b190a..ea2726fbe 100644 --- a/srsenb/hdr/upper/gtpu.h +++ b/srsenb/hdr/upper/gtpu.h @@ -71,7 +71,7 @@ class gtpu { public: - bool init(std::string gtp_bind_addr_, std::string mme_addr_, pdcp_interface_gtpu *pdcp_, srslte::log *gtpu_log_); + bool init(std::string gtp_bind_addr_, std::string mme_addr_, pdcp_interface_gtpu *pdcp_, srslte::log *gtpu_log_, bool enable_mbsfn = false); void stop(); // gtpu_interface_rrc @@ -90,9 +90,9 @@ private: bool running; bool run_enable; - bool mch_running; + bool mch_running; bool mch_run_enable; - + bool _enable_mbsfn; std::string gtp_bind_addr; std::string mme_addr; srsenb::pdcp_interface_gtpu *pdcp; diff --git a/srsenb/src/enb.cc b/srsenb/src/enb.cc index 1bdfafb41..3b41672a0 100644 --- a/srsenb/src/enb.cc +++ b/srsenb/src/enb.cc @@ -219,7 +219,7 @@ bool enb::init(all_args_t *args_) pdcp.init(&rlc, &rrc, >pu, &pdcp_log); rrc.init(&rrc_cfg, &phy, &mac, &rlc, &pdcp, &s1ap, >pu, &rrc_log); s1ap.init(args->enb.s1ap, &rrc, &s1ap_log); - gtpu.init(args->enb.s1ap.gtp_bind_addr, args->enb.s1ap.mme_addr, &pdcp, >pu_log); + gtpu.init(args->enb.s1ap.gtp_bind_addr, args->enb.s1ap.mme_addr, &pdcp, >pu_log, args->expert.enable_mbsfn); started = true; return true; diff --git a/srsenb/src/upper/gtpu.cc b/srsenb/src/upper/gtpu.cc index 62b25a29c..6e487a715 100644 --- a/srsenb/src/upper/gtpu.cc +++ b/srsenb/src/upper/gtpu.cc @@ -34,7 +34,7 @@ using namespace srslte; namespace srsenb { -bool gtpu::init(std::string gtp_bind_addr_, std::string mme_addr_, srsenb::pdcp_interface_gtpu* pdcp_, srslte::log* gtpu_log_) +bool gtpu::init(std::string gtp_bind_addr_, std::string mme_addr_, srsenb::pdcp_interface_gtpu* pdcp_, srslte::log* gtpu_log_, bool enable_mbsfn) { pdcp = pdcp_; gtpu_log = gtpu_log_; @@ -95,11 +95,13 @@ bool gtpu::init(std::string gtp_bind_addr_, std::string mme_addr_, srsenb::pdcp_ //Setup M1-u init_m1u(gtpu_log_); - mch_lcid_counter = 1; + _enable_mbsfn = enable_mbsfn; // Setup a thread to receive packets from the src socket start(THREAD_PRIO); - pthread_create(&mch_thread ,NULL ,mch_thread_routine , this); - + if(_enable_mbsfn){ + mch_lcid_counter = 1; + pthread_create(&mch_thread ,NULL ,mch_thread_routine , this); + } return true; } @@ -224,8 +226,9 @@ void gtpu::stop() } } wait_thread_finish(); - pthread_join(mch_thread, NULL); - + if(_enable_mbsfn) { + pthread_join(mch_thread, NULL); + } } if (snk_fd) {