From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: [PATCH 10/25]: Shorten statement for updating p
Date: Wed, 21 Mar 2007 18:44:54 +0000 [thread overview]
Message-ID: <200703211844.54487@strip-the-willow> (raw)
[CCID 3]: Shorten statement for updating p
This shortens the statement for updating the loss event
rate p when a feedback packet is received.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/ccids/ccid3.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -466,12 +466,9 @@ static void ccid3_hc_tx_packet_recv(stru
hctx->ccid3hctx_x_recv = opt_recv->ccid3or_receive_rate;
hctx->ccid3hctx_x_recv <<= 6;
- /* Update loss event rate */
+ /* Update loss event rate (scaled by 1e6), cf. RFC 4342, 8.5 */
pinv = opt_recv->ccid3or_loss_event_rate;
- if (pinv = ~0U || pinv = 0) /* see RFC 4342, 8.5 */
- hctx->ccid3hctx_p = 0;
- else /* can not exceed 100% */
- hctx->ccid3hctx_p = 1000000 / pinv;
+ hctx->ccid3hctx_p = (pinv = ~0U || pinv = 0)? 0 : scaled_div(1, pinv);
/*
* Calculate new round trip sample as per [RFC 3448, 4.3] by
next reply other threads:[~2007-03-21 18:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-21 18:44 Gerrit Renker [this message]
2007-03-26 3:06 ` [PATCH 10/25]: Shorten statement for updating p Ian McDonald
2007-04-02 8:48 ` Gerrit Renker
2007-04-02 8:51 ` Ian McDonald
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200703211844.54487@strip-the-willow \
--to=gerrit@erg.abdn.ac.uk \
--cc=dccp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.