diff options
Diffstat (limited to 'drivers/crypto/kasumi/rte_kasumi_pmd.c')
-rw-r--r-- | drivers/crypto/kasumi/rte_kasumi_pmd.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c index 5f8c7a2e..4e217434 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c @@ -61,7 +61,7 @@ create_unique_device_name(char *name, size_t size) if (name == NULL) return -EINVAL; - ret = snprintf(name, size, "%s_%u", CRYPTODEV_NAME_KASUMI_PMD, + ret = snprintf(name, size, "%s_%u", RTE_STR(CRYPTODEV_NAME_KASUMI_PMD), unique_name_id++); if (ret < 0) return ret; @@ -243,9 +243,12 @@ process_kasumi_cipher_op_bit(struct rte_crypto_op *op, offset_in_bits = op->sym->cipher.data.offset; src = rte_pktmbuf_mtod(op->sym->m_src, uint8_t *); - dst = op->sym->m_dst ? - rte_pktmbuf_mtod(op->sym->m_dst, uint8_t *) : - rte_pktmbuf_mtod(op->sym->m_src, uint8_t *); + if (op->sym->m_dst == NULL) { + op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS; + KASUMI_LOG_ERR("bit-level in-place not supported\n"); + return 0; + } + dst = rte_pktmbuf_mtod(op->sym->m_dst, uint8_t *); IV = *((uint64_t *)(op->sym->cipher.iv.data)); length_in_bits = op->sym->cipher.data.length; @@ -648,10 +651,13 @@ cryptodev_kasumi_uninit(const char *name) } static struct rte_driver cryptodev_kasumi_pmd_drv = { - .name = CRYPTODEV_NAME_KASUMI_PMD, .type = PMD_VDEV, .init = cryptodev_kasumi_init, .uninit = cryptodev_kasumi_uninit }; -PMD_REGISTER_DRIVER(cryptodev_kasumi_pmd_drv); +PMD_REGISTER_DRIVER(cryptodev_kasumi_pmd_drv, CRYPTODEV_NAME_KASUMI_PMD); +DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD, + "max_nb_queue_pairs=<int> " + "max_nb_sessions=<int> " + "socket_id=<int>"); |