Re: [PATCH 3/4] crypto: hisilicon: Add HiSilicon ZIP accelerator support

2019-01-18 Thread Herbert Xu
On Fri, Jan 18, 2019 at 03:55:05PM +0800, Zhou Wang wrote: > > However, another question is that seems other subsystems in kernel, > e.g. zswap still use crypto_alloc_comp. So we'd better register this > ZIP engine using both cryto_alloc_comp and scomp/acomp interface to > make it compatible with o

Re: [PATCH 3/4] crypto: hisilicon: Add HiSilicon ZIP accelerator support

2019-01-17 Thread Zhou Wang
On 2019/1/18 12:55, Herbert Xu wrote: > On Wed, Jan 16, 2019 at 10:12:47PM +0800, Zhou Wang wrote: >> >> A stupid question: how do we test scomp alg? >> >> It seems we can not use general comp API, e.g. crypto_alloc_comp >> to do this. >> >> Could you give me any clue about this? > > scomp algorit

Re: [PATCH 3/4] crypto: hisilicon: Add HiSilicon ZIP accelerator support

2019-01-17 Thread Herbert Xu
On Wed, Jan 16, 2019 at 10:12:47PM +0800, Zhou Wang wrote: > > A stupid question: how do we test scomp alg? > > It seems we can not use general comp API, e.g. crypto_alloc_comp > to do this. > > Could you give me any clue about this? scomp algorithms are allocated through crypto_alloc_acomp. Th

Re: [PATCH 3/4] crypto: hisilicon: Add HiSilicon ZIP accelerator support

2019-01-16 Thread Zhou Wang
On 2019/1/11 14:34, Zhou Wang wrote: > On 2019/1/11 14:08, Herbert Xu wrote: >> On Sat, Dec 22, 2018 at 03:51:44PM +0800, Zhou Wang wrote: >>> >>> +static struct crypto_alg hisi_zip_zlib = { >>> + .cra_name = "zlib-deflate", >>> + .cra_flags = CRYPTO_ALG_TYPE_COMPRESS

Re: [PATCH 3/4] crypto: hisilicon: Add HiSilicon ZIP accelerator support

2019-01-10 Thread Zhou Wang
On 2019/1/11 14:08, Herbert Xu wrote: > On Sat, Dec 22, 2018 at 03:51:44PM +0800, Zhou Wang wrote: >> >> +static struct crypto_alg hisi_zip_zlib = { >> +.cra_name = "zlib-deflate", >> +.cra_flags = CRYPTO_ALG_TYPE_COMPRESS, >> +.cra_ctxsize= sizeof

Re: [PATCH 3/4] crypto: hisilicon: Add HiSilicon ZIP accelerator support

2019-01-10 Thread Herbert Xu
On Sat, Dec 22, 2018 at 03:51:44PM +0800, Zhou Wang wrote: > > +static struct crypto_alg hisi_zip_zlib = { > + .cra_name = "zlib-deflate", > + .cra_flags = CRYPTO_ALG_TYPE_COMPRESS, > + .cra_ctxsize= sizeof(struct hisi_zip_ctx), > + .cra_priori

[PATCH 3/4] crypto: hisilicon: Add HiSilicon ZIP accelerator support

2018-12-22 Thread Zhou Wang
The HiSilicon ZIP accelerator implements the zlib and gzip algorithm. It uses Hisilicon QM as the interface to the CPU. This patch provides PCIe driver to the accelerator and register it to the crypto subsystem. Signed-off-by: Zhou Wang Signed-off-by: Shiju Jose Signed-off-by: Kenneth Lee Sign