]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
esp6: Avoid skb_cow_data whenever possible
authorSteffen Klassert <steffen.klassert@secunet.com>
Tue, 17 Jan 2017 09:23:03 +0000 (10:23 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 17 Jan 2017 09:23:03 +0000 (10:23 +0100)
commit03e2a30f6a27e2f3e5283b777f6ddd146b38c738
tree7edbea6c3150bc379018743705c30f25972d209c
parentcac2661c53f35cbe651bef9b07026a5a05ab8ce0
esp6: Avoid skb_cow_data whenever possible

This patch tries to avoid skb_cow_data on esp6.

On the encrypt side we add the IPsec tailbits
to the linear part of the buffer if there is
space on it. If there is no space on the linear
part, we add a page fragment with the tailbits to
the buffer and use separate src and dst scatterlists.

On the decrypt side, we leave the buffer as it is
if it is not cloned.

With this, we can avoid a linearization of the buffer
in most of the cases.

Joint work with:
Sowmini Varadhan <sowmini.varadhan@oracle.com>
Ilan Tayari <ilant@mellanox.com>

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: Ilan Tayari <ilant@mellanox.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/ipv6/esp6.c