diff options
author | Davide Caratti <dcaratti@redhat.com> | 2017-05-18 15:44:40 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-19 19:21:29 -0400 |
commit | dba003067a43a9699bef0c4bdbe320ece5a109b8 (patch) | |
tree | 3daa11a9bfb1185e5ad54cbabfd1515d79f42419 /net/sctp | |
parent | 219f1d79871257e9603f504dce0fe8ebf47aad08 (diff) | |
download | op-kernel-dev-dba003067a43a9699bef0c4bdbe320ece5a109b8.zip op-kernel-dev-dba003067a43a9699bef0c4bdbe320ece5a109b8.tar.gz |
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/sctp')
-rw-r--r-- | net/sctp/offload.c | 1 | ||||
-rw-r--r-- | net/sctp/output.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/net/sctp/offload.c b/net/sctp/offload.c index b671984..275925b 100644 --- a/net/sctp/offload.c +++ b/net/sctp/offload.c @@ -35,6 +35,7 @@ static __le32 sctp_gso_make_checksum(struct sk_buff *skb) { skb->ip_summed = CHECKSUM_NONE; + skb->csum_not_inet = 0; return sctp_compute_cksum(skb, skb_transport_offset(skb)); } diff --git a/net/sctp/output.c b/net/sctp/output.c index 1409a87..e2edf2e 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c @@ -538,6 +538,7 @@ merge: } else { chksum: head->ip_summed = CHECKSUM_PARTIAL; + head->csum_not_inet = 1; head->csum_start = skb_transport_header(head) - head->head; head->csum_offset = offsetof(struct sctphdr, checksum); } |