Re: [PATCH 10/25]: Shorten statement for updating p

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/2/07, Gerrit Renker <gerrit@xxxxxxxxxxxxxx> wrote:
|  > +       /* 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).

No leave it in then - it's just a matter of style, not logic.

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.

Yes I understand your pain and hope I didn't cause too much of it...

--
Web: http://wand.net.nz/~iam4/
Blog: http://iansblog.jandi.co.nz
WAND Network Research Group
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [IETF DCCP]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux