While investigating a semi-related issue, an off-by-one
issue got uncovered when TCP timestamps (RFC7323) are in
use.
In D18940 all the initial window calculations were
consolitated, it the dynamic tcp_maxseg() function got
used to correctly arrive at the congestion window to use.
However, the fastpath in tcp_output tries to send out
full segments, and avoid sending partial segments by
comparing against the static t_maxseg variable. That
does not take any TCP header options into consideration.
Thus the tcp_output code considers the last, full size
(including TCP options) segment to be too short and
refrains from sending, resulting in a off-by-one
number of segments sent during the initial window.