<p>Patch set 1:<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/9395">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/9395/1/src/gprs_rlcmac_meas.cpp">File src/gprs_rlcmac_meas.cpp:</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/9395/1/src/gprs_rlcmac_meas.cpp@82">Patch Set #1, Line 82:</a> <code style="font-family:monospace,monospace">     if (now_tv.tv_sec < rssi_tv->tv_sec ||</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Use timespeccmp() here (include osmocom/core/timer_compat.h)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/9395/1/src/gprs_rlcmac_meas.cpp@91">Patch Set #1, Line 91:</a> <code style="font-family:monospace,monospace">             + (((now_tv.tv_nsec - rssi_tv->tv_nsec)/1000) << 7) / 1000000;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I can't claim I understand what's going on in here with the "<< 7", why is it being done this way.<br>But for sure this seems to be wrong, even with a monotonic clock:<br>Get rssi_tv = {6, 9999} and now_tv = {7, 00001}. The substraction of nsec will be negative despite clock is correctly advancing in monotonic way.</p><p style="white-space: pre-wrap; word-wrap: break-word;">So I'm not sure what exactly this code does, but it's wrong.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/9395/1/src/gprs_rlcmac_meas.cpp@142">Patch Set #1, Line 142:</a> <code style="font-family:monospace,monospace">     if (now_tv.tv_sec < loss_tv->tv_sec ||</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Same</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/9395/1/src/gprs_rlcmac_meas.cpp@194">Patch Set #1, Line 194:</a> <code style="font-family:monospace,monospace">   if (now_tv.tv_sec < bw_tv->tv_sec ||</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Same</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/9395">change 9395</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/9395"/><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-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I7a3aaba8eba73fad09bebc1f32e832fc25f8eb28 </div>
<div style="display:none"> Gerrit-Change-Number: 9395 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Stefan Sperling <ssperling@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 31 May 2018 09:58:31 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>