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>
This commit is contained in:

committed by
David S. Miller

parent
219f1d7987
commit
dba003067a
@@ -2649,6 +2649,7 @@ int skb_crc32c_csum_help(struct sk_buff *skb)
|
||||
crc32c_csum_stub));
|
||||
*(__le32 *)(skb->data + offset) = crc32c_csum;
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
skb->csum_not_inet = 0;
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user