> > > > > > 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. > > > > Ah, you mean sess->ops.* are not initialized properly for GMAC, right? > > Correct. Actually, sess->op is set, but in the switch in line 471, only > AESNI_GCM_OP_AUTHENTICATED_ENCRYPTION and > AESNI_GCM_OP_AUTHENTICATED_DECRYPTION are used, > which I would think that it means that any GMAC operation would fail.
Yep, you right, good catch. Will try to address in v4. Thanks Konstantin > > Pablo > > > > > > > > Looks like in this case, this would return an invalid status. > > > > > > Am I getting this wrong? > > > > > > Thanks! > > > Pablo > > > > > > > Konstantin