OSDN Git Service

[NET]: Add per-connection option to set max TSO frame size
[uclinux-h8/linux.git] / net / ipv4 / tcp_output.c
index b4e11d8..a627616 100644 (file)
@@ -998,7 +998,7 @@ unsigned int tcp_current_mss(struct sock *sk, int large_allowed)
        xmit_size_goal = mss_now;
 
        if (doing_tso) {
-               xmit_size_goal = (65535 -
+               xmit_size_goal = ((sk->sk_gso_max_size - 1) -
                                  inet_csk(sk)->icsk_af_ops->net_header_len -
                                  inet_csk(sk)->icsk_ext_hdr_len -
                                  tp->tcp_header_len);
@@ -1282,7 +1282,7 @@ static int tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb)
        limit = min(send_win, cong_win);
 
        /* If a full-sized TSO skb can be sent, do it. */
-       if (limit >= 65536)
+       if (limit >= sk->sk_gso_max_size)
                goto send_now;
 
        if (sysctl_tcp_tso_win_divisor) {