[riot-notifications] [RIOT-OS/RIOT] congure_quic: initial import of QUIC congestion control (#15952)

Martine Lenders notifications at github.com
Fri Sep 10 12:14:14 CEST 2021


@miri64 commented on this pull request.



> +     * is set, let's cap it at UINT16_MAX */
+    if ((ack_recv_time - msg_send_time) > UINT16_MAX) {
+        latest_rtt = UINT16_MAX;
+    }
+    else {
+        latest_rtt = ack_recv_time - msg_send_time;
+    }
+
+    if (c->first_rtt_sample > 0) {
+        c->min_rtt = (c->min_rtt > latest_rtt) ? latest_rtt : c->min_rtt;
+        /* adjust latest_rtt for ack_delay if plausible */
+        if (latest_rtt > (c->min_rtt + ack_delay)) {
+            latest_rtt -= ack_delay;
+        }
+        c->rtt_var = ((3U * c->rtt_var) / 4U) +
+                     /* abs(c->smoothed_rtt - latest_rtt) / 4 */

Because there is no `abs()` function in C, as far as I am aware of. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15952#discussion_r706065895
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210910/e2e08d2a/attachment.htm>


More information about the notifications mailing list