> -----Original Message-----
> From: Ananyev, Konstantin <konstantin.anan...@intel.com>
> Sent: Tuesday, January 21, 2020 2:29 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.gua...@intel.com>; Smoczynski,
> MarcinX <marcinx.smoczyn...@intel.com>; akhil.go...@nxp.com; Zhang, Roy
> Fan <roy.fan.zh...@intel.com>; Doherty, Declan <declan.dohe...@intel.com>;
> Nicolau, Radu <radu.nico...@intel.com>
> Cc: dev@dpdk.org; Smoczynski, MarcinX <marcinx.smoczyn...@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v3 2/6] crypto/aesni_gcm: cpu crypto support
>
>
Hi Konstantin,
>
> Hi Pablo,
>
> > > Add support for CPU crypto mode by introducing required handler.
> > > Crypto mode (sync/async) is chosen during sym session create if an
> > > appropriate flag is set in an xform type number.
> > >
> > > Authenticated encryption and decryption are supported with tag
> > > generation/verification.
> > >
> > > Signed-off-by: Marcin Smoczynski <marcinx.smoczyn...@intel.com>
> > > ---
> > > drivers/crypto/aesni_gcm/aesni_gcm_ops.h | 9 ++
> > > drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 149 +++++++++++++++++-
> > > drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 3 +
> > > .../crypto/aesni_gcm/aesni_gcm_pmd_private.h | 18 ++-
> > > 4 files changed, 169 insertions(+), 10 deletions(-)
> > >
> > > diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_ops.h
> > > b/drivers/crypto/aesni_gcm/aesni_gcm_ops.h
> > > index e272f1067..404c0adff 100644
> >
> > ...
> > >
> > > /* AES-GMAC */
> > > - if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH) {
> > > + if (xform_type == RTE_CRYPTO_SYM_XFORM_AUTH) {
> > > auth_xform = xform;
> > > if (auth_xform->auth.algo != RTE_CRYPTO_AUTH_AES_GMAC) {
> >
> > Could you add support for AES-GMAC, so all algorithms supported by this PMD
> support this new API?
>
> Not sure I get you here...
> This code is present in current version of the driver too, no
> addition/deletions as
> I can see:
>
> /* AES-GMAC */
> if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH) {
> auth_xform = xform;
> if (auth_xform->auth.algo != RTE_CRYPTO_AUTH_AES_GMAC) {
> AESNI_GCM_LOG(ERR, "Only AES GMAC is supported as an "
> "authentication only algorithm");
> return -ENOTSUP;
> }
>
>
> The only thing is changed: xform type calculation.
>From what I can see, sess->op is not set for AES-GMAC.
In aesni_gcm_pmd_cpu_crypto_process(), this value is checked,
In the switch that is in line 471.
Looks like in this case, this would return an invalid status.
Am I getting this wrong?
Thanks!
Pablo
> Konstantin