lkml.org 
[lkml]   [2022]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [v2 PATCH 3/9] crypto: aead - Add ctx helpers with DMA alignment
On Fri, Nov 25, 2022 at 12:36:33PM +0800, Herbert Xu wrote:
> diff --git a/include/crypto/internal/aead.h b/include/crypto/internal/aead.h
> index d482017f3e20..cd8cb1e921b7 100644
> --- a/include/crypto/internal/aead.h
> +++ b/include/crypto/internal/aead.h
> @@ -39,6 +39,11 @@ static inline void *crypto_aead_ctx(struct crypto_aead *tfm)
> return crypto_tfm_ctx(&tfm->base);
> }
>
> +static inline void *crypto_aead_ctx_dma(struct crypto_aead *tfm)
> +{
> + return crypto_tfm_ctx_dma(&tfm->base);
> +}

I wonder, if drivers end up calling this, isn't it easier to do the
alignment in crypto_aead_ctx() directly? There are over 300 callers (not
sure about the padding though, it may need still driver changes unless
we can add it to something like crypto_tfm_alg_alignmask()). Or is the
expectation that not all drivers need a DMA alignment?

--
Catalin

\
 
 \ /
  Last update: 2022-11-25 13:25    [W:1.997 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site