aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-08-29 19:44:56 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 17:53:53 -0400
commit84fa7933a33f806bbbaae6775e87459b1ec584c0 (patch)
tree5be404225d90f640997b12f631e9b496b3fd0d61 /net/ipv4/tcp.c
parent8584d6df39db5601965f9bc5e3bf2fea833ad7bb (diff)
[NET]: Replace CHECKSUM_HW by CHECKSUM_PARTIAL/CHECKSUM_COMPLETE
Replace CHECKSUM_HW by CHECKSUM_PARTIAL (for outgoing packets, whose checksum still needs to be completed) and CHECKSUM_COMPLETE (for incoming packets, device supplied full checksum). Patch originally from Herbert Xu, updated by myself for 2.6.18-rc3. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 934396bb1376..b0124e69ab38 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -568,7 +568,7 @@ new_segment:
568 skb->truesize += copy; 568 skb->truesize += copy;
569 sk->sk_wmem_queued += copy; 569 sk->sk_wmem_queued += copy;
570 sk->sk_forward_alloc -= copy; 570 sk->sk_forward_alloc -= copy;
571 skb->ip_summed = CHECKSUM_HW; 571 skb->ip_summed = CHECKSUM_PARTIAL;
572 tp->write_seq += copy; 572 tp->write_seq += copy;
573 TCP_SKB_CB(skb)->end_seq += copy; 573 TCP_SKB_CB(skb)->end_seq += copy;
574 skb_shinfo(skb)->gso_segs = 0; 574 skb_shinfo(skb)->gso_segs = 0;
@@ -723,7 +723,7 @@ new_segment:
723 * Check whether we can use HW checksum. 723 * Check whether we can use HW checksum.
724 */ 724 */
725 if (sk->sk_route_caps & NETIF_F_ALL_CSUM) 725 if (sk->sk_route_caps & NETIF_F_ALL_CSUM)
726 skb->ip_summed = CHECKSUM_HW; 726 skb->ip_summed = CHECKSUM_PARTIAL;
727 727
728 skb_entail(sk, tp, skb); 728 skb_entail(sk, tp, skb);
729 copy = size_goal; 729 copy = size_goal;
@@ -2205,7 +2205,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
2205 th->fin = th->psh = 0; 2205 th->fin = th->psh = 0;
2206 2206
2207 th->check = ~csum_fold(th->check + delta); 2207 th->check = ~csum_fold(th->check + delta);
2208 if (skb->ip_summed != CHECKSUM_HW) 2208 if (skb->ip_summed != CHECKSUM_PARTIAL)
2209 th->check = csum_fold(csum_partial(skb->h.raw, thlen, 2209 th->check = csum_fold(csum_partial(skb->h.raw, thlen,
2210 skb->csum)); 2210 skb->csum));
2211 2211
@@ -2219,7 +2219,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
2219 2219
2220 delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len); 2220 delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len);
2221 th->check = ~csum_fold(th->check + delta); 2221 th->check = ~csum_fold(th->check + delta);
2222 if (skb->ip_summed != CHECKSUM_HW) 2222 if (skb->ip_summed != CHECKSUM_PARTIAL)
2223 th->check = csum_fold(csum_partial(skb->h.raw, thlen, 2223 th->check = csum_fold(csum_partial(skb->h.raw, thlen,
2224 skb->csum)); 2224 skb->csum));
2225 2225