Skip to content

Commit

Permalink
net: Allow tunnels to use inner checksum offloads with outer checksum…
Browse files Browse the repository at this point in the history
…s needed

This patch enables us to use inner checksum offloads if provided by
hardware with outer checksums computed by software.

It basically reduces encap_hdr_csum to an advisory flag for now, but based
on the fact that SCTP may be getting segmentation support before long I
thought we may want to keep it as it is possible we may need to support
CRC32c and 1's compliment checksum in the same packet at some point in the
future.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Acked-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexander Duyck authored and David S. Miller committed Feb 11, 2016
1 parent dbef491 commit f245d07
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -3004,8 +3004,7 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
if (unlikely(!proto))
return ERR_PTR(-EINVAL);

csum = !head_skb->encap_hdr_csum &&
!!can_checksum_protocol(features, proto);
csum = !!can_checksum_protocol(features, proto);

headroom = skb_headroom(head_skb);
pos = skb_headlen(head_skb);
Expand Down

0 comments on commit f245d07

Please sign in to comment.