Blame SOURCES/kvm-crypto-annotate-xts_tweak_encdec-as-inlineable.patch

b38b0f
From 8e0e5d4ff6afd4e869ff1974df13b9b3003f035b Mon Sep 17 00:00:00 2001
b38b0f
From: "Daniel P. Berrange" <berrange@redhat.com>
b38b0f
Date: Wed, 24 Apr 2019 09:56:41 +0100
b38b0f
Subject: [PATCH 7/9] crypto: annotate xts_tweak_encdec as inlineable
b38b0f
MIME-Version: 1.0
b38b0f
Content-Type: text/plain; charset=UTF-8
b38b0f
Content-Transfer-Encoding: 8bit
b38b0f
b38b0f
RH-Author: Daniel P. Berrange <berrange@redhat.com>
b38b0f
Message-id: <20190424095643.796-8-berrange@redhat.com>
b38b0f
Patchwork-id: 85884
b38b0f
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH 7/9] crypto: annotate xts_tweak_encdec as inlineable
b38b0f
Bugzilla: 1680231
b38b0f
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
b38b0f
RH-Acked-by: John Snow <jsnow@redhat.com>
b38b0f
RH-Acked-by: Eric Blake <eblake@redhat.com>
b38b0f
b38b0f
Encouraging the compiler to inline xts_tweak_encdec increases the
b38b0f
performance for xts-aes-128 when built with gcrypt:
b38b0f
b38b0f
  Encrypt: 545 MB/s -> 580 MB/s
b38b0f
  Decrypt: 568 MB/s -> 602 MB/s
b38b0f
b38b0f
Reviewed-by: Alberto Garcia <berto@igalia.com>
b38b0f
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
b38b0f
(cherry picked from commit aa895bd439341a8f218d8f1a3d21359ba058c13f)
b38b0f
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
b38b0f
---
b38b0f
 crypto/xts.c | 10 +++++-----
b38b0f
 1 file changed, 5 insertions(+), 5 deletions(-)
b38b0f
b38b0f
diff --git a/crypto/xts.c b/crypto/xts.c
b38b0f
index 10ec83f..4277ad4 100644
b38b0f
--- a/crypto/xts.c
b38b0f
+++ b/crypto/xts.c
b38b0f
@@ -81,11 +81,11 @@ static void xts_mult_x(xts_uint128 *I)
b38b0f
  *
b38b0f
  * Encrypt/decrypt data with a tweak
b38b0f
  */
b38b0f
-static void xts_tweak_encdec(const void *ctx,
b38b0f
-                             xts_cipher_func *func,
b38b0f
-                             const xts_uint128 *src,
b38b0f
-                             xts_uint128 *dst,
b38b0f
-                             xts_uint128 *iv)
b38b0f
+static inline void xts_tweak_encdec(const void *ctx,
b38b0f
+                                    xts_cipher_func *func,
b38b0f
+                                    const xts_uint128 *src,
b38b0f
+                                    xts_uint128 *dst,
b38b0f
+                                    xts_uint128 *iv)
b38b0f
 {
b38b0f
     /* tweak encrypt block i */
b38b0f
     xts_uint128_xor(dst, src, iv);
b38b0f
-- 
b38b0f
1.8.3.1
b38b0f