Re: [PATCH] crypto: add virtio-crypto driver

2016-11-21 Thread gong lei
on 2016/11/17 23:55, Benedetto, Salvatore wrote: > Hi Gonglei, > > ... >> + >> +static int virtio_crypto_alg_ablkcipher_init_session( >> +struct virtio_crypto_ablkcipher_ctx *ctx, >> +int alg, const uint8_t *key, >> +unsigned int keylen, >> +int

RE: [PATCH] crypto: add virtio-crypto driver

2016-11-21 Thread Benedetto, Salvatore
Hi Gonglei, ... > + > +static int virtio_crypto_alg_ablkcipher_init_session( > + struct virtio_crypto_ablkcipher_ctx *ctx, > + int alg, const uint8_t *key, > + unsigned int keylen, > + int encrypt) > +{ > + struct scatterlist outhdr, key_sg,

RE: [PATCH] crypto: add virtio-crypto driver

2016-11-21 Thread Gonglei (Arei)
Hi Michael, May I should convert all __virtio32/64 to le32/64 in virtio_crypto.h ? > +#define VIRTIO_CRYPTO_OPCODE(service, op) (((service) << 8) | (op)) > + > +struct virtio_crypto_ctrl_header { > +#define VIRTIO_CRYPTO_CIPHER_CREATE_SESSION \ > +