<p>pespin <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/22162">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  lynxis lazus: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Split PCU global PCU object from BTS object<br><br>Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold<br>both PCU global fields and BTS specific fields, all mangled together.<br>The BTS is even accessed in lots of places by means of a singleton.<br><br>This patch introduces a new struct gprs_pcu object aimed at holding all<br>global state, and several fields are already moved from BTS to it. The<br>new object can be accessed as global variable "the_pcu", reusing and<br>including an already exisitng "the_pcu" global variable only used for<br>bssgp related purposes so far.<br><br>This is only a first step towards having a complete split global pcu and<br>BTS, some fields are still kept in BTS and will be moved over follow-up<br>smaller patches in the future (since this patch is already quite big).<br>So far, the code still only supports one BTS, which can be accessed<br>using the_pcu->bts. In the future that field will be replaced with a<br>list, and the BTS singletons will be removed.<br><br>The cur_fn output changes in TbfTest are actually a side effect fix,<br>since the singleton main_bts() now points internally to the_pcu->bts,<br>hence the same we allocate and assign in the test. Beforehand, "the_bts"<br>was allocated in the stack while main_bts() still returned an unrelated<br>singleton BTS object instance.<br><br>Related: OS#4935<br>Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840<br>---<br>M src/Makefile.am<br>M src/bts.cpp<br>M src/bts.h<br>M src/gprs_bssgp_pcu.cpp<br>M src/gprs_bssgp_pcu.h<br>A src/gprs_pcu.c<br>A src/gprs_pcu.h<br>M src/gprs_rlcmac_ts_alloc.cpp<br>M src/osmobts_sock.cpp<br>M src/pcu_l1_if.cpp<br>M src/pcu_l1_if.h<br>M src/pcu_main.cpp<br>M src/pcu_vty.c<br>M src/tbf.cpp<br>M tests/alloc/AllocTest.cpp<br>M tests/alloc/MslotTest.cpp<br>M tests/app_info/AppInfoTest.cpp<br>M tests/edge/EdgeTest.cpp<br>M tests/emu/pcu_emu.cpp<br>M tests/fn/FnTest.cpp<br>M tests/ms/MsTest.cpp<br>M tests/tbf/TbfTest.cpp<br>M tests/tbf/TbfTest.err<br>M tests/types/TypesTest.cpp<br>24 files changed, 1,005 insertions(+), 787 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/22162">change 22162</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/+/22162"/><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: I88e3c6471b80245ce3798223f1a61190f14aa840 </div>
<div style="display:none"> Gerrit-Change-Number: 22162 </div>
<div style="display:none"> Gerrit-PatchSet: 6 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>