[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 5/5] crypto: support multiple threads accessi
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [Qemu-devel] [PATCH v2 5/5] crypto: support multiple threads accessing one QCryptoBlock |
Date: |
Fri, 7 Dec 2018 14:44:12 +0000 |
06.12.2018 13:54, Daniel P. Berrangé wrote:
>> @@ -31,8 +32,12 @@ struct QCryptoBlock {
>> const QCryptoBlockDriver *driver;
>> void *opaque;
>>
>> - QCryptoCipher *cipher;
>> + QCryptoCipher **ciphers;
>> + int n_ciphers;
>> + int n_free_ciphers;
> size_t for both of these since they're effectively array indexes.
>
>> QCryptoIVGen *ivgen;
>> + QemuMutex mutex;
>> +
>> QCryptoHashAlgorithm kdfhash;
>> size_t niv;
>> uint64_t payload_offset; /* In bytes */
>> @@ -46,6 +51,7 @@ struct QCryptoBlockDriver {
>> QCryptoBlockReadFunc readfunc,
>> void *opaque,
>> unsigned int flags,
>> + int n_threads,
> unsigned int, and more below which I won't repeat...
>
Why not size_t here, then? this parameter directly maps into n_ciphers
--
Best regards,
Vladimir
- Re: [Qemu-devel] [PATCH v2 1/5] crypto/block-luks: fix memory leak in qcrypto_block_luks_create, (continued)