Change in osmo-trx[master]: trx_rate_ctr: Fix immediate rescheduling on per-sec thresholds

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

neels gerrit-no-reply at lists.osmocom.org
Mon Jun 29 16:13:55 UTC 2020


neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/19049 )

Change subject: trx_rate_ctr: Fix immediate rescheduling on per-sec thresholds
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/c/osmo-trx/+/19049/1/CommonLibs/trx_rate_ctr.cpp 
File CommonLibs/trx_rate_ctr.cpp:

https://gerrit.osmocom.org/c/osmo-trx/+/19049/1/CommonLibs/trx_rate_ctr.cpp@263 
PS1, Line 263: 	threshold_timer_sched_secs = OSMO_MAX((int)(min_secs / 2 - 1), 1);
I think you need to cast 'min_secs' before the operation, otherwise you're still getting an unsigned int cast back to an int. That can go well if both are of the same size, but code shouldn't depend on size_t being identical size as int.

  ((int)min_secs) / 2 - 1

And then you're assigning it back to an unsigned int??

or maybe I'm not understanding the issue...

"for 5 underruns the statement in OSMO_MAX becomes -1"
wondering how 5 / 2 - 1 can ever become -1...

Can you explain for dummies in the commit log? Can't wrap my head around it



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/19049
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I6ea3d64dff189a5bc924e72d846e02d50536a8ea
Gerrit-Change-Number: 19049
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Comment-Date: Mon, 29 Jun 2020 16:13:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200629/03fa20fd/attachment.htm>


More information about the gerrit-log mailing list