提交 aa895bd4 编写于 作者: D Daniel P. Berrangé

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: NAlberto Garcia <berto@igalia.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 7dac0dd6
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册