lkml.org 
[lkml]   [2020]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] crypto: caam - enable crypto-engine retry mechanism
From
Date
On 10/26/2020 7:11 PM, Iuliana Prodan wrote:
> On 10/26/2020 5:36 PM, Horia Geantă wrote:
>> On 10/21/2020 11:07 PM, Iuliana Prodan wrote:
[...]
>>> +#define CRYPTO_ENGINE_MAX_QLEN (2 * (JOBR_DEPTH - THRESHOLD))
>>> +
>> What's the logic behind multiplying by 2?
>
> I added the 2 as the number of Job Rings.
> My logic was that crypto-engine is one per CAAM (x no of JRs), while
> JOB_DEPTH is per JR.
Currently there is one crypto-engine per JR.
crypto_engine_alloc_init() is called when caam/jr driver is probing.

> I know there are targets with other than 2 JRs. Therefore, is there a
> way to get this number automatically?
>
Most SoCs have CAAM configured with 4 JRs.
Of course what's visible to the kernel might be different.

Given there's one crypto-engine / JR, determining the number of JRs
shouldn't be required.

Horia

\
 
 \ /
  Last update: 2020-10-26 18:59    [W:0.092 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site