RE: Some question about DCTCP implementation in FreeBSD

2019-06-06 Thread Scheffenegger, Richard
Hi Yu He, This code is simply using integer arithmetics (float is not really possible in the kernel), left-shifting the fractional value of g by 1024 (10 bits). Max_alpha_value = 1024 is “1” shifted left by 10. Agreed that this is not clearly documented, and I believe the sysctl handler also

Re: Some question about DCTCP implementation in FreeBSD

2019-06-04 Thread Lars Eggert
Hi, glad to see interest in DCTCP! On 2019-6-4, at 11:05, Yu He via freebsd-net 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