#include <rte_common.h>
#include <rte_hexdump.h>
#include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
#include <rte_bus_vdev.h>
#include <rte_malloc.h>
#include <rte_cpuflags.h>
crypto_func_tbl_t *func_tbl = \
(crypto_chain_order[(order)])[(cop)]; \
\
- ((*func_tbl)[(calg)][(aalg)][KEYL(keyl)]); \
+ ((calg >= CRYPTO_CIPHER_MAX) || (aalg >= CRYPTO_AUTH_MAX)) ? \
+ NULL : ((*func_tbl)[(calg)][(aalg)][KEYL(keyl)]); \
})
/*----------------------------------------------------------------------------*/
({ \
crypto_key_sched_tbl_t *ks_tbl = crypto_key_sched_dir[(cop)]; \
\
- ((*ks_tbl)[(calg)][KEYL(keyl)]); \
+ (calg >= CRYPTO_CIPHER_MAX) ? \
+ NULL : ((*ks_tbl)[(calg)][KEYL(keyl)]); \
})
/*----------------------------------------------------------------------------*/
return -ENOTSUP;
}
- if (unlikely(sess->crypto_func == NULL)) {
+ if (unlikely(sess->crypto_func == NULL ||
+ sess->cipher.key_sched == NULL)) {
/*
* If we got here that means that there must be a bug
* in the algorithms selection above. Nevertheless keep
arg.cipher.key = sess->cipher.key.data;
/* Acquire combined mode function */
crypto_func = sess->crypto_func;
- ARMV8_CRYPTO_ASSERT(crypto_func != NULL);
+ RTE_VERIFY(crypto_func != NULL);
error = crypto_func(csrc, cdst, clen, asrc, adst, alen, &arg);
if (error != 0) {
op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
memset(op->sym->session, 0,
rte_cryptodev_sym_get_existing_header_session_size(
op->sym->session));
- rte_mempool_put(qp->sess_mp, sess);
- rte_mempool_put(qp->sess_mp_priv, op->sym->session);
+ rte_mempool_put(qp->sess_mp_priv, sess);
+ rte_mempool_put(qp->sess_mp, op->sym->session);
op->sym->session = NULL;
}
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_CPU_NEON |
- RTE_CRYPTODEV_FF_CPU_ARM_CE;
+ RTE_CRYPTODEV_FF_CPU_ARM_CE |
+ RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
internals = dev->data->dev_private;
internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
+ rte_cryptodev_pmd_probing_finish(dev);
+
return 0;
init_error:
static struct cryptodev_driver armv8_crypto_drv;
+RTE_LOG_REGISTER_DEFAULT(crypto_armv8_log_type, ERR);
+
RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,