Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/9395 )

Change subject: log warnings when measurements arrive from the future
......................................................................


Patch Set 1: Code-Review-1

(4 comments)

https://gerrit.osmocom.org/#/c/9395/1/src/gprs_rlcmac_meas.cpp
File src/gprs_rlcmac_meas.cpp:

https://gerrit.osmocom.org/#/c/9395/1/src/gprs_rlcmac_meas.cpp@82
PS1, Line 82:   if (now_tv.tv_sec < rssi_tv->tv_sec ||
Use timespeccmp() here (include osmocom/core/timer_compat.h)


https://gerrit.osmocom.org/#/c/9395/1/src/gprs_rlcmac_meas.cpp@91
PS1, Line 91:           + (((now_tv.tv_nsec - rssi_tv->tv_nsec)/1000) << 7) / 
1000000;
I can't claim I understand what's going on in here with the "<< 7", why is it 
being done this way.
But for sure this seems to be wrong, even with a monotonic clock:
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.

So I'm not sure what exactly this code does, but it's wrong.


https://gerrit.osmocom.org/#/c/9395/1/src/gprs_rlcmac_meas.cpp@142
PS1, Line 142:  if (now_tv.tv_sec < loss_tv->tv_sec ||
Same


https://gerrit.osmocom.org/#/c/9395/1/src/gprs_rlcmac_meas.cpp@194
PS1, Line 194:  if (now_tv.tv_sec < bw_tv->tv_sec ||
Same



--
To view, visit https://gerrit.osmocom.org/9395
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7a3aaba8eba73fad09bebc1f32e832fc25f8eb28
Gerrit-Change-Number: 9395
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>
Gerrit-Comment-Date: Thu, 31 May 2018 09:58:31 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes

Reply via email to