Messages in this thread | | | Subject | Re: [PATCH] crypto: caam - enable crypto-engine retry mechanism | From | Horia Geantă <> | Date | Mon, 26 Oct 2020 19:57:59 +0200 |
| |
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
| |