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

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