mirror of https://github.com/PentHertz/srsLTE.git
fixing scheduling issues for mbms
This commit is contained in:
parent
f286e12ceb
commit
0ae22e0822
|
@ -50,6 +50,7 @@ public:
|
|||
void write(byte_buffer_t *msg)
|
||||
{
|
||||
queue.push(msg);
|
||||
|
||||
unread_bytes += msg->N_bytes;
|
||||
}
|
||||
|
||||
|
@ -78,6 +79,10 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void resize(uint32_t capacity)
|
||||
{
|
||||
queue.resize(capacity);
|
||||
}
|
||||
uint32_t size()
|
||||
{
|
||||
return (uint32_t) queue.size();
|
||||
|
|
|
@ -84,7 +84,9 @@ void rlc_um::init(srslte::log *log_,
|
|||
void rlc_um::configure(srslte_rlc_config_t cnfg_)
|
||||
{
|
||||
cfg = cnfg_.um;
|
||||
|
||||
if(cnfg_.um.is_mrb){
|
||||
tx_sdu_queue.resize(512);
|
||||
}
|
||||
switch(cnfg_.rlc_mode)
|
||||
{
|
||||
case LIBLTE_RRC_RLC_MODE_UM_BI:
|
||||
|
@ -192,6 +194,7 @@ uint32_t rlc_um::get_buffer_state()
|
|||
{
|
||||
// Bytes needed for tx SDUs
|
||||
uint32_t n_sdus = tx_sdu_queue.size();
|
||||
|
||||
uint32_t n_bytes = tx_sdu_queue.size_bytes();
|
||||
if(tx_sdu)
|
||||
{
|
||||
|
|
|
@ -620,6 +620,9 @@ void mac::build_mch_sched(uint32_t tbs)
|
|||
}
|
||||
}
|
||||
|
||||
printf("buffer size is %d\n",total_bytes_to_tx);
|
||||
printf("shed size is %d\n",total_space_avail_bytes);
|
||||
printf("stop value is %d\n",mch.mtch_sched[0].stop);
|
||||
}
|
||||
|
||||
int mac::get_mch_sched(bool is_mcch, dl_sched_t *dl_sched_res)
|
||||
|
@ -662,6 +665,7 @@ int mac::get_mch_sched(bool is_mcch, dl_sched_t *dl_sched_res)
|
|||
}
|
||||
if(mch.current_sf_allocation_num <= mtch_stop) {
|
||||
int requested_bytes = (mcs_data.tbs/8 > mch.mtch_sched[mtch_index].lcid_buffer_size)?mch.mtch_sched[mtch_index].lcid_buffer_size:mcs_data.tbs/8;
|
||||
requested_bytes = requested_bytes - 2;
|
||||
int bytes_received = ue_db[SRSLTE_MRNTI]->read_pdu(current_lcid, mtch_payload_buffer, requested_bytes);
|
||||
mch.pdu[0].lcid = current_lcid;
|
||||
mch.pdu[0].nbytes = bytes_received;
|
||||
|
|
|
@ -191,7 +191,6 @@ while(mch_run_enable) {
|
|||
}
|
||||
|
||||
pdcp->write_sdu(rnti, lcid, pdu);
|
||||
usleep(10000);
|
||||
do {
|
||||
pdu = pool_allocate;
|
||||
if (!pdu) {
|
||||
|
|
|
@ -202,7 +202,6 @@ void demux::process_sch_pdu(srslte::sch_pdu *pdu_msg)
|
|||
}
|
||||
}
|
||||
void demux::process_mch_pdu(srslte::mch_pdu *mch_msg){
|
||||
|
||||
//disgarding headers that have already been processed
|
||||
//printf("in process cur idx, %d subheaders %d\n",mch_msg->cur_idx,mch_msg->nof_subheaders);
|
||||
while(mch_msg->next()){
|
||||
|
@ -217,10 +216,10 @@ void demux::process_mch_pdu(srslte::mch_pdu *mch_msg){
|
|||
if(mch_msg->get()->is_sdu()) {
|
||||
uint32_t lcid = mch_msg->get()->get_sdu_lcid();
|
||||
if(lcid < 0 || lcid >= SRSLTE_N_MCH_LCIDS) {
|
||||
Error("Radio bearer id must be in [0:%d] - %d\n", SRSLTE_N_MCH_LCIDS, lcid);
|
||||
printf("Radio bearer id must be in [0:%d] - %d\n", SRSLTE_N_MCH_LCIDS, lcid);
|
||||
return;
|
||||
}
|
||||
Info("Wrote MCH LCID=%d to RLC\n", lcid);
|
||||
Debug("Wrote MCH LCID=%d to RLC\n", lcid);
|
||||
if(1 == mch_lcids[lcid]) {
|
||||
rlc->write_pdu_mch(lcid, mch_msg->get()->get_sdu_ptr(), mch_msg->get()->get_payload_size());
|
||||
}
|
||||
|
|
|
@ -522,9 +522,7 @@ int main(int argc, char *argv[])
|
|||
ue->start_plot();
|
||||
}
|
||||
if(args.expert.mbms_service > -1){
|
||||
serv = args.expert.mbms_service;
|
||||
port = 14321;
|
||||
mbms_service_start = true;
|
||||
ue->mbms_service_start(args.expert.mbms_service, 4321);
|
||||
}
|
||||
}
|
||||
int cnt=0;
|
||||
|
|
|
@ -461,7 +461,7 @@ bool phch_common::is_mch_subframe(subframe_cfg_t *cfg, uint32_t phy_tti)
|
|||
if(mcch_configured) {
|
||||
// Iterate through PMCH configs to see which one applies in the current frame
|
||||
LIBLTE_RRC_MCCH_MSG_STRUCT *mcch = &config->mbsfn.mcch;
|
||||
uint32_t mbsfn_per_frame = mcch->pmch_infolist_r9[0].pmch_config_r9.sf_alloc_end_r9/mcch->pmch_infolist_r9[0].pmch_config_r9.mch_schedulingperiod_r9;
|
||||
uint32_t mbsfn_per_frame = mcch->pmch_infolist_r9[0].pmch_config_r9.sf_alloc_end_r9/liblte_rrc_mch_scheduling_period_r9_num[mcch->pmch_infolist_r9[0].pmch_config_r9.mch_schedulingperiod_r9];
|
||||
uint32_t frame_alloc_idx = sfn%liblte_rrc_mbsfn_common_sf_alloc_period_r9_num[mcch->commonsf_allocperiod_r9];
|
||||
uint32_t sf_alloc_idx = frame_alloc_idx*mbsfn_per_frame + ((sf<4)?sf-1:sf-3);
|
||||
pthread_mutex_lock(&mtch_mutex);
|
||||
|
|
Loading…
Reference in New Issue