[2/2] crypto/cnxk: support for security session enqueue
Checks
Commit Message
Add support for enqueue security session to event crypto adapter. Event
metadata is used to store request/response information that is needed to
enqueue an event after the crypto operation completed.
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
---
drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 5 +++++
1 file changed, 5 insertions(+)
@@ -7,6 +7,7 @@
#include <rte_cryptodev.h>
#include <rte_event_crypto_adapter.h>
+#include <rte_security.h>
#include "roc_api.h"
@@ -142,6 +143,10 @@ cnxk_event_crypto_mdata_get(struct rte_crypto_op *op)
op->private_data_offset)
ec_mdata = (union rte_event_crypto_metadata
*)((uint8_t *)op + op->private_data_offset);
+ else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION &&
+ op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+ ec_mdata = rte_security_session_get_event_mdata(
+ op->sym->sec_session);
else
return NULL;