Message ID | 20210907090715.460856-1-radu.nicolau@intel.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | akhil goyal |
Headers | show |
Series | [1/3] crypto/aesni_mb: add NULL/NULL support | expand |
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
> Add support for NULL/NULL xform. > > Signed-off-by: Declan Doherty <declan.doherty@intel.com> > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> > --- Release notes missing. Updates in doc/guides/cryptodevs/features/aesni_gcm.ini and doc/guides/cryptodevs/features/aesni_mb.ini missing.
Hi Radu and Akhil We can add this change as a patch into http://patchwork.dpdk.org/project/dpdk/cover/20210929163035.608387-1-ciara.power@intel.com/ v4 it is ok. The doc can be updated accordingly. Regards, Fan > -----Original Message----- > From: dev <dev-bounces@dpdk.org> On Behalf Of Akhil Goyal > Sent: Friday, October 8, 2021 1:21 PM > To: Nicolau, Radu <radu.nicolau@intel.com>; Doherty, Declan > <declan.doherty@intel.com>; De Lara Guarch, Pablo > <pablo.de.lara.guarch@intel.com> > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [EXT] [PATCH 1/3] crypto/aesni_mb: add NULL/NULL > support > > > Add support for NULL/NULL xform. > > > > Signed-off-by: Declan Doherty <declan.doherty@intel.com> > > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> > > --- > Release notes missing. > Updates in doc/guides/cryptodevs/features/aesni_gcm.ini and > doc/guides/cryptodevs/features/aesni_mb.ini missing.
> > Hi Radu and Akhil > > We can add this change as a patch into > http://patchwork.dpdk.org/project/dpdk/cover/20210929163035.608387-1-ciara.power@intel.com/ v4 it is ok. > The doc can be updated accordingly. > No issues from my side.
On 10/8/2021 7:18 PM, Akhil Goyal wrote: >> Hi Radu and Akhil >> >> We can add this change as a patch into >> http://patchwork.dpdk.org/project/dpdk/cover/20210929163035.608387-1-ciara.power@intel.com/ v4 it is ok. >> The doc can be updated accordingly. >> > No issues from my side. Same for my side, no issues, thanks!
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index a01c826a3c..b8ab84e215 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -462,6 +462,9 @@ aesni_mb_set_session_cipher_parameters(const MB_MGR *mb_mgr, /* Select cipher mode */ switch (xform->cipher.algo) { + case RTE_CRYPTO_CIPHER_NULL: + sess->cipher.mode = NULL_CIPHER; + return 0; case RTE_CRYPTO_CIPHER_AES_CBC: sess->cipher.mode = CBC; is_aes = 1; diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c index fc7fdfec8e..ebf75198ae 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c @@ -502,6 +502,44 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { }, } }, } }, + { /* NULL (AUTH) */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, + {.auth = { + .algo = RTE_CRYPTO_AUTH_NULL, + .block_size = 1, + .key_size = { + .min = 0, + .max = 0, + .increment = 0 + }, + .digest_size = { + .min = 0, + .max = 0, + .increment = 0 + }, + .iv_size = { 0 } + }, }, + }, }, + }, + { /* NULL (CIPHER) */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, + {.cipher = { + .algo = RTE_CRYPTO_CIPHER_NULL, + .block_size = 1, + .key_size = { + .min = 0, + .max = 0, + .increment = 0 + }, + .iv_size = { 0 } + }, }, + }, } + }, + #if IMB_VERSION(0, 53, 0) <= IMB_VERSION_NUM { /* AES ECB */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,