<p>neels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/19560">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">hodec2: log requirements of best candidate, log rxlev in dBm<br><br>Instead of logging a hex value for the met requirements, fully expand the "ABC"<br>flags for both TCH/F and TCH/H.<br><br>From HO_CANDIDATE_FMT/_ARGS, split off into REQUIREMENTS_FMT/_ARGS and use that<br>when logging the chosen HO candidates.<br><br>Also change the RX level to dBm, to match general logging and reduce confusion<br>between rxlev number variants in the log.<br><br>Change-Id: I1b30a6e98bdb4bd92e72864fafdd2f4f3ae3134c<br>---<br>M src/osmo-bsc/handover_decision_2.c<br>1 file changed, 21 insertions(+), 14 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/60/19560/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c</span><br><span>index 3191957..c818dbb 100644</span><br><span>--- a/src/osmo-bsc/handover_decision_2.c</span><br><span>+++ b/src/osmo-bsc/handover_decision_2.c</span><br><span>@@ -797,26 +797,30 @@</span><br><span>               return trigger_remote_bss_ho(c, requirements);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#define REQUIREMENTS_FMT "[%s%s%s]%s"</span><br><span style="color: hsl(120, 100%, 40%);">+#define REQUIREMENTS_ARGS(REQUIREMENTS, TCHX) \</span><br><span style="color: hsl(120, 100%, 40%);">+          (REQUIREMENTS) & REQUIREMENT_A_TCH##TCHX ? "A" : \</span><br><span style="color: hsl(120, 100%, 40%);">+         ((REQUIREMENTS) & REQUIREMENT_TCH##TCHX##_MASK) == 0? "-" : "", \</span><br><span style="color: hsl(120, 100%, 40%);">+          (REQUIREMENTS) & REQUIREMENT_B_TCH##TCHX ? "B" : "", \</span><br><span style="color: hsl(120, 100%, 40%);">+        (REQUIREMENTS) & REQUIREMENT_C_TCH##TCHX ? "C" : "", \</span><br><span style="color: hsl(120, 100%, 40%);">+        ((REQUIREMENTS) & REQUIREMENT_TCH##TCHX##_MASK) == 0 ? " not a candidate" : \</span><br><span style="color: hsl(120, 100%, 40%);">+             (((REQUIREMENTS) & REQUIREMENT_TCH##TCHX##_MASK) == REQUIREMENT_A_TCH##TCHX ? \</span><br><span style="color: hsl(120, 100%, 40%);">+            " more congestion" : \</span><br><span style="color: hsl(120, 100%, 40%);">+              ((REQUIREMENTS) & REQUIREMENT_B_TCH##TCHX ? \</span><br><span style="color: hsl(120, 100%, 40%);">+              " good" : \</span><br><span style="color: hsl(120, 100%, 40%);">+                  /* now has to be (REQUIREMENTS) & REQUIREMENT_C_TCHX != 0: */ \</span><br><span style="color: hsl(120, 100%, 40%);">+           " less-or-equal congestion"))</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* verbosely log about a handover candidate */</span><br><span> static inline void debug_candidate(struct ho_candidate *candidate,</span><br><span>                             int8_t rxlev, int tchf_count, int tchh_count)</span><br><span> {</span><br><span>        struct gsm_lchan *lchan = candidate->lchan;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define HO_CANDIDATE_FMT(tchx, TCHX) "TCH/" #TCHX "={free %d (want %d), [%s%s%s]%s}"</span><br><span style="color: hsl(120, 100%, 40%);">+#define HO_CANDIDATE_FMT(tchx, TCHX) "TCH/" #TCHX "={free %d (want %d), " REQUIREMENTS_FMT "}"</span><br><span> #define HO_CANDIDATE_ARGS(tchx, TCHX) \</span><br><span>       tch##tchx##_count, ho_get_hodec2_tch##tchx##_min_slots(candidate->bts->ho), \</span><br><span style="color: hsl(0, 100%, 40%);">-             candidate->requirements & REQUIREMENT_A_TCH##TCHX ? "A" : \</span><br><span style="color: hsl(0, 100%, 40%);">-               (candidate->requirements & REQUIREMENT_TCH##TCHX##_MASK) == 0? "-" : "", \</span><br><span style="color: hsl(0, 100%, 40%);">-        candidate->requirements & REQUIREMENT_B_TCH##TCHX ? "B" : "", \</span><br><span style="color: hsl(0, 100%, 40%);">-      candidate->requirements & REQUIREMENT_C_TCH##TCHX ? "C" : "", \</span><br><span style="color: hsl(0, 100%, 40%);">-      (candidate->requirements & REQUIREMENT_TCH##TCHX##_MASK) == 0 ? " not a candidate" : \</span><br><span style="color: hsl(0, 100%, 40%);">-           ((candidate->requirements & REQUIREMENT_TCH##TCHX##_MASK) == REQUIREMENT_A_TCH##TCHX ? \</span><br><span style="color: hsl(0, 100%, 40%);">-          " more congestion" : \</span><br><span style="color: hsl(0, 100%, 40%);">-                (candidate->requirements & REQUIREMENT_B_TCH##TCHX ? \</span><br><span style="color: hsl(0, 100%, 40%);">-            " good" : \</span><br><span style="color: hsl(0, 100%, 40%);">-            /* now has to be candidate->requirements & REQUIREMENT_C_TCHX != 0: */ \</span><br><span style="color: hsl(0, 100%, 40%);">-                 " less-or-equal congestion"))</span><br><span style="color: hsl(120, 100%, 40%);">+          REQUIREMENTS_ARGS(candidate->requirements, TCHX)</span><br><span> </span><br><span>         if (!candidate->bts && !candidate->cil)</span><br><span>                LOGPHOLCHAN(lchan, LOGL_DEBUG, "Empty candidate\n");</span><br><span>@@ -1503,8 +1507,11 @@</span><br><span>      if (log_check_level(DHODEC, LOGL_DEBUG)) {</span><br><span>           LOGPHOBTS(bts, LOGL_DEBUG, "Considering %u candidates to solve congestion:\n", candidates);</span><br><span>                for (i = 0; i < candidates; i++) {</span><br><span style="color: hsl(0, 100%, 40%);">-                   LOGPHOCAND(&clist[i], LOGL_DEBUG, "#%d: req=0x%x avg-rxlev=%d\n",</span><br><span style="color: hsl(0, 100%, 40%);">-                            i, clist[i].requirements, clist[i].avg);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+                 LOGPHOCAND(&clist[i], LOGL_DEBUG, "#%d: req={TCH/F:" REQUIREMENTS_FMT ", TCH/H:" REQUIREMENTS_FMT "} avg-rxlev=%d dBm\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                              i, REQUIREMENTS_ARGS(clist[i].requirements, F),</span><br><span style="color: hsl(120, 100%, 40%);">+                               REQUIREMENTS_ARGS(clist[i].requirements, H),</span><br><span style="color: hsl(120, 100%, 40%);">+                                  rxlev2dbm(clist[i].avg));</span><br><span>                 }</span><br><span>    }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/19560">change 19560</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-bsc/+/19560"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I1b30a6e98bdb4bd92e72864fafdd2f4f3ae3134c </div>
<div style="display:none"> Gerrit-Change-Number: 19560 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>