<p>Patch set 5:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/19121">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/19121/3/src/libosmo-mgcp/mgcp_trunk.c">File src/libosmo-mgcp/mgcp_trunk.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/19121/3/src/libosmo-mgcp/mgcp_trunk.c@45">Patch Set #3, Line 45:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">trunk->virtual.vty_number_endpoints = 32;<br>  trunk->e1.vty_timeslot_first = 1;<br>  trunk->e1.vty_timeslot_num = 2;<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Just thought that a bit of flexibility would not hurt. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">we should open timeslots at the time of a CRCX.  IF it succeeds - great.  If it fails -> return an error message.  I think adding code complexity about ranges, or even configuration complexity does not serve any purpose here (other than open up new ways of how things can go wrong).</p><p style="white-space: pre-wrap; word-wrap: break-word;">So either we allocate all endpoints for all timeslots (15*30=450 per E1 trunk) at start-up, or we dynamically allocate them by demand whenever we get the related CRCX.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Pre-allocating all of them sounds like a bit of a waste, at 64 trunks * 450 we end up with 28800 endpoints.  Not sure how large our data structures are, but even if an endpoint would be 1kB, it's "only" 28MB of total RAM _if_ somebody went for full 64 trunks.  Not elegant, but not a big desaster with todays memory sizes.</p><p style="white-space: pre-wrap; word-wrap: break-word;">And if we are worried about this, we could make the creation of sub-slot endpoints optional, i.e. allow only 64k slots for the non-Abis cases (A interface, classic ISDN) and only go for the full I.460 in Abis use cases.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Honestly, I don't think it's worth spending any effort in optimization now.  So let's just allocate all possible endpoints for each E1 trunk at startup/config time and avoid additional complexity about ranges.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-mgw/+/19121">change 19121</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-mgw/+/19121"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-mgw </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I73b31e3c236a61ea0a6f76ef5ff98ce589f52c77 </div>
<div style="display:none"> Gerrit-Change-Number: 19121 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 09 Jul 2020 10:33:10 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Comment-In-Reply-To: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Comment-In-Reply-To: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>