]> git.apps.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>
Mon, 13 Jul 2020 12:44:52 +0000 (14:44 +0200)
commitf1ad217525ea5f69d047422c88aa70d698c02efc
tree67bd1881aa64044a5c8f4bb85e564c0f1b243f9f
parent4108c5dd66ef95ceb4740c78d5e947591c7ab794
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>
(cherry picked from commit fe97a000990632dbe9734e0d3a96df627f104f7a)
src/msg/async/ProtocolV2.cc
src/msg/async/crypto_onwire.cc
src/msg/async/crypto_onwire.h