diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-04-09 14:59:39 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:43 -0400 |
commit | 604763722c655c7e3f31ecf6f7b4dafcd26a7a15 (patch) | |
tree | a5c07f0e22ac86e7ca7a8c80bd3f111116610edd /net/ipv4/tcp_input.c | |
parent | 628592ccdbbb5bb751217cf02e2e7abb500d7ffe (diff) |
[NET]: Treat CHECKSUM_PARTIAL as CHECKSUM_UNNECESSARY
When a transmitted packet is looped back directly, CHECKSUM_PARTIAL
maps to the semantics of CHECKSUM_UNNECESSARY. Therefore we should
treat it as such in the stack.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 9c3b4c7a50ad..d1604f59d77e 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -4009,7 +4009,7 @@ static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen) | |||
4009 | int err; | 4009 | int err; |
4010 | 4010 | ||
4011 | local_bh_enable(); | 4011 | local_bh_enable(); |
4012 | if (skb->ip_summed==CHECKSUM_UNNECESSARY) | 4012 | if (skb_csum_unnecessary(skb)) |
4013 | err = skb_copy_datagram_iovec(skb, hlen, tp->ucopy.iov, chunk); | 4013 | err = skb_copy_datagram_iovec(skb, hlen, tp->ucopy.iov, chunk); |
4014 | else | 4014 | else |
4015 | err = skb_copy_and_csum_datagram_iovec(skb, hlen, | 4015 | err = skb_copy_and_csum_datagram_iovec(skb, hlen, |
@@ -4041,7 +4041,7 @@ static __sum16 __tcp_checksum_complete_user(struct sock *sk, struct sk_buff *skb | |||
4041 | 4041 | ||
4042 | static inline int tcp_checksum_complete_user(struct sock *sk, struct sk_buff *skb) | 4042 | static inline int tcp_checksum_complete_user(struct sock *sk, struct sk_buff *skb) |
4043 | { | 4043 | { |
4044 | return skb->ip_summed != CHECKSUM_UNNECESSARY && | 4044 | return !skb_csum_unnecessary(skb) && |
4045 | __tcp_checksum_complete_user(sk, skb); | 4045 | __tcp_checksum_complete_user(sk, skb); |
4046 | } | 4046 | } |
4047 | 4047 | ||
@@ -4059,7 +4059,7 @@ static int tcp_dma_try_early_copy(struct sock *sk, struct sk_buff *skb, int hlen | |||
4059 | if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list) | 4059 | if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list) |
4060 | tp->ucopy.dma_chan = get_softnet_dma(); | 4060 | tp->ucopy.dma_chan = get_softnet_dma(); |
4061 | 4061 | ||
4062 | if (tp->ucopy.dma_chan && skb->ip_summed == CHECKSUM_UNNECESSARY) { | 4062 | if (tp->ucopy.dma_chan && skb_csum_unnecessary(skb)) { |
4063 | 4063 | ||
4064 | dma_cookie = dma_skb_copy_datagram_iovec(tp->ucopy.dma_chan, | 4064 | dma_cookie = dma_skb_copy_datagram_iovec(tp->ucopy.dma_chan, |
4065 | skb, hlen, tp->ucopy.iov, chunk, tp->ucopy.pinned_list); | 4065 | skb, hlen, tp->ucopy.iov, chunk, tp->ucopy.pinned_list); |