pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30538 )


Change subject: Pass pdch ptr to tbf_compute_priority
......................................................................

Pass pdch ptr to tbf_compute_priority

Change-Id: Idbac59343c4bac3214ecd8a14c201b4e42c74557
---
M src/gprs_rlcmac_sched.cpp
1 file changed, 6 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/38/30538/1

diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 90710ab..f641013 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -227,25 +227,25 @@
 }

 static inline enum tbf_dl_prio tbf_compute_priority(const struct 
gprs_rlcmac_bts *bts, struct gprs_rlcmac_dl_tbf *tbf,
-                                                   uint8_t ts, uint32_t fn, 
int age)
+                                                   const struct 
gprs_rlcmac_pdch *pdch, uint32_t fn, int age)
 {
        const gprs_rlc_dl_window *w = static_cast<gprs_rlc_dl_window 
*>(tbf->window());
        unsigned long msecs_t3190 = osmo_tdef_get(the_pcu->T_defs, 3190, 
OSMO_TDEF_MS, -1);
        unsigned long dl_tbf_idle_msec = osmo_tdef_get(the_pcu->T_defs, -2031, 
OSMO_TDEF_MS, -1);
        int age_thresh1 = msecs_to_frames(200);
        int age_thresh2 = msecs_to_frames(OSMO_MIN(msecs_t3190/2, 
dl_tbf_idle_msec));
-       const struct gprs_rlcmac_pdch *pdch = &tbf_get_trx(tbf)->pdch[ts];
+       const bool is_control_ts = tbf_is_control_ts(tbf, pdch);

-       if (tbf_is_control_ts(tbf, pdch) && tbf->need_poll_for_dl_ack_nack())
+       if (is_control_ts && tbf->need_poll_for_dl_ack_nack())
                return DL_PRIO_CONTROL;

-       if (tbf_is_control_ts(tbf, pdch) && age > age_thresh2 && age_thresh2 > 
0)
+       if (is_control_ts && age > age_thresh2 && age_thresh2 > 0)
                return DL_PRIO_HIGH_AGE;

        if ((tbf->state_is(TBF_ST_FLOW) && tbf->have_data()) || 
w->resend_needed() >= 0)
                return DL_PRIO_NEW_DATA;

-       if (tbf_is_control_ts(tbf, pdch) && age > age_thresh1 && 
tbf->keep_open(fn))
+       if (is_control_ts && age > age_thresh1 && tbf->keep_open(fn))
                return DL_PRIO_LOW_AGE;

        if (!w->window_empty())
@@ -313,7 +313,7 @@
                age = tbf->frames_since_last_poll(fn);

                /* compute priority */
-               prio = tbf_compute_priority(bts, tbf, ts, fn, age);
+               prio = tbf_compute_priority(bts, tbf, pdch, fn, age);
                if (prio == DL_PRIO_NONE)
                        continue;


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30538
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Idbac59343c4bac3214ecd8a14c201b4e42c74557
Gerrit-Change-Number: 30538
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to