From aa895bd439341a8f218d8f1a3d21359ba058c13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 9 Oct 2018 10:50:43 +0100 Subject: crypto: annotate xts_tweak_encdec as inlineable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Alberto Garcia Signed-off-by: Daniel P. Berrangé --- crypto/xts.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crypto') diff --git a/crypto/xts.c b/crypto/xts.c index 10ec83ff21..4277ad40de 100644 --- a/crypto/xts.c +++ b/crypto/xts.c @@ -81,11 +81,11 @@ static void xts_mult_x(xts_uint128 *I) * * Encrypt/decrypt data with a tweak */ -static void xts_tweak_encdec(const void *ctx, - xts_cipher_func *func, - const xts_uint128 *src, - xts_uint128 *dst, - xts_uint128 *iv) +static inline void xts_tweak_encdec(const void *ctx, + xts_cipher_func *func, + const xts_uint128 *src, + xts_uint128 *dst, + xts_uint128 *iv) { /* tweak encrypt block i */ xts_uint128_xor(dst, src, iv); -- cgit v1.2.3