<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/12625">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12625/5/src/osmo-bsc/assignment_fsm.c">File src/osmo-bsc/assignment_fsm.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/12625/5/src/osmo-bsc/assignment_fsm.c@340">Patch Set #5, Line 340:</a> <code style="font-family:monospace,monospace">         return -EINVAL;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">before, I said "it doesn't make sense to fail the assignment if only one of the choices is not supported", but now I'm revising that: it is unlikely to get a GSM48_CMODE that we can't classify, so this is fine.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12625/5/src/osmo-bsc/assignment_fsm.c@497">Patch Set #5, Line 497:</a> <code style="font-family:monospace,monospace">      if (check_for_existing_lchan(conn)) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">instead of spraying CR comments I pushed a suggestion instead. Can you please take a look whether that is acceptable to you, and actually test it for me? thanks!</p><p style="white-space: pre-wrap; word-wrap: break-word;">My changes to this patch set are a separate commit on branch neels/12625<br>http://git.osmocom.org/osmo-bsc/commit/?h=neels/12625<br>(If they are ok then squash into this one)</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">The reasons:<br> <br>- code dup<br>- missing counter<br>- missing send_assignment_complete() error handling<br>- the req struct is coming in during the assignment_start() and should then remain unchanged, i.e. moved req->chan_mode_rate to conn.assignment</pre></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12625/5/src/osmo-bsc/handover_fsm.c">File src/osmo-bsc/handover_fsm.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/12625/5/src/osmo-bsc/handover_fsm.c@716">Patch Set #5, Line 716:</a> <code style="font-family:monospace,monospace">                    sc.cfg = conn->assignment.req.ch_mode_rate.s15_s0;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Noticing this problem that exists before this patch:</p><p style="white-space: pre-wrap; word-wrap: break-word;">This is reaching into the wrong place. The conn->assignment is only valid *during* an assignment. If you need the ch_mode_rate after assignment is done, it has to be copied out of conn->assignment.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The idea is:</p><ul><li>assignment_req data represents the request coming in. the request can be accepted or denied. If it is accepted, pass req to assignment_start(). From now on req is cast in stone and is only the input data.</li><li>during assignment, keep all state in and only in conn->assignment.*, leave conn->lchan and other conn->* unchanged.</li><li>when assignment was successful, copy all relevant data to conn->lchan or conn->foo, so that now conn->assignment is unused.</li><li>so that if we start another assignment (which might fail) we do not affect the conn->lchan state.</li><li>if assignment fails, leave conn->* unchanged, hence just continue as if no assignment happened at all.</li></ul><p style="white-space: pre-wrap; word-wrap: break-word;">I am submitting a patch that puts the s15_s0 bits into struct gsm_lchan after activation, instead:</p><p style="white-space: pre-wrap; word-wrap: break-word;">https://gerrit.osmocom.org/#/c/osmo-bsc/+/12734</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/12625">change 12625</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/12625"/><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-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I5239e05c1cfbcb8af28f43373a58fa6c2d216c51 </div>
<div style="display:none"> Gerrit-Change-Number: 12625 </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-Assignee: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Max <msuraev@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 30 Jan 2019 16:02:07 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>