diff options
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index b4f3ffe1b3b4..061edfae0c29 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -43,24 +43,24 @@ | |||
43 | #include <linux/smp_lock.h> | 43 | #include <linux/smp_lock.h> |
44 | 44 | ||
45 | /* People can turn this off for buggy TCP's found in printers etc. */ | 45 | /* People can turn this off for buggy TCP's found in printers etc. */ |
46 | int sysctl_tcp_retrans_collapse = 1; | 46 | int sysctl_tcp_retrans_collapse __read_mostly = 1; |
47 | 47 | ||
48 | /* People can turn this on to work with those rare, broken TCPs that | 48 | /* People can turn this on to work with those rare, broken TCPs that |
49 | * interpret the window field as a signed quantity. | 49 | * interpret the window field as a signed quantity. |
50 | */ | 50 | */ |
51 | int sysctl_tcp_workaround_signed_windows = 0; | 51 | int sysctl_tcp_workaround_signed_windows __read_mostly = 0; |
52 | 52 | ||
53 | /* This limits the percentage of the congestion window which we | 53 | /* This limits the percentage of the congestion window which we |
54 | * will allow a single TSO frame to consume. Building TSO frames | 54 | * will allow a single TSO frame to consume. Building TSO frames |
55 | * which are too large can cause TCP streams to be bursty. | 55 | * which are too large can cause TCP streams to be bursty. |
56 | */ | 56 | */ |
57 | int sysctl_tcp_tso_win_divisor = 3; | 57 | int sysctl_tcp_tso_win_divisor __read_mostly = 3; |
58 | 58 | ||
59 | int sysctl_tcp_mtu_probing = 0; | 59 | int sysctl_tcp_mtu_probing __read_mostly = 0; |
60 | int sysctl_tcp_base_mss = 512; | 60 | int sysctl_tcp_base_mss __read_mostly = 512; |
61 | 61 | ||
62 | /* By default, RFC2861 behavior. */ | 62 | /* By default, RFC2861 behavior. */ |
63 | int sysctl_tcp_slow_start_after_idle = 1; | 63 | int sysctl_tcp_slow_start_after_idle __read_mostly = 1; |
64 | 64 | ||
65 | static void update_send_head(struct sock *sk, struct tcp_sock *tp, | 65 | static void update_send_head(struct sock *sk, struct tcp_sock *tp, |
66 | struct sk_buff *skb) | 66 | struct sk_buff *skb) |
@@ -577,7 +577,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss | |||
577 | TCP_SKB_CB(buff)->sacked = TCP_SKB_CB(skb)->sacked; | 577 | TCP_SKB_CB(buff)->sacked = TCP_SKB_CB(skb)->sacked; |
578 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_AT_TAIL; | 578 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_AT_TAIL; |
579 | 579 | ||
580 | if (!skb_shinfo(skb)->nr_frags && skb->ip_summed != CHECKSUM_HW) { | 580 | if (!skb_shinfo(skb)->nr_frags && skb->ip_summed != CHECKSUM_PARTIAL) { |
581 | /* Copy and checksum data tail into the new buffer. */ | 581 | /* Copy and checksum data tail into the new buffer. */ |
582 | buff->csum = csum_partial_copy_nocheck(skb->data + len, skb_put(buff, nsize), | 582 | buff->csum = csum_partial_copy_nocheck(skb->data + len, skb_put(buff, nsize), |
583 | nsize, 0); | 583 | nsize, 0); |
@@ -586,7 +586,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss | |||
586 | 586 | ||
587 | skb->csum = csum_block_sub(skb->csum, buff->csum, len); | 587 | skb->csum = csum_block_sub(skb->csum, buff->csum, len); |
588 | } else { | 588 | } else { |
589 | skb->ip_summed = CHECKSUM_HW; | 589 | skb->ip_summed = CHECKSUM_PARTIAL; |
590 | skb_split(skb, buff, len); | 590 | skb_split(skb, buff, len); |
591 | } | 591 | } |
592 | 592 | ||
@@ -689,7 +689,7 @@ int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len) | |||
689 | __pskb_trim_head(skb, len - skb_headlen(skb)); | 689 | __pskb_trim_head(skb, len - skb_headlen(skb)); |
690 | 690 | ||
691 | TCP_SKB_CB(skb)->seq += len; | 691 | TCP_SKB_CB(skb)->seq += len; |
692 | skb->ip_summed = CHECKSUM_HW; | 692 | skb->ip_summed = CHECKSUM_PARTIAL; |
693 | 693 | ||
694 | skb->truesize -= len; | 694 | skb->truesize -= len; |
695 | sk->sk_wmem_queued -= len; | 695 | sk->sk_wmem_queued -= len; |
@@ -1062,7 +1062,7 @@ static int tso_fragment(struct sock *sk, struct sk_buff *skb, unsigned int len, | |||
1062 | /* This packet was never sent out yet, so no SACK bits. */ | 1062 | /* This packet was never sent out yet, so no SACK bits. */ |
1063 | TCP_SKB_CB(buff)->sacked = 0; | 1063 | TCP_SKB_CB(buff)->sacked = 0; |
1064 | 1064 | ||
1065 | buff->ip_summed = skb->ip_summed = CHECKSUM_HW; | 1065 | buff->ip_summed = skb->ip_summed = CHECKSUM_PARTIAL; |
1066 | skb_split(skb, buff, len); | 1066 | skb_split(skb, buff, len); |
1067 | 1067 | ||
1068 | /* Fix up tso_factor for both original and new SKB. */ | 1068 | /* Fix up tso_factor for both original and new SKB. */ |
@@ -1206,8 +1206,7 @@ static int tcp_mtu_probe(struct sock *sk) | |||
1206 | TCP_SKB_CB(nskb)->flags = TCPCB_FLAG_ACK; | 1206 | TCP_SKB_CB(nskb)->flags = TCPCB_FLAG_ACK; |
1207 | TCP_SKB_CB(nskb)->sacked = 0; | 1207 | TCP_SKB_CB(nskb)->sacked = 0; |
1208 | nskb->csum = 0; | 1208 | nskb->csum = 0; |
1209 | if (skb->ip_summed == CHECKSUM_HW) | 1209 | nskb->ip_summed = skb->ip_summed; |
1210 | nskb->ip_summed = CHECKSUM_HW; | ||
1211 | 1210 | ||
1212 | len = 0; | 1211 | len = 0; |
1213 | while (len < probe_size) { | 1212 | while (len < probe_size) { |
@@ -1231,7 +1230,7 @@ static int tcp_mtu_probe(struct sock *sk) | |||
1231 | ~(TCPCB_FLAG_FIN|TCPCB_FLAG_PSH); | 1230 | ~(TCPCB_FLAG_FIN|TCPCB_FLAG_PSH); |
1232 | if (!skb_shinfo(skb)->nr_frags) { | 1231 | if (!skb_shinfo(skb)->nr_frags) { |
1233 | skb_pull(skb, copy); | 1232 | skb_pull(skb, copy); |
1234 | if (skb->ip_summed != CHECKSUM_HW) | 1233 | if (skb->ip_summed != CHECKSUM_PARTIAL) |
1235 | skb->csum = csum_partial(skb->data, skb->len, 0); | 1234 | skb->csum = csum_partial(skb->data, skb->len, 0); |
1236 | } else { | 1235 | } else { |
1237 | __pskb_trim_head(skb, copy); | 1236 | __pskb_trim_head(skb, copy); |
@@ -1572,10 +1571,9 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m | |||
1572 | 1571 | ||
1573 | memcpy(skb_put(skb, next_skb_size), next_skb->data, next_skb_size); | 1572 | memcpy(skb_put(skb, next_skb_size), next_skb->data, next_skb_size); |
1574 | 1573 | ||
1575 | if (next_skb->ip_summed == CHECKSUM_HW) | 1574 | skb->ip_summed = next_skb->ip_summed; |
1576 | skb->ip_summed = CHECKSUM_HW; | ||
1577 | 1575 | ||
1578 | if (skb->ip_summed != CHECKSUM_HW) | 1576 | if (skb->ip_summed != CHECKSUM_PARTIAL) |
1579 | skb->csum = csum_block_add(skb->csum, next_skb->csum, skb_size); | 1577 | skb->csum = csum_block_add(skb->csum, next_skb->csum, skb_size); |
1580 | 1578 | ||
1581 | /* Update sequence range on original skb. */ | 1579 | /* Update sequence range on original skb. */ |