On Mon, Jun 27, 2016 at 2:47 PM, Tom Herbert <t...@herbertland.com> wrote: > On Mon, Jun 27, 2016 at 2:44 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote: >> On Mon, Jun 27, 2016 at 2:08 PM, Or Gerlitz <gerlitz...@gmail.com> wrote: >>> On Mon, Jun 27, 2016 at 9:22 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote: >>>> The stack doesn't trust the complete csum by hardware >>>> even when it is correct. >>> >>> Can you explain that a little further? >> >> Sure, here is the code in __skb_checksum_complete(): >> >> /* skb->csum holds pseudo checksum */ >> sum = csum_fold(csum_add(skb->csum, csum)); >> if (likely(!sum)) { >> if (unlikely(skb->ip_summed == CHECKSUM_COMPLETE) && >> !skb->csum_complete_sw) >> netdev_rx_csum_fault(skb->dev); >> } >> >> So when sum == 0, it means the checksum is correct. And >> we already set ->ip_summed to CHECKSUM_COMPLETE >> after check_csum(), and ->csum_complete_sw is initialized >> to 0 when we allocate the skb. This is why we trigger >> netdev_rx_csum_fault(). >> > Yes, but this also means that the driver gave the stack a checksum > complete value that was incorrect. That's an error.
That is the whole purpose of commit f8c6455bb04b944edb69e, isn't it?