[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181120030942.hzafvyytk5mia5fe@gondor.apana.org.au>
Date: Tue, 20 Nov 2018 11:09:42 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
Tom Herbert <tom@...bertland.com>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [Patch net] net: invert the check of detecting hardware RX
checksum fault
On Mon, Nov 19, 2018 at 11:25:47AM -0800, Cong Wang wrote:
>
> Hmm, it calls csum_tcpudp_magic() directly instead of
> __skb_checksum_validate_complete(), but it also sets ip_summed
> to CHECKSUM_UNNECESSARY:
>
> 20 if ((protocol == 0 && !csum_fold(skb->csum)) ||
> 21 !csum_tcpudp_magic(iph->saddr, iph->daddr,
> 22 skb->len - dataoff, protocol,
> 23 skb->csum)) {
> 24 skb->ip_summed = CHECKSUM_UNNECESSARY;
> 25 break;
> 26 }
>
> which means the rx checksum fault won't be triggered.
This is just the case where the hardware checksum is valid.
For the other case, it just ignores the hardware checksum. Perhaps
it should call rx checksum fault if the checksum turns out to be
correct in that case but it's not really a big deal.
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists