> -----Original Message-----
> From: Akhil Goyal <gak...@marvell.com>
> Sent: Tuesday, March 19, 2024 5:32 PM
> To: Suanming Mou <suanmi...@nvidia.com>; Anoob Joseph
> <ano...@marvell.com>; ciara.po...@intel.com
> Cc: dev@dpdk.org
> Subject: RE: [EXT] [PATCH] app/test-crypto-perf: add throughput OOP decryption
> 
> > > Subject: RE: [EXT] [PATCH] app/test-crypto-perf: add throughput OOP
> > decryption
> > >
> > > > > > +   if (options->test == CPERF_TEST_TYPE_THROUGHPUT &&
> > > > > > +       (options->aead_op == RTE_CRYPTO_AEAD_OP_DECRYPT ||
> > > > > > +        options->cipher_op == RTE_CRYPTO_CIPHER_OP_DECRYPT)
> > &&
> > > > > > +                   !options->out_of_place) {
> > > > > > +           RTE_LOG(ERR, USER1, "Only out-of-place is allowed in
> > > > > > throughput decryption.\n");
> > > > > > +           return -EINVAL;
> > > > > > +   }
> > > > >
> > > > > This check is blocking cipher_only decryption which should pass
> > > > > irrespective of inplace/oop and Data correct/incorrect.
> > > >
> > > > Sorry, in that case I will remove "options->cipher_op ==
> > > > RTE_CRYPTO_CIPHER_OP_DECRYPT" and only kept " options->aead_op ==
> > > > RTE_CRYPTO_AEAD_OP_DECRYPT ", what do you think?
> > >
> > > I would suggest to check for "auth_op == RTE_CRYPTO_AUTH_OP_VERIFY"
> > > Instead of cipher_op.
> >
> > I'm not sure. Since in AEAD OP, auth_op will always be
> > RTE_CRYPTO_AUTH_OP_VERIFY, in that case even in place encrypt will be
> > rejected.
> > If the combination here is too complicated, what about just remove
> > that limits and let user to decide? If the input is not correct, PMD will 
> > reject it as
> well.
> 
> The problematic cases are where auth data (ICV) is not correct.
> i.e. AEAD, AUTH_ONLY and CIPHER_AUTH.
> 
> Hence following check should be ok.
> if (options->test == CPERF_TEST_TYPE_THROUGHPUT &&
>       (options->aead_op == RTE_CRYPTO_AEAD_OP_DECRYPT ||
>       options->auth_op == RTE_CRYPTO_AUTH_OP_VERIFY) &&
>       !options->out_of_place) {

OK, that make sense. Will update, thanks.

> 
> Yes PMD will report error if the input data is not correct, but we cannot 
> just fail in
> that case just because the app is intentionally not filling the data.
> It should report unsupported case.
> >
> > >
> > > Ciara, What do you suggest? You were also seeing some issues in this 
> > > patch.

Reply via email to