Hi Paolo,
> -----Original Message-----
> From: [mailto:]
> On Behalf Of Paolo Bonzini
> Sent: Tuesday, September 13, 2016 6:58 PM
> To: Daniel P. Berrange; Gonglei (Arei)
> Cc: ; ; Huangpeng
> (Peter); Luonengjun; ; ; Huangweidong
> (C); ; ; ; Claudio
> Fontana; ;
> Subject: [virtio-dev] Re: [PATCH v2 02/15] crypto: introduce crypto queue
> handler
>
>
>
> On 13/09/2016 11:20, Daniel P. Berrange wrote:
> >> > +typedef struct CryptoPacket CryptoPacket;
> >> > +typedef struct CryptoQueue CryptoQueue;
> >> > +typedef struct CryptoPacketBuf CryptoPacketBuf;
> >> > +
> >> > +typedef void (CryptoPacketSent) (CryptoClientState *, int);
> > As previously, I'd expect naming of
> >
> > QCryptoCryptodevPacket
> > QCryptoCryptodevPacketBuf
> > QCryptoCryptodevQueue
> >
>
> Gonglei,
>
> you are copying a lot of code from network backends.
>
> I am not sure why you would need a queue for virtio-crypto rather than a
> direct connection between frontend and backend (and the backend would be
> QEMU crypto APIs, like Daniel suggested).
>
My initial idea is support asynchronous crypto operation, so I used a queue to
cache the crypto packets like network did. Now I think again, either synchronous or asynchronous
operation is directly depend on the backend cryptodevs' capacity, we don't need
to use a queue to do that, but provide interfaces which include sync and async operations.
I'll drop the middle queue stuff. Thanks!
Regards,
-Gonglei
> Paolo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail: