esp4: Support RX checksum with crypto offload
authorIlan Tayari <ilant@mellanox.com>
Tue, 1 Aug 2017 09:49:04 +0000 (12:49 +0300)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 2 Aug 2017 09:00:15 +0000 (11:00 +0200)
commitec9567a9e008d1248e4d88f7ff1026ba68133621
tree3eb8ee70dd6aca66d8570c9e4d11d31b489e425c
parentcb5b136c0095d434cb63495da8efb6a3d663a38f
esp4: Support RX checksum with crypto offload

Keep the device's reported ip_summed indication in case crypto
was offloaded by the device. Subtract the csum values of the
stripped parts (esp header+iv, esp trailer+auth_data) to keep
value correct.

Note: CHECKSUM_COMPLETE should be indicated only if skb->csum
has the post-decryption offload csum value.

Signed-off-by: Ariel Levkovich <lariel@mellanox.com>
Signed-off-by: Ilan Tayari <ilant@mellanox.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/ipv4/esp4.c
net/ipv4/esp4_offload.c