qemu-devel
[Top][All Lists]
Advanced

[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: Daniel P . Berrangé
Subject: Re: [Qemu-devel] [PATCH v2 5/5] crypto: support multiple threads accessing one QCryptoBlock
Date: Fri, 7 Dec 2018 14:45:23 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

On Fri, Dec 07, 2018 at 02:44:12PM +0000, Vladimir Sementsov-Ogievskiy wrote:
> 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

Yes, I'm fine with size_t too

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]