On Thu, Aug 20, 2015 at 1:08 PM, Eric Dumazet <eric.duma...@gmail.com> wrote: > From: Eric Dumazet <eduma...@google.com> > > slow start after idle might reduce cwnd, but we perform this > after first packet was cooked and sent. > > With TSO/GSO, it means that we might send a full TSO packet > even if cwnd should have been reduced to IW10. > > Moving the SSAI check in skb_entail() makes sense, because > we slightly reduce number of times this check is done, > especially for large send() and TCP Small queue callbacks from > softirq context.
Very nice catch, and this fix seems like a definite improvement. One potential issue is that the connection can restart from idle not just because new data has been written (which this patch addresses), but also because the receive window opens and so now packets can be sent again. The old version of the code implicitly fired the restart code path in the "receive window opens" case as well, since it fired every time new data was sent. We might want to check if we need to call tcp_cwnd_restart() in tcp_ack_update_window(), next to the call for tcp_fast_path_check()? neal -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html