<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/15427">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Use osmo_tdef for BSSGP T1 and T2<br><br>Change-Id: I477e5b702c8b956136d93fc1cee01991233e381f<br>---<br>M src/bts.cpp<br>M src/gprs_bssgp_pcu.cpp<br>2 files changed, 11 insertions(+), 6 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/27/15427/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 44027ce..33ca309 100644</span><br><span>--- a/src/bts.cpp</span><br><span>+++ b/src/bts.cpp</span><br><span>@@ -68,6 +68,8 @@</span><br><span> </span><br><span> static BTS s_bts;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#define BSSGP_T1_SECS 30 /* Guards the (un)blocking procedures */</span><br><span style="color: hsl(120, 100%, 40%);">+#define BSSGP_T2_SECS 30 /* Guards the reset procedure */</span><br><span> #define T3142_SECS 20</span><br><span> #define T3169_SECS 5</span><br><span> #define T3191_SECS 5</span><br><span>@@ -78,6 +80,8 @@</span><br><span> #define X2002_MSECS 200</span><br><span> </span><br><span> static struct osmo_tdef bts_T_defs[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+ { .T=1, .default_val=BSSGP_T1_SECS, .desc="BSSGP (un)blocking procedures timer (s)" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { .T=2, .default_val=BSSGP_T2_SECS, .desc="BSSGP reset procedure timer (s)" },</span><br><span> { .T=3142, .default_val=T3142_SECS, .desc="timer (s)" },</span><br><span> { .T=3169, .default_val=T3169_SECS, .desc="timer (s)" },</span><br><span> { .T=3191, .default_val=T3191_SECS, .desc="timer (s)" },</span><br><span>diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp</span><br><span>index ce56154..4fdf338 100644</span><br><span>--- a/src/gprs_bssgp_pcu.cpp</span><br><span>+++ b/src/gprs_bssgp_pcu.cpp</span><br><span>@@ -33,9 +33,6 @@</span><br><span> #include "coding_scheme.h"</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define BSSGP_TIMER_T1 30 /* Guards the (un)blocking procedures */</span><br><span style="color: hsl(0, 100%, 40%);">-#define BSSGP_TIMER_T2 30 /* Guards the reset procedure */</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> /* Tuning parameters for BSSGP flow control */</span><br><span> #define FC_DEFAULT_LIFE_TIME_SECS 10 /* experimental value, 10s */</span><br><span> #define FC_MS_BUCKET_SIZE_BY_BMAX(bmax) ((bmax) / 2 + 500) /* experimental */</span><br><span>@@ -830,10 +827,12 @@</span><br><span> </span><br><span> static void bvc_timeout(void *_priv)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned long secs;</span><br><span> if (!the_pcu.bvc_sig_reset) {</span><br><span> LOGP(DBSSGP, LOGL_INFO, "Sending reset on BVCI 0\n");</span><br><span> bssgp_tx_bvc_reset(the_pcu.bctx, 0, BSSGP_CAUSE_OML_INTERV);</span><br><span style="color: hsl(0, 100%, 40%);">- osmo_timer_schedule(&the_pcu.bvc_timer, BSSGP_TIMER_T2, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ secs = osmo_tdef_get(the_pcu.bts->T_defs, 2, OSMO_TDEF_S, -1);</span><br><span style="color: hsl(120, 100%, 40%);">+ osmo_timer_schedule(&the_pcu.bvc_timer, secs, 0);</span><br><span> return;</span><br><span> }</span><br><span> </span><br><span>@@ -841,7 +840,8 @@</span><br><span> LOGP(DBSSGP, LOGL_INFO, "Sending reset on BVCI %d\n",</span><br><span> the_pcu.bctx->bvci);</span><br><span> bssgp_tx_bvc_reset(the_pcu.bctx, the_pcu.bctx->bvci, BSSGP_CAUSE_OML_INTERV);</span><br><span style="color: hsl(0, 100%, 40%);">- osmo_timer_schedule(&the_pcu.bvc_timer, BSSGP_TIMER_T2, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ secs = osmo_tdef_get(the_pcu.bts->T_defs, 2, OSMO_TDEF_S, -1);</span><br><span style="color: hsl(120, 100%, 40%);">+ osmo_timer_schedule(&the_pcu.bvc_timer, secs, 0);</span><br><span> return;</span><br><span> }</span><br><span> </span><br><span>@@ -849,7 +849,8 @@</span><br><span> LOGP(DBSSGP, LOGL_INFO, "Sending unblock on BVCI %d\n",</span><br><span> the_pcu.bctx->bvci);</span><br><span> bssgp_tx_bvc_unblock(the_pcu.bctx);</span><br><span style="color: hsl(0, 100%, 40%);">- osmo_timer_schedule(&the_pcu.bvc_timer, BSSGP_TIMER_T1, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ secs = osmo_tdef_get(the_pcu.bts->T_defs, 1, OSMO_TDEF_S, -1);</span><br><span style="color: hsl(120, 100%, 40%);">+ osmo_timer_schedule(&the_pcu.bvc_timer, secs, 0);</span><br><span> return;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/15427">change 15427</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/+/15427"/><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: I477e5b702c8b956136d93fc1cee01991233e381f </div>
<div style="display:none"> Gerrit-Change-Number: 15427 </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>