Re: [PATCH RFC 00/13] Further iMX CAAM updates

2015-12-07 Thread Fabio Estevam
Horia and Victoria, On Mon, Dec 7, 2015 at 5:11 PM, Russell King - ARM Linux wrote: > Here are further imx-caam updates that I've had since before the > previous merge window. Please review and (I guess) if Freescale > folk can provide acks etc that would be nice. Thanks. Could you please help

[PATCH] crypto: constify drbg_state_ops structures

2015-12-07 Thread Julia Lawall
The drbg_state_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- crypto/drbg.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/drbg.c b/crypto/drbg.c index a7c2314..ab6ef1d 100644 -

Re: crypto/nx842: Ignore queue overflow informative error

2015-12-07 Thread Dan Streetman
On Sun, Dec 6, 2015 at 5:57 PM, Daniel Axtens wrote: > Haren Myneni writes: > >> NX842 coprocessor sets bit 3 if queue is overflow. It is just for >> information to the user. So the driver prints this informative message >> and ignores it. > > What queue, and what happens when the queue overflows

Re: crypto/nx842: Ignore queue overflow informative error

2015-12-07 Thread Dan Streetman
On Sun, Dec 6, 2015 at 2:46 AM, Haren Myneni wrote: > > NX842 coprocessor sets bit 3 if queue is overflow. It is just for > information to the user. So the driver prints this informative message > and ignores it. > > Signed-off-by: Haren Myneni > > diff --git a/arch/powerpc/include/asm/icswx.h >

[PATCH RFC 09/11] crypto: caam: move job descriptor initialisation to ahash_edesc_alloc()

2015-12-07 Thread Russell King
Signed-off-by: Russell King --- drivers/crypto/caam/caamhash.c | 84 +- 1 file changed, 34 insertions(+), 50 deletions(-) diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index f35f4cfc27a7..241268d108ec 100644 --- a/drivers/cry

[PATCH RFC 10/11] crypto: caam: add ahash_edesc_add_src()

2015-12-07 Thread Russell King
Add a helper to map the source scatterlist into the descriptor. Signed-off-by: Russell King --- drivers/crypto/caam/caamhash.c | 106 +++-- 1 file changed, 49 insertions(+), 57 deletions(-) diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caa

[PATCH RFC 11/11] crypto: caam: get rid of tasklet

2015-12-07 Thread Russell King
Threaded interrupts can perform the function of the tasklet, and much more safely too - without races when trying to take the tasklet and interrupt down on device removal. With the old code, there is a window where we call tasklet_kill(). If the interrupt handler happens to be running on a differ

[PATCH RFC 03/11] crypto: caam: incorporate job descriptor into struct ahash_edesc

2015-12-07 Thread Russell King
Rather than giving the descriptor as hw_desc[0], give it's real size. All places where we allocate an ahash_edesc incorporate DESC_JOB_IO_LEN bytes of job descriptor. Signed-off-by: Russell King --- drivers/crypto/caam/caamhash.c | 49 -- 1 file changed, 1

[PATCH RFC 08/11] crypto: caam: add ahash_edesc_alloc() for descriptor allocation

2015-12-07 Thread Russell King
Add a helper function to perform the descriptor allocation. Signed-off-by: Russell King --- drivers/crypto/caam/caamhash.c | 60 +++--- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhas

[PATCH RFC 06/11] crypto: caam: ensure that we clean up after an error

2015-12-07 Thread Russell King
Ensure that we clean up allocations and DMA mappings after encountering an error rather than just giving up and leaking memory and resources. Signed-off-by: Russell King --- drivers/crypto/caam/caamhash.c | 57 ++ 1 file changed, 52 insertions(+), 5 deleti

[PATCH RFC 04/11] crypto: caam: mark the hardware descriptor as cache line aligned

2015-12-07 Thread Russell King
Mark the hardware descriptor as being cache line aligned; on DMA incoherent architectures, the hardware descriptor should sit in a separate cache line from the CPU accessed data to avoid polluting the caches. Signed-off-by: Russell King --- drivers/crypto/caam/caamhash.c | 2 +- 1 file changed,

[PATCH RFC 07/11] crypto: caam: check and use dma_map_sg() return code

2015-12-07 Thread Russell King
Strictly, dma_map_sg() may coalesce SG entries, but in practise on iMX hardware, this will never happen. However, dma_map_sg() can fail, and we completely fail to check its return value. So, fix this properly. Arrange the code to map the scatterlist early, so we know how many scatter table entri

[PATCH RFC 05/11] crypto: caam: replace sec4_sg pointer with array

2015-12-07 Thread Russell King
Since the extended descriptor includes the hardware descriptor, and the sec4 scatterlist immediately follows this, we can declare it as a array at the very end of the extended descriptor. This allows us to get rid of an initialiser for every site where we allocate an extended descriptor. Signed-o

[PATCH RFC 01/11] crypto: caam: fix DMA API mapping leak

2015-12-07 Thread Russell King
caamhash contains this weird code: src_nents = sg_count(req->src, req->nbytes); dma_map_sg(jrdev, req->src, src_nents ? : 1, DMA_TO_DEVICE); ... edesc->src_nents = src_nents; sg_count() returns zero when sg_nents_for_len() returns zero or one. This means we don't n

[PATCH RFC 00/13] Further iMX CAAM updates

2015-12-07 Thread Russell King - ARM Linux
Here are further imx-caam updates that I've had since before the previous merge window. Please review and (I guess) if Freescale folk can provide acks etc that would be nice. Thanks. drivers/crypto/caam/caamhash.c | 415 +++-- drivers/crypto/caam/intern.h |

[PATCH RFC 02/11] crypto: caam: ensure descriptor buffers are cacheline aligned

2015-12-07 Thread Russell King
Signed-off-by: Russell King --- drivers/crypto/caam/caamhash.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index eccde7207f92..6a6d74f38300 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/driv

Re: ipsec impact on performance

2015-12-07 Thread Sowmini Varadhan
On (12/07/15 09:40), Steffen Klassert wrote: > > I've pushed it to > > https://git.kernel.org/cgit/linux/kernel/git/klassert/linux-stk.git/log/?h=net-next-ipsec-offload > > It is just example code, nothing that I would show usually. > But you asked for it, so here is it :) that's fine, I dont e

Re: ipsec impact on performance

2015-12-07 Thread Steffen Klassert
On Thu, Dec 03, 2015 at 06:38:20AM -0500, Sowmini Varadhan wrote: > On (12/03/15 09:45), Steffen Klassert wrote: > > pcrypt(echainiv(authenc(hmac(sha1-ssse3),cbc-aes-aesni))) > > > > Result: > > > > iperf -c 10.0.0.12 -t 60 > > > > Clie