mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
[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>
This commit is contained in:
parent
628592ccdb
commit
604763722c
13 changed files with 29 additions and 28 deletions
|
@ -4009,7 +4009,7 @@ static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen)
|
|||
int err;
|
||||
|
||||
local_bh_enable();
|
||||
if (skb->ip_summed==CHECKSUM_UNNECESSARY)
|
||||
if (skb_csum_unnecessary(skb))
|
||||
err = skb_copy_datagram_iovec(skb, hlen, tp->ucopy.iov, chunk);
|
||||
else
|
||||
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
|
|||
|
||||
static inline int tcp_checksum_complete_user(struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
return skb->ip_summed != CHECKSUM_UNNECESSARY &&
|
||||
return !skb_csum_unnecessary(skb) &&
|
||||
__tcp_checksum_complete_user(sk, skb);
|
||||
}
|
||||
|
||||
|
@ -4059,7 +4059,7 @@ static int tcp_dma_try_early_copy(struct sock *sk, struct sk_buff *skb, int hlen
|
|||
if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list)
|
||||
tp->ucopy.dma_chan = get_softnet_dma();
|
||||
|
||||
if (tp->ucopy.dma_chan && skb->ip_summed == CHECKSUM_UNNECESSARY) {
|
||||
if (tp->ucopy.dma_chan && skb_csum_unnecessary(skb)) {
|
||||
|
||||
dma_cookie = dma_skb_copy_datagram_iovec(tp->ucopy.dma_chan,
|
||||
skb, hlen, tp->ucopy.iov, chunk, tp->ucopy.pinned_list);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue