diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
| commit | 026477c1141b67e98e3bd8bdedb7d4b88a3ecd09 (patch) | |
| tree | 2624a44924c625c367f3cebf937853b9da2de282 /net/ipv4/tcp_output.c | |
| parent | 9f2fa466383ce100b90fe52cb4489d7a26bf72a9 (diff) | |
| parent | 29454dde27d8e340bb1987bad9aa504af7081eba (diff) | |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'net/ipv4/tcp_output.c')
| -rw-r--r-- | net/ipv4/tcp_output.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index bdd71db8bf90..5c08ea20a18d 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
| @@ -510,8 +510,7 @@ static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb) | |||
| 510 | 510 | ||
| 511 | static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, unsigned int mss_now) | 511 | static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, unsigned int mss_now) |
| 512 | { | 512 | { |
| 513 | if (skb->len <= mss_now || | 513 | if (skb->len <= mss_now || !sk_can_gso(sk)) { |
| 514 | !(sk->sk_route_caps & NETIF_F_TSO)) { | ||
| 515 | /* Avoid the costly divide in the normal | 514 | /* Avoid the costly divide in the normal |
| 516 | * non-TSO case. | 515 | * non-TSO case. |
| 517 | */ | 516 | */ |
| @@ -525,7 +524,7 @@ static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, unsigned | |||
| 525 | factor /= mss_now; | 524 | factor /= mss_now; |
| 526 | skb_shinfo(skb)->gso_segs = factor; | 525 | skb_shinfo(skb)->gso_segs = factor; |
| 527 | skb_shinfo(skb)->gso_size = mss_now; | 526 | skb_shinfo(skb)->gso_size = mss_now; |
| 528 | skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4; | 527 | skb_shinfo(skb)->gso_type = sk->sk_gso_type; |
| 529 | } | 528 | } |
| 530 | } | 529 | } |
| 531 | 530 | ||
| @@ -824,9 +823,7 @@ unsigned int tcp_current_mss(struct sock *sk, int large_allowed) | |||
| 824 | 823 | ||
| 825 | mss_now = tp->mss_cache; | 824 | mss_now = tp->mss_cache; |
| 826 | 825 | ||
| 827 | if (large_allowed && | 826 | if (large_allowed && sk_can_gso(sk) && !tp->urg_mode) |
| 828 | (sk->sk_route_caps & NETIF_F_TSO) && | ||
| 829 | !tp->urg_mode) | ||
| 830 | doing_tso = 1; | 827 | doing_tso = 1; |
| 831 | 828 | ||
| 832 | if (dst) { | 829 | if (dst) { |
| @@ -2044,8 +2041,6 @@ struct sk_buff * tcp_make_synack(struct sock *sk, struct dst_entry *dst, | |||
| 2044 | memset(th, 0, sizeof(struct tcphdr)); | 2041 | memset(th, 0, sizeof(struct tcphdr)); |
| 2045 | th->syn = 1; | 2042 | th->syn = 1; |
| 2046 | th->ack = 1; | 2043 | th->ack = 1; |
| 2047 | if (dst->dev->features&NETIF_F_TSO) | ||
| 2048 | ireq->ecn_ok = 0; | ||
| 2049 | TCP_ECN_make_synack(req, th); | 2044 | TCP_ECN_make_synack(req, th); |
| 2050 | th->source = inet_sk(sk)->sport; | 2045 | th->source = inet_sk(sk)->sport; |
| 2051 | th->dest = ireq->rmt_port; | 2046 | th->dest = ireq->rmt_port; |
