From: Ragothaman Jayaraman <rjayara...@caviumnetworks.com>

Adding AEAD, cipher & auth sessions support.

Signed-off-by: Ankur Dwivedi <ankur.dwiv...@caviumnetworks.com>
Signed-off-by: Anoob Joseph <anoob.jos...@caviumnetworks.com>
Signed-off-by: Murthy NSSR <nidadavolu.mur...@caviumnetworks.com>
Signed-off-by: Nithin Dabilpuram <nithin.dabilpu...@caviumnetworks.com>
Signed-off-by: Ragothaman Jayaraman <rjayara...@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssriniva...@caviumnetworks.com>
Signed-off-by: Tejasree Kondoj <kondoj.tejas...@caviumnetworks.com>
---
 drivers/crypto/octeontx/otx_cryptodev_ops.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c 
b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index 51f374d..438208c 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -298,6 +298,23 @@ otx_cpt_session_cfg(struct rte_cryptodev *dev,
        chain = xform;
        while (chain) {
                switch (chain->type) {
+               case RTE_CRYPTO_SYM_XFORM_AEAD:
+                       if (fill_sess_aead(chain, sess_private_data))
+                               goto err;
+                       break;
+               case RTE_CRYPTO_SYM_XFORM_CIPHER:
+                       if (fill_sess_cipher(chain, sess_private_data))
+                               goto err;
+                       break;
+               case RTE_CRYPTO_SYM_XFORM_AUTH:
+                       if (chain->auth.algo == RTE_CRYPTO_AUTH_AES_GMAC) {
+                               if (fill_sess_gmac(chain, sess_private_data))
+                                       goto err;
+                       } else {
+                               if (fill_sess_auth(chain, sess_private_data))
+                                       goto err;
+                       }
+                       break;
                default:
                        CPT_LOG_ERR("Invalid crypto xform type");
                        break;
-- 
2.7.4

Reply via email to