summaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorDavide Caratti <dcaratti@redhat.com>2017-05-18 16:44:40 +0300
committerDavid S. Miller <davem@davemloft.net>2017-05-20 02:21:29 +0300
commitdba003067a43a9699bef0c4bdbe320ece5a109b8 (patch)
tree3daa11a9bfb1185e5ad54cbabfd1515d79f42419 /net/sched
parent219f1d79871257e9603f504dce0fe8ebf47aad08 (diff)
downloadlinux-dba003067a43a9699bef0c4bdbe320ece5a109b8.tar.xz
net: use skb->csum_not_inet to identify packets needing crc32c
skb->csum_not_inet carries the indication on which algorithm is needed to compute checksum on skb in the transmit path, when skb->ip_summed is equal to CHECKSUM_PARTIAL. If skb carries a SCTP packet and crc32c hasn't been yet written in L4 header, skb->csum_not_inet is assigned to 1; otherwise, assume Internet Checksum is needed and thus set skb->csum_not_inet to 0. Suggested-by: Tom Herbert <tom@herbertland.com> Signed-off-by: Davide Caratti <dcaratti@redhat.com> Acked-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/act_csum.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c
index ab6fdbd34db7..3317a2f579da 100644
--- a/net/sched/act_csum.c
+++ b/net/sched/act_csum.c
@@ -350,6 +350,7 @@ static int tcf_csum_sctp(struct sk_buff *skb, unsigned int ihl,
sctph->checksum = sctp_compute_cksum(skb,
skb_network_offset(skb) + ihl);
skb->ip_summed = CHECKSUM_NONE;
+ skb->csum_not_inet = 0;
return 1;
}