diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2020-08-28 10:05:08 -0700 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2020-09-10 11:02:23 +0100 |
commit | eba29771c006d6a689e946fa57334a2ce370c45c (patch) | |
tree | b2a2a6559e18f89dabbea68cc124875956b7a37d /crypto/cipher.c | |
parent | ca04c3cf15961e4a01c729a24b00bf804f59ac23 (diff) |
crypto: Assume blocksize is a power of 2
The check in the encode/decode path using full division has a
noticeable amount of overhead. By asserting the blocksize is
a power of 2, we can reduce this check to a mask.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'crypto/cipher.c')
-rw-r--r-- | crypto/cipher.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/cipher.c b/crypto/cipher.c index e5adb56271..2722dc7d87 100644 --- a/crypto/cipher.c +++ b/crypto/cipher.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/host-utils.h" #include "qapi/error.h" #include "crypto/cipher.h" #include "cipherpriv.h" |