DCCP protocol discussions
 help / color / mirror / Atom feed
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: Re: [PATCH 10/25]: Shorten statement for updating p
Date: Mon, 02 Apr 2007 08:48:12 +0000	[thread overview]
Message-ID: <200704020948.13093@strip-the-willow> (raw)
In-Reply-To: <200703211844.54487@strip-the-willow>

|  > +       /* 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);
|  >
|  
|  Agree with the scaled_div bit but don't like removing if/then and
|  repalce withing ?: as harder to read and compiler can optimise just as
|  well. Matter of personal choice though so up to Arnaldo really.
|  
I could take this patch out if you / Arnaldo think so, since it is overridden later
by another patch which uses only one socket field instead of two (p depends on pinv,
so having both is redundant).
Please let me be state this - I aim as best as possible to avoid overlap and overriding
in later patches. But this is not always possible and - having just spent almost two
days integrating away another patch set with my local changesets - can sometimes be
a real nightmare. It is not always avoidable when trying to split larger changes into 
small and separate chunks. 

  parent reply	other threads:[~2007-04-02  8:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-21 18:44 [PATCH 10/25]: Shorten statement for updating p Gerrit Renker
2007-03-26  3:06 ` Ian McDonald
2007-04-02  8:48 ` Gerrit Renker [this message]
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=200704020948.13093@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox