What about out-of-place crypto operations? It's possible to encrypt/decrypt a non-linear packet into a linear skb directly, avoiding an extra copy.
this should be what happens already. We use sg APIs to map the output in the same skb as input.
You don't think this is happening?
However, please let's open another issue to discuss separete topics.
Originally posted by @ordex in #28
|
aead_request_set_crypt(req, sg, sg, payload_len + tag_size, iv); |
Out-of-place means src != dst. If a non-linear skb is received, it can be passed as src without linearization, while dst can be a newly allocated linear skb.
Originally posted by @ordex in #28
ovpn-net-next/drivers/net/ovpn/crypto_aead.c
Line 319 in cbf42ac
Out-of-place means
src != dst. If a non-linear skb is received, it can be passed assrcwithout linearization, whiledstcan be a newly allocated linear skb.