#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
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(crypto_armv8_log_type, pmd.crypto.armv8, ERR);
+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);