Hi,

glad to see interest in DCTCP!

On 2019-6-4, at 11:05, Yu He via freebsd-net <freebsd-net@freebsd.org> wrote:
> In line 387 of file cc_tcp.c, the update of alpha is calculated by following 
> code:
> 
>     dctcp_data->alpha = min(alpha_prev - (alpha_prev >> V_dctcp_shift_g) +
>         (dctcp_data->bytes_ecn << (10 - V_dctcp_shift_g)) /
>         dctcp_data->bytes_total, MAX_ALPHA_VALUE);
> 
> As the update formula from the original paper is alpha = (1 - g) * alpha + g 
> * F, I’m wandering about what the intention is of using left-shift when 
> calculating the g * F part, which might seemingly multiplying the value 
> rather than dividing it as suggested by the previous code. Let alone the 
> operand (10 -   V_dctcp_shift_g) might be a negative value, which will lead 
> to an undefined behavior in C.

You should really, really be looking at RFC8257 
(https://tools.ietf.org/html/rfc8257) if you are interested in a DCTCP 
implementation, and not the original paper (which is of course still required 
reading for much of the background). The RFC fixes a bunch of issues with the 
paper, and this is one of them.

Also, the t...@ietf.org list is likely going to be a better forum for these 
questions, except for FreeBSD-specific ones.

Lars

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to