Re: [PATCH v6 3/6] Add SPAcc ahash support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Herbert,
   I have pushed the V7 patch with the fix. Do let me know if that
suffices for the software fallback.
   Requesting a review of the same.

Warm regards,
PK


On Sat, Jul 13, 2024 at 5:09 AM Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Fri, Jul 05, 2024 at 10:42:52PM +0530, Pavitrakumar M wrote:
> >
> > +static int spacc_hash_cra_init(struct crypto_tfm *tfm)
> > +{
> > +     const struct spacc_alg *salg = spacc_tfm_ahash(tfm);
> > +     struct spacc_crypto_ctx *tctx = crypto_tfm_ctx(tfm);
> > +     struct spacc_priv *priv = NULL;
> > +
> > +     tctx->handle    = -1;
> > +     tctx->ctx_valid = false;
> > +     tctx->dev       = get_device(salg->dev[0]);
> > +
> > +     if (salg->mode->sw_fb) {
> > +             tctx->fb.hash = crypto_alloc_ahash(salg->calg->cra_name, 0,
> > +                                                CRYPTO_ALG_NEED_FALLBACK);
> > +
> > +             if (IS_ERR(tctx->fb.hash)) {
> > +                     if (tctx->handle >= 0)
> > +                             spacc_close(&priv->spacc, tctx->handle);
> > +                     put_device(tctx->dev);
> > +                     return PTR_ERR(tctx->fb.hash);
> > +             }
> > +
> > +             crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
> > +                                      sizeof(struct spacc_crypto_reqctx) +
> > +                                      crypto_ahash_reqsize(tctx->fb.hash));
>
> I thought you added set_statesize based on the fallback state
> size, but it appears to be missing?
>
> Thanks,
> --
> Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux