]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/async/crypto_onwire: perform decryption in place
authorIlya Dryomov <idryomov@gmail.com>
Thu, 23 Apr 2020 17:51:55 +0000 (19:51 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 12 Jun 2020 12:37:48 +0000 (14:37 +0200)
commitfe97a000990632dbe9734e0d3a96df627f104f7a
treedacb12d135b01db95df1f5e65579741507a72ffb
parentb3e39b1becfef93abbc604a78f832ffe03996af3
msg/async/crypto_onwire: perform decryption in place

OpenSSL supports in-place decryption so we can avoid
allocating potentially multi-megabyte and strictly aligned
buffer for each decryption operation.

ProtocolV2 actually gets the alignment wrong: after
read_frame_segment() allocates with cur_rx_desc.alignment,
handle_read_frame_segment() effectively replaces that with
segment_t::DEFAULT_ALIGNMENT.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/msg/async/ProtocolV2.cc
src/msg/async/crypto_onwire.cc
src/msg/async/crypto_onwire.h