<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/24225">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bts: Use ms_store when calculating set of target PDCHs for Pkt Paging Request<br><br>The ul_tbfs/dl_tbfs lists will become per-trx. Since in this case we<br>want to operate on the BTS globally, let's iterate over MS objects<br>instead. This makes more sense too since here we really aim at reaching<br>a MS (subscriber) instead of specific TBFs. Later on the code can be<br>optimized easily to schedule a Pkt Paging Request for only 1 of the TBFs<br>of each MS instad of scheduling it for each TBFs in the MS.<br><br>Change-Id: I671e531921bbea2f5cc0f2bfcb8a39ea5c6673b8<br>---<br>M src/bts.cpp<br>1 file changed, 10 insertions(+), 11 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/25/24225/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/bts.cpp b/src/bts.cpp</span><br><span>index 7e2f11b..c84f5c4 100644</span><br><span>--- a/src/bts.cpp</span><br><span>+++ b/src/bts.cpp</span><br><span>@@ -342,17 +342,11 @@</span><br><span> {</span><br><span>   uint8_t l, trx, ts, any_tbf = 0;</span><br><span>     struct gprs_rlcmac_tbf *tbf;</span><br><span style="color: hsl(0, 100%, 40%);">-    struct llist_item *pos;</span><br><span style="color: hsl(120, 100%, 40%);">+       struct llist_head *tmp;</span><br><span>      const struct osmo_mobile_identity *mi;</span><br><span>       uint8_t slot_mask[8];</span><br><span>        int8_t first_ts; /* must be signed */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-       struct llist_head *tbfs_lists[] = {</span><br><span style="color: hsl(0, 100%, 40%);">-             &bts->ul_tbfs,</span><br><span style="color: hsl(0, 100%, 40%);">-           &bts->dl_tbfs,</span><br><span style="color: hsl(0, 100%, 40%);">-           NULL</span><br><span style="color: hsl(0, 100%, 40%);">-    };</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>   /* First, build the MI used to page on PDCH from available subscriber info: */</span><br><span>       if (req->mi_tmsi_present) {</span><br><span>               mi = &req->mi_tmsi;</span><br><span>@@ -400,13 +394,18 @@</span><br><span> </span><br><span>       /* We don't know the target MS.</span><br><span>   * collect slots to page</span><br><span style="color: hsl(0, 100%, 40%);">-         * Mark slots for every TBF, but only mark one of it.</span><br><span style="color: hsl(120, 100%, 40%);">+  * Mark up to one slot attached to each of the TBF of the MS.</span><br><span>         * Mark only the first slot found.</span><br><span>    * Don't mark, if TBF uses a different slot that is already marked. */</span><br><span>   memset(slot_mask, 0, sizeof(slot_mask));</span><br><span style="color: hsl(0, 100%, 40%);">-        for (l = 0; tbfs_lists[l]; l++) {</span><br><span style="color: hsl(0, 100%, 40%);">-               llist_for_each_entry(pos, tbfs_lists[l], list) {</span><br><span style="color: hsl(0, 100%, 40%);">-                        tbf = (struct gprs_rlcmac_tbf *)pos->entry;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      llist_for_each(tmp, bts_ms_store(bts)->ms_list()) {</span><br><span style="color: hsl(120, 100%, 40%);">+                ms = llist_entry(tmp, typeof(*ms), list);</span><br><span style="color: hsl(120, 100%, 40%);">+             struct gprs_rlcmac_tbf *tbfs[2] = { ms->ul_tbf, ms->dl_tbf };</span><br><span style="color: hsl(120, 100%, 40%);">+           for (l = 0; l < 2; l++) {</span><br><span style="color: hsl(120, 100%, 40%);">+                  tbf = (struct gprs_rlcmac_tbf *)tbfs[l];</span><br><span style="color: hsl(120, 100%, 40%);">+                      if (!tbf)</span><br><span style="color: hsl(120, 100%, 40%);">+                             continue;</span><br><span>                    first_ts = -1;</span><br><span>                       for (ts = 0; ts < 8; ts++) {</span><br><span>                              if (tbf->pdch[ts]) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/24225">change 24225</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-pcu/+/24225"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I671e531921bbea2f5cc0f2bfcb8a39ea5c6673b8 </div>
<div style="display:none"> Gerrit-Change-Number: 24225 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>