]> git.baikalelectronics.ru Git - kernel.git/commit
net: avoid skb_warn_bad_offload false positives on UFO
authorWillem de Bruijn <willemb@google.com>
Tue, 8 Aug 2017 18:22:55 +0000 (14:22 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Aug 2017 04:39:01 +0000 (21:39 -0700)
commita9e162eaa88fa73e6fff13f2cddb696c97f7b80d
tree6576b105739a9652afc6c8342d6922e2df476790
parent73bebce77c4dbf99d1ec5fc13ecfd363b6eba86e
net: avoid skb_warn_bad_offload false positives on UFO

skb_warn_bad_offload triggers a warning when an skb enters the GSO
stack at __skb_gso_segment that does not have CHECKSUM_PARTIAL
checksum offload set.

Commit 6f6464ff2ac9 ("net: reduce skb_warn_bad_offload() noise")
observed that SKB_GSO_DODGY producers can trigger the check and
that passing those packets through the GSO handlers will fix it
up. But, the software UFO handler will set ip_summed to
CHECKSUM_NONE.

When __skb_gso_segment is called from the receive path, this
triggers the warning again.

Make UFO set CHECKSUM_UNNECESSARY instead of CHECKSUM_NONE. On
Tx these two are equivalent. On Rx, this better matches the
skb state (checksum computed), as CHECKSUM_NONE here means no
checksum computed.

See also this thread for context:
http://patchwork.ozlabs.org/patch/799015/

Fixes: 6f6464ff2ac9 ("net: reduce skb_warn_bad_offload() noise")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c
net/ipv4/udp_offload.c
net/ipv6/udp_offload.c