TCP RTT estimate for connections not using timestamps

Jacques Fourie jacques.fourie at gmail.com
Wed Oct 31 14:04:58 UTC 2018


Hi,


While testing with traffic generators that don’t enable the TCP timestamp
option I noticed a couple of cases where tcp_xmit_timer() was called with a
0 value for rtt with the current smoothed rtt (t_srtt) non zero. This leads
to a left shift of -1 which is undefined. Looking at the code for the case
where timestamps are enabled I see that tcp_xmit_timer() is always called
with TCP_TS_TO_TICKS(t) + 1 for the rtt. Do we need a +1 in the non
timestamp case as well?


Thanks,

Jacques


More information about the freebsd-hackers mailing list