<p>pespin <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/17282">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">llc_queue::{dequeue,enqueue}() refactor<br><br>As seen in OS#4420, setting the MetaInfo.recv_time outside of<br>llc_queue before calling llc_queue::enqueue() and later on using that<br>value in llc_queue itself at dequeue time is not a good idea, since it<br>can provoke errors if the recv_time was not set correctly.<br>For instance, LlcTest was not setting the value for recv_time on some<br>test, which ended up with a huge millisec value when substracting now()<br>from it:<br>"""<br>llc.cpp:215:29: runtime error: signed integer overflow: 1582738663 * 1000 cannot be represented in type 'long int'<br>"""<br>This issue only appeared when started building on a raspberrypi4.<br><br>Let's better set/store the MetaInfo.recv_time internally during<br>llc_queue::enqueue(). Then, enqueue() only needs the<br>MetaInfo.expire_time, so let's change its arg list to only receive that<br>to avoid confusions.<br><br>Take the chance to move the llc_queue APIs to use osmo_gettimeofday,<br>since we need to fake the time now that the API itself sets that time.<br><br>Also take the chance during this refactor to disallow passing null<br>pointer by default since no user needs that.<br><br>Finally, update the LlcTest accordingly with all API/behavior changes.<br><br>Related: OS#4420<br>Change-Id: Ief6b1464dc779ff22adc2b02da7a006cd772ebce<br>---<br>M src/llc.cpp<br>M src/llc.h<br>M src/tbf_dl.cpp<br>M tests/llc/LlcTest.cpp<br>4 files changed, 57 insertions(+), 47 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/82/17282/2</pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/17282">change 17282</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/c/osmo-pcu/+/17282"/><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-Change-Id: Ief6b1464dc779ff22adc2b02da7a006cd772ebce </div>
<div style="display:none"> Gerrit-Change-Number: 17282 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>