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

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