code does not match comment

        head = tcp_write_queue_head(sk);
        skb_mstamp_get(&now);
        age = skb_mstamp_us_delta(&now, &head->skb_mstamp);
        /* If next ACK is likely to come too late (half srtt), do not defer */
        if (age < (tp->srtt_us >> 4))
                goto send_now;

This bug will cause TSO packets being transmitted too early, and force
software to tear them apart.

When ack clocking is likely to broke, this check will try to push out
some EXTRA probe the first chance possible. Some transmission has
already happened due to Eric's work.

This patch fix the check.
---
 net/ipv4/tcp_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index b26aa87..7082964 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1833,7 +1833,7 @@ static bool tcp_tso_should_defer(struct sock *sk, struct 
sk_buff *skb,
        skb_mstamp_get(&now);
        age = skb_mstamp_us_delta(&now, &head->skb_mstamp);
        /* If next ACK is likely to come too late (half srtt), do not defer */
-       if (age < (tp->srtt_us >> 4))
+       if (age > (tp->srtt_us >> 4))
                goto send_now;
 
        /* Ok, it looks like it is advisable to defer. */
-- 
1.8.3.1

Reply via email to