Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-02-09 Thread Daniel P. Berrange
On Thu, Feb 09, 2017 at 07:03:57PM +0800, Longpeng (Mike) wrote: > Hi Daniel, > > On 2017/2/9 18:11, Daniel P. Berrange wrote: > > > On Thu, Feb 09, 2017 at 10:58:55AM +0800, Longpeng (Mike) wrote: > >> Hi Daniel, > > > >> > >> So...you prefer approach 1 with a driver-table dispatch layer, righ

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-02-09 Thread Longpeng (Mike)
Hi Daniel, On 2017/2/9 18:11, Daniel P. Berrange wrote: > On Thu, Feb 09, 2017 at 10:58:55AM +0800, Longpeng (Mike) wrote: >> Hi Daniel, >> >> So...you prefer approach 1 with a driver-table dispatch layer, right? >> And this implies that we must either rename some public methods in >> cipher-gc

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-02-09 Thread Daniel P. Berrange
On Thu, Feb 09, 2017 at 10:58:55AM +0800, Longpeng (Mike) wrote: > Hi Daniel, > > On 2017/2/8 18:53, Daniel P. Berrange wrote: > > > On Wed, Feb 08, 2017 at 06:46:04PM +0800, Longpeng (Mike) wrote: > >> Hi Daniel, > >> > >> I was writing AF_ALG-backed for QEMU crypto these days, I think there're

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-02-08 Thread Longpeng (Mike)
Hi Daniel, On 2017/2/8 18:53, Daniel P. Berrange wrote: > On Wed, Feb 08, 2017 at 06:46:04PM +0800, Longpeng (Mike) wrote: >> Hi Daniel, >> >> I was writing AF_ALG-backed for QEMU crypto these days, I think there're more >> than two ways to implements it. >> >> The first one look likes below: >>

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-02-08 Thread Daniel P. Berrange
On Wed, Feb 08, 2017 at 06:46:04PM +0800, Longpeng (Mike) wrote: > Hi Daniel, > > I was writing AF_ALG-backed for QEMU crypto these days, I think there're more > than two ways to implements it. > > The first one look likes below: > [ cipher.c ] > qcrypto_cipher_new(...) > { > if (...) { /*

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-02-08 Thread Longpeng (Mike)
Hi Daniel, I was writing AF_ALG-backed for QEMU crypto these days, I think there're more than two ways to implements it. The first one look likes below: [ cipher.c ] qcrypto_cipher_new(...) { if (...) { /* use AF_ALG */ cipher = afalg_cipher_new(...) if (ci

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-01-10 Thread Daniel P. Berrange
On Tue, Jan 10, 2017 at 12:17:48PM +, Gonglei (Arei) wrote: > > > > > > > > > > > > > > > > > > > > > > > On Mon, Jan 09, 2017 at 01:43:10PM +, Stefan Hajnoczi wrote: > > > > > > > On Mon, Jan 09, 2017 at 03:04:55PM +0800, Longpeng (Mike) wrote: > > > > > > > > I'm one of Gonglei's virtio-c

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-01-10 Thread Gonglei (Arei)
> > > > > > > > > > > > > > > > > > On Mon, Jan 09, 2017 at 01:43:10PM +, Stefan Hajnoczi wrote: > > > > > > On Mon, Jan 09, 2017 at 03:04:55PM +0800, Longpeng (Mike) wrote: > > > > > > > I'm one of Gonglei's virtio-crypto project members, and we plan to > add a > > > > > AF_ALG > > > > > > > b

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-01-10 Thread Daniel P. Berrange
On Tue, Jan 10, 2017 at 11:36:19AM +, Gonglei (Arei) wrote: > Hi Daniel, > > > > > > > > > > > > > > On Mon, Jan 09, 2017 at 01:43:10PM +, Stefan Hajnoczi wrote: > > > > > On Mon, Jan 09, 2017 at 03:04:55PM +0800, Longpeng (Mike) wrote: > > > > > > I'm one of Gonglei's virtio-crypto projec

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-01-10 Thread Gonglei (Arei)
Hi Daniel, > > > > > > > > > On Mon, Jan 09, 2017 at 01:43:10PM +, Stefan Hajnoczi wrote: > > > > On Mon, Jan 09, 2017 at 03:04:55PM +0800, Longpeng (Mike) wrote: > > > > > I'm one of Gonglei's virtio-crypto project members, and we plan to > > > > > add a > > > AF_ALG > > > > > backend for vi

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-01-10 Thread Daniel P. Berrange
On Tue, Jan 10, 2017 at 09:03:45AM +, Gonglei (Arei) wrote: > Hi, > > > > > On Mon, Jan 09, 2017 at 01:43:10PM +, Stefan Hajnoczi wrote: > > > On Mon, Jan 09, 2017 at 03:04:55PM +0800, Longpeng (Mike) wrote: > > > > I'm one of Gonglei's virtio-crypto project members, and we plan to add a

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-01-10 Thread Gonglei (Arei)
Hi, > > On Mon, Jan 09, 2017 at 01:43:10PM +, Stefan Hajnoczi wrote: > > On Mon, Jan 09, 2017 at 03:04:55PM +0800, Longpeng (Mike) wrote: > > > I'm one of Gonglei's virtio-crypto project members, and we plan to add a > AF_ALG > > > backend for virtio-crypto(there's only builtin-backend curren

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-01-09 Thread Daniel P. Berrange
On Mon, Jan 09, 2017 at 01:43:10PM +, Stefan Hajnoczi wrote: > On Mon, Jan 09, 2017 at 03:04:55PM +0800, Longpeng (Mike) wrote: > > I'm one of Gonglei's virtio-crypto project members, and we plan to add a > > AF_ALG > > backend for virtio-crypto(there's only builtin-backend currently). > > >

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-01-09 Thread Stefan Hajnoczi
On Mon, Jan 09, 2017 at 03:04:55PM +0800, Longpeng (Mike) wrote: > I'm one of Gonglei's virtio-crypto project members, and we plan to add a > AF_ALG > backend for virtio-crypto(there's only builtin-backend currently). > > I found that Catalin, Paolo and Stefan had discussed about this in 2015 > (

[Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-01-08 Thread Longpeng (Mike)
Hi guys, I'm one of Gonglei's virtio-crypto project members, and we plan to add a AF_ALG backend for virtio-crypto(there's only builtin-backend currently). I found that Catalin, Paolo and Stefan had discussed about this in 2015 (http://www.spinics.net/lists/kvm/msg115457.html), but it seems that