<p style="white-space: pre-wrap; word-wrap: break-word;">the patchset is definitely an improvement over the current code.</p><p style="white-space: pre-wrap; word-wrap: break-word;">just for the record: Another approach would be to simply pre-bind the RTP+RTCP ports for all lchan's at the time a TS/pchan is activated.  This way we avoid possibly time-consuming iterations at every lchan activation time (in case many ports are already used and hence we need to do many attempts).</p><p><a href="https://gerrit.osmocom.org/9261">View Change</a></p><p>4 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/9261/2/include/osmo-bts/gsm_data_shared.h">File include/osmo-bts/gsm_data_shared.h:</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/9261/2/include/osmo-bts/gsm_data_shared.h@692">Patch Set #2, Line 692:</a> <code style="font-family:monospace,monospace">  uint32_t rtp_port_range_start;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">unimportant: uint16_t would have been sufficient / more natural for port numbers.  but nevermind...</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/9261/2/src/common/rsl.c">File src/common/rsl.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/9261/2/src/common/rsl.c@1794">Patch Set #2, Line 1794:</a> <code style="font-family:monospace,monospace"> unsigned int trys;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">tries</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/9261/2/src/common/rsl.c@1796">Patch Set #2, Line 1796:</a> <code style="font-family:monospace,monospace">  trys = bts->rtp_port_range_end - bts->rtp_port_range_start;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">total number of attempts/tries is 16k ports (using your default values)...</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/9261/2/src/common/rsl.c@1804">Patch Set #2, Line 1804:</a> <code style="font-family:monospace,monospace">              bts->rtp_port_range_next += 2;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">however, the port numbers are incremented by two.  This means we're trying each port twice, or am I missing something?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/9261">change 9261</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/9261"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Id75f1dfaf898ed8750d28b1c4840e188f4cfdc87 </div>
<div style="display:none"> Gerrit-Change-Number: 9261 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </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-CC: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 23 May 2018 15:53:26 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>