Commit aa895bd4 authored by Daniel P. Berrangé's avatar Daniel P. Berrangé
Browse files

crypto: annotate xts_tweak_encdec as inlineable



Encouraging the compiler to inline xts_tweak_encdec increases the
performance for xts-aes-128 when built with gcrypt:

  Encrypt: 545 MB/s -> 580 MB/s
  Decrypt: 568 MB/s -> 602 MB/s

Reviewed-by: default avatarAlberto Garcia <berto@igalia.com>
Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
parent 7dac0dd6
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ static void xts_mult_x(xts_uint128 *I)
 *
 * Encrypt/decrypt data with a tweak
 */
static void xts_tweak_encdec(const void *ctx,
static inline void xts_tweak_encdec(const void *ctx,
                                    xts_cipher_func *func,
                                    const xts_uint128 *src,
                                    xts_uint128 *dst,