cryptodev: add mempool pointer in queue pair setup
The session mempool pointer is needed in each queue pair, if session-less operations are being handled. Therefore, the API is changed to accept this parameter, as the session mempool is created outside the device configuration function, similar to what ethdev does with the rx queues. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
This commit is contained in:
parent
b3bbd9e5f2
commit
f7db6f821e
@ -152,20 +152,20 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
|
||||
session_pool_socket[socket_id] = sess_mp;
|
||||
}
|
||||
|
||||
ret = rte_cryptodev_configure(cdev_id, &conf,
|
||||
session_pool_socket[socket_id]);
|
||||
ret = rte_cryptodev_configure(cdev_id, &conf);
|
||||
if (ret < 0) {
|
||||
printf("Failed to configure cryptodev %u", cdev_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = rte_cryptodev_queue_pair_setup(cdev_id, 0, &qp_conf,
|
||||
socket_id);
|
||||
if (ret < 0) {
|
||||
printf("Failed to setup queue pair %u on "
|
||||
"cryptodev %u", 0, cdev_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
ret = rte_cryptodev_queue_pair_setup(cdev_id, 0,
|
||||
&qp_conf, socket_id,
|
||||
session_pool_socket[socket_id]);
|
||||
if (ret < 0) {
|
||||
printf("Failed to setup queue pair %u on "
|
||||
"cryptodev %u", 0, cdev_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = rte_cryptodev_start(cdev_id);
|
||||
if (ret < 0) {
|
||||
|
@ -240,6 +240,7 @@ API Changes
|
||||
* Modified parameters of ``rte_cryptodev_sym_session_create()``, to accept
|
||||
``mempool``, instead of ``device id`` and ``rte_crypto_sym_xform``.
|
||||
* Remove ``device id`` parameter from ``rte_cryptodev_sym_session_free()``.
|
||||
* Added new field ``session_pool`` to ``rte_cryptodev_queue_pair_setup()``.
|
||||
|
||||
|
||||
ABI Changes
|
||||
|
@ -230,7 +230,7 @@ aesni_gcm_pmd_qp_create_processed_pkts_ring(struct aesni_gcm_qp *qp,
|
||||
static int
|
||||
aesni_gcm_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
const struct rte_cryptodev_qp_conf *qp_conf,
|
||||
int socket_id)
|
||||
int socket_id, struct rte_mempool *session_pool)
|
||||
{
|
||||
struct aesni_gcm_qp *qp = NULL;
|
||||
struct aesni_gcm_private *internals = dev->data->dev_private;
|
||||
@ -258,7 +258,7 @@ aesni_gcm_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
if (qp->processed_pkts == NULL)
|
||||
goto qp_setup_cleanup;
|
||||
|
||||
qp->sess_mp = dev->data->session_pool;
|
||||
qp->sess_mp = session_pool;
|
||||
|
||||
memset(&qp->qp_stats, 0, sizeof(qp->qp_stats));
|
||||
|
||||
|
@ -404,7 +404,7 @@ aesni_mb_pmd_qp_create_processed_ops_ring(struct aesni_mb_qp *qp,
|
||||
static int
|
||||
aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
const struct rte_cryptodev_qp_conf *qp_conf,
|
||||
int socket_id)
|
||||
int socket_id, struct rte_mempool *session_pool)
|
||||
{
|
||||
struct aesni_mb_qp *qp = NULL;
|
||||
struct aesni_mb_private *internals = dev->data->dev_private;
|
||||
@ -433,7 +433,7 @@ aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
if (qp->ingress_queue == NULL)
|
||||
goto qp_setup_cleanup;
|
||||
|
||||
qp->sess_mp = dev->data->session_pool;
|
||||
qp->sess_mp = session_pool;
|
||||
|
||||
memset(&qp->stats, 0, sizeof(qp->stats));
|
||||
|
||||
|
@ -249,7 +249,7 @@ armv8_crypto_pmd_qp_create_processed_ops_ring(struct armv8_crypto_qp *qp,
|
||||
static int
|
||||
armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
const struct rte_cryptodev_qp_conf *qp_conf,
|
||||
int socket_id)
|
||||
int socket_id, struct rte_mempool *session_pool)
|
||||
{
|
||||
struct armv8_crypto_qp *qp = NULL;
|
||||
|
||||
@ -274,7 +274,7 @@ armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
if (qp->processed_ops == NULL)
|
||||
goto qp_setup_cleanup;
|
||||
|
||||
qp->sess_mp = dev->data->session_pool;
|
||||
qp->sess_mp = session_pool;
|
||||
|
||||
memset(&qp->stats, 0, sizeof(qp->stats));
|
||||
|
||||
|
@ -816,7 +816,8 @@ dpaa2_sec_queue_pair_release(struct rte_cryptodev *dev, uint16_t queue_pair_id)
|
||||
static int
|
||||
dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
__rte_unused const struct rte_cryptodev_qp_conf *qp_conf,
|
||||
__rte_unused int socket_id)
|
||||
__rte_unused int socket_id,
|
||||
__rte_unused struct rte_mempool *session_pool)
|
||||
{
|
||||
struct dpaa2_sec_dev_private *priv = dev->data->dev_private;
|
||||
struct dpaa2_sec_qp *qp;
|
||||
|
@ -224,7 +224,7 @@ kasumi_pmd_qp_create_processed_ops_ring(struct kasumi_qp *qp,
|
||||
static int
|
||||
kasumi_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
const struct rte_cryptodev_qp_conf *qp_conf,
|
||||
int socket_id)
|
||||
int socket_id, struct rte_mempool *session_pool)
|
||||
{
|
||||
struct kasumi_qp *qp = NULL;
|
||||
|
||||
@ -249,7 +249,7 @@ kasumi_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
if (qp->processed_ops == NULL)
|
||||
goto qp_setup_cleanup;
|
||||
|
||||
qp->sess_mp = dev->data->session_pool;
|
||||
qp->sess_mp = session_pool;
|
||||
|
||||
memset(&qp->qp_stats, 0, sizeof(qp->qp_stats));
|
||||
|
||||
|
@ -212,7 +212,7 @@ null_crypto_pmd_qp_create_processed_pkts_ring(struct null_crypto_qp *qp,
|
||||
static int
|
||||
null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
const struct rte_cryptodev_qp_conf *qp_conf,
|
||||
int socket_id)
|
||||
int socket_id, struct rte_mempool *session_pool)
|
||||
{
|
||||
struct null_crypto_private *internals = dev->data->dev_private;
|
||||
struct null_crypto_qp *qp;
|
||||
@ -255,7 +255,7 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
goto qp_setup_cleanup;
|
||||
}
|
||||
|
||||
qp->sess_mp = dev->data->session_pool;
|
||||
qp->sess_mp = session_pool;
|
||||
|
||||
memset(&qp->qp_stats, 0, sizeof(qp->qp_stats));
|
||||
|
||||
|
@ -599,7 +599,7 @@ openssl_pmd_qp_create_processed_ops_ring(struct openssl_qp *qp,
|
||||
static int
|
||||
openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
const struct rte_cryptodev_qp_conf *qp_conf,
|
||||
int socket_id)
|
||||
int socket_id, struct rte_mempool *session_pool)
|
||||
{
|
||||
struct openssl_qp *qp = NULL;
|
||||
|
||||
@ -624,7 +624,7 @@ openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
if (qp->processed_ops == NULL)
|
||||
goto qp_setup_cleanup;
|
||||
|
||||
qp->sess_mp = dev->data->session_pool;
|
||||
qp->sess_mp = session_pool;
|
||||
|
||||
memset(&qp->stats, 0, sizeof(qp->stats));
|
||||
|
||||
|
@ -103,7 +103,8 @@ void qat_crypto_sym_stats_get(struct rte_cryptodev *dev,
|
||||
void qat_crypto_sym_stats_reset(struct rte_cryptodev *dev);
|
||||
|
||||
int qat_crypto_sym_qp_setup(struct rte_cryptodev *dev, uint16_t queue_pair_id,
|
||||
const struct rte_cryptodev_qp_conf *rx_conf, int socket_id);
|
||||
const struct rte_cryptodev_qp_conf *rx_conf, int socket_id,
|
||||
struct rte_mempool *session_pool);
|
||||
int qat_crypto_sym_qp_release(struct rte_cryptodev *dev,
|
||||
uint16_t queue_pair_id);
|
||||
|
||||
|
@ -134,7 +134,7 @@ queue_dma_zone_reserve(const char *queue_name, uint32_t queue_size,
|
||||
|
||||
int qat_crypto_sym_qp_setup(struct rte_cryptodev *dev, uint16_t queue_pair_id,
|
||||
const struct rte_cryptodev_qp_conf *qp_conf,
|
||||
int socket_id)
|
||||
int socket_id, struct rte_mempool *session_pool __rte_unused)
|
||||
{
|
||||
struct qat_qp *qp;
|
||||
struct rte_pci_device *pci_dev;
|
||||
|
@ -101,8 +101,7 @@ scheduler_pmd_config(struct rte_cryptodev *dev,
|
||||
for (i = 0; i < sched_ctx->nb_slaves; i++) {
|
||||
uint8_t slave_dev_id = sched_ctx->slaves[i].dev_id;
|
||||
|
||||
ret = rte_cryptodev_configure(slave_dev_id, config,
|
||||
dev->data->session_pool);
|
||||
ret = rte_cryptodev_configure(slave_dev_id, config);
|
||||
if (ret < 0)
|
||||
break;
|
||||
}
|
||||
@ -400,7 +399,8 @@ scheduler_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
|
||||
/** Setup a queue pair */
|
||||
static int
|
||||
scheduler_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id)
|
||||
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
|
||||
struct rte_mempool *session_pool)
|
||||
{
|
||||
struct scheduler_ctx *sched_ctx = dev->data->dev_private;
|
||||
struct scheduler_qp_ctx *qp_ctx;
|
||||
@ -422,8 +422,13 @@ scheduler_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
for (i = 0; i < sched_ctx->nb_slaves; i++) {
|
||||
uint8_t slave_id = sched_ctx->slaves[i].dev_id;
|
||||
|
||||
/*
|
||||
* All slaves will share the same session mempool
|
||||
* for session-less operations, so the objects
|
||||
* must be big enough for all the drivers used.
|
||||
*/
|
||||
ret = rte_cryptodev_queue_pair_setup(slave_id, qp_id,
|
||||
qp_conf, socket_id);
|
||||
qp_conf, socket_id, session_pool);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ snow3g_pmd_qp_create_processed_ops_ring(struct snow3g_qp *qp,
|
||||
static int
|
||||
snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
const struct rte_cryptodev_qp_conf *qp_conf,
|
||||
int socket_id)
|
||||
int socket_id, struct rte_mempool *session_pool)
|
||||
{
|
||||
struct snow3g_qp *qp = NULL;
|
||||
|
||||
@ -246,7 +246,7 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
if (qp->processed_ops == NULL)
|
||||
goto qp_setup_cleanup;
|
||||
|
||||
qp->sess_mp = dev->data->session_pool;
|
||||
qp->sess_mp = session_pool;
|
||||
|
||||
memset(&qp->qp_stats, 0, sizeof(qp->qp_stats));
|
||||
|
||||
|
@ -221,7 +221,7 @@ zuc_pmd_qp_create_processed_ops_ring(struct zuc_qp *qp,
|
||||
static int
|
||||
zuc_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
const struct rte_cryptodev_qp_conf *qp_conf,
|
||||
int socket_id)
|
||||
int socket_id, struct rte_mempool *session_pool)
|
||||
{
|
||||
struct zuc_qp *qp = NULL;
|
||||
|
||||
@ -246,7 +246,7 @@ zuc_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
|
||||
if (qp->processed_ops == NULL)
|
||||
goto qp_setup_cleanup;
|
||||
|
||||
qp->sess_mp = dev->data->session_pool;
|
||||
qp->sess_mp = session_pool;
|
||||
|
||||
memset(&qp->qp_stats, 0, sizeof(qp->qp_stats));
|
||||
|
||||
|
@ -1299,15 +1299,15 @@ cryptodevs_init(void)
|
||||
socket_ctx[dev_conf.socket_id].session_pool = sess_mp;
|
||||
}
|
||||
|
||||
if (rte_cryptodev_configure(cdev_id, &dev_conf,
|
||||
socket_ctx[dev_conf.socket_id].session_pool))
|
||||
if (rte_cryptodev_configure(cdev_id, &dev_conf))
|
||||
rte_panic("Failed to initialize cryptodev %u\n",
|
||||
cdev_id);
|
||||
|
||||
qp_conf.nb_descriptors = CDEV_QUEUE_DESC;
|
||||
for (qp = 0; qp < dev_conf.nb_queue_pairs; qp++)
|
||||
if (rte_cryptodev_queue_pair_setup(cdev_id, qp,
|
||||
&qp_conf, dev_conf.socket_id))
|
||||
&qp_conf, dev_conf.socket_id,
|
||||
socket_ctx[dev_conf.socket_id].session_pool))
|
||||
rte_panic("Failed to setup queue %u for "
|
||||
"cdev_id %u\n", 0, cdev_id);
|
||||
|
||||
|
@ -2232,8 +2232,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
|
||||
cap->sym.auth.digest_size.min;
|
||||
}
|
||||
|
||||
retval = rte_cryptodev_configure(cdev_id, &conf,
|
||||
session_pool_socket[socket_id]);
|
||||
retval = rte_cryptodev_configure(cdev_id, &conf);
|
||||
if (retval < 0) {
|
||||
printf("Failed to configure cryptodev %u", cdev_id);
|
||||
return -1;
|
||||
@ -2242,7 +2241,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
|
||||
qp_conf.nb_descriptors = 2048;
|
||||
|
||||
retval = rte_cryptodev_queue_pair_setup(cdev_id, 0, &qp_conf,
|
||||
socket_id);
|
||||
socket_id, session_pool_socket[socket_id]);
|
||||
if (retval < 0) {
|
||||
printf("Failed to setup queue pair %u on cryptodev %u",
|
||||
0, cdev_id);
|
||||
|
@ -747,8 +747,7 @@ rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
|
||||
}
|
||||
|
||||
int
|
||||
rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config,
|
||||
struct rte_mempool *session_pool)
|
||||
rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
|
||||
{
|
||||
struct rte_cryptodev *dev;
|
||||
int diag;
|
||||
@ -768,8 +767,6 @@ rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config,
|
||||
|
||||
RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP);
|
||||
|
||||
dev->data->session_pool = session_pool;
|
||||
|
||||
/* Setup new number of queue pairs and reconfigure device. */
|
||||
diag = rte_cryptodev_queue_pairs_config(dev, config->nb_queue_pairs,
|
||||
config->socket_id);
|
||||
@ -881,7 +878,9 @@ rte_cryptodev_close(uint8_t dev_id)
|
||||
|
||||
int
|
||||
rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
|
||||
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id)
|
||||
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
|
||||
struct rte_mempool *session_pool)
|
||||
|
||||
{
|
||||
struct rte_cryptodev *dev;
|
||||
|
||||
@ -905,7 +904,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
|
||||
RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_setup, -ENOTSUP);
|
||||
|
||||
return (*dev->dev_ops->queue_pair_setup)(dev, queue_pair_id, qp_conf,
|
||||
socket_id);
|
||||
socket_id, session_pool);
|
||||
}
|
||||
|
||||
|
||||
|
@ -525,15 +525,13 @@ struct rte_cryptodev_config {
|
||||
*
|
||||
* @param dev_id The identifier of the device to configure.
|
||||
* @param config The crypto device configuration structure.
|
||||
* @param session_pool Pointer to device session mempool
|
||||
*
|
||||
* @return
|
||||
* - 0: Success, device configured.
|
||||
* - <0: Error code returned by the driver configuration function.
|
||||
*/
|
||||
extern int
|
||||
rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config,
|
||||
struct rte_mempool *session_pool);
|
||||
rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config);
|
||||
|
||||
/**
|
||||
* Start an device.
|
||||
@ -592,6 +590,8 @@ rte_cryptodev_close(uint8_t dev_id);
|
||||
* *SOCKET_ID_ANY* if there is no NUMA constraint
|
||||
* for the DMA memory allocated for the receive
|
||||
* queue pair.
|
||||
* @param session_pool Pointer to device session mempool, used
|
||||
* for session-less operations.
|
||||
*
|
||||
* @return
|
||||
* - 0: Success, queue pair correctly set up.
|
||||
@ -599,7 +599,8 @@ rte_cryptodev_close(uint8_t dev_id);
|
||||
*/
|
||||
extern int
|
||||
rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
|
||||
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id);
|
||||
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
|
||||
struct rte_mempool *session_pool);
|
||||
|
||||
/**
|
||||
* Start a specified queue pair of a device. It is used
|
||||
|
@ -207,12 +207,13 @@ typedef int (*cryptodev_queue_pair_stop_t)(struct rte_cryptodev *dev,
|
||||
* @param qp_id Queue Pair Index
|
||||
* @param qp_conf Queue configuration structure
|
||||
* @param socket_id Socket Index
|
||||
* @param session_pool Pointer to device session mempool
|
||||
*
|
||||
* @return Returns 0 on success.
|
||||
*/
|
||||
typedef int (*cryptodev_queue_pair_setup_t)(struct rte_cryptodev *dev,
|
||||
uint16_t qp_id, const struct rte_cryptodev_qp_conf *qp_conf,
|
||||
int socket_id);
|
||||
int socket_id, struct rte_mempool *session_pool);
|
||||
|
||||
/**
|
||||
* Release memory resources allocated by given queue pair.
|
||||
|
@ -404,7 +404,7 @@ testsuite_setup(void)
|
||||
"session mempool allocation failed");
|
||||
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_configure(dev_id,
|
||||
&ts_params->conf, ts_params->session_mpool),
|
||||
&ts_params->conf),
|
||||
"Failed to configure cryptodev %u with %u qps",
|
||||
dev_id, ts_params->conf.nb_queue_pairs);
|
||||
|
||||
@ -413,7 +413,8 @@ testsuite_setup(void)
|
||||
for (qp_id = 0; qp_id < info.max_nb_queue_pairs; qp_id++) {
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
|
||||
dev_id, qp_id, &ts_params->qp_conf,
|
||||
rte_cryptodev_socket_id(dev_id)),
|
||||
rte_cryptodev_socket_id(dev_id),
|
||||
ts_params->session_mpool),
|
||||
"Failed to setup queue pair %u on cryptodev %u",
|
||||
qp_id, dev_id);
|
||||
}
|
||||
@ -458,7 +459,7 @@ ut_setup(void)
|
||||
ts_params->conf.socket_id = SOCKET_ID_ANY;
|
||||
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0],
|
||||
&ts_params->conf, ts_params->session_mpool),
|
||||
&ts_params->conf),
|
||||
"Failed to configure cryptodev %u",
|
||||
ts_params->valid_devs[0]);
|
||||
|
||||
@ -466,7 +467,8 @@ ut_setup(void)
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
|
||||
ts_params->valid_devs[0], qp_id,
|
||||
&ts_params->qp_conf,
|
||||
rte_cryptodev_socket_id(ts_params->valid_devs[0])),
|
||||
rte_cryptodev_socket_id(ts_params->valid_devs[0]),
|
||||
ts_params->session_mpool),
|
||||
"Failed to setup queue pair %u on cryptodev %u",
|
||||
qp_id, ts_params->valid_devs[0]);
|
||||
}
|
||||
@ -542,23 +544,20 @@ test_device_configure_invalid_dev_id(void)
|
||||
/* Stop the device in case it's started so it can be configured */
|
||||
rte_cryptodev_stop(ts_params->valid_devs[dev_id]);
|
||||
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_configure(dev_id, &ts_params->conf,
|
||||
ts_params->session_mpool),
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_configure(dev_id, &ts_params->conf),
|
||||
"Failed test for rte_cryptodev_configure: "
|
||||
"invalid dev_num %u", dev_id);
|
||||
|
||||
/* invalid dev_id values */
|
||||
dev_id = num_devs;
|
||||
|
||||
TEST_ASSERT_FAIL(rte_cryptodev_configure(dev_id, &ts_params->conf,
|
||||
ts_params->session_mpool),
|
||||
TEST_ASSERT_FAIL(rte_cryptodev_configure(dev_id, &ts_params->conf),
|
||||
"Failed test for rte_cryptodev_configure: "
|
||||
"invalid dev_num %u", dev_id);
|
||||
|
||||
dev_id = 0xff;
|
||||
|
||||
TEST_ASSERT_FAIL(rte_cryptodev_configure(dev_id, &ts_params->conf,
|
||||
ts_params->session_mpool),
|
||||
TEST_ASSERT_FAIL(rte_cryptodev_configure(dev_id, &ts_params->conf),
|
||||
"Failed test for rte_cryptodev_configure:"
|
||||
"invalid dev_num %u", dev_id);
|
||||
|
||||
@ -578,7 +577,7 @@ test_device_configure_invalid_queue_pair_ids(void)
|
||||
ts_params->conf.nb_queue_pairs = 1;
|
||||
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0],
|
||||
&ts_params->conf, ts_params->session_mpool),
|
||||
&ts_params->conf),
|
||||
"Failed to configure cryptodev: dev_id %u, qp_id %u",
|
||||
ts_params->valid_devs[0], ts_params->conf.nb_queue_pairs);
|
||||
|
||||
@ -587,7 +586,7 @@ test_device_configure_invalid_queue_pair_ids(void)
|
||||
ts_params->conf.nb_queue_pairs = MAX_NUM_QPS_PER_QAT_DEVICE;
|
||||
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0],
|
||||
&ts_params->conf, ts_params->session_mpool),
|
||||
&ts_params->conf),
|
||||
"Failed to configure cryptodev: dev_id %u, qp_id %u",
|
||||
ts_params->valid_devs[0],
|
||||
ts_params->conf.nb_queue_pairs);
|
||||
@ -597,7 +596,7 @@ test_device_configure_invalid_queue_pair_ids(void)
|
||||
ts_params->conf.nb_queue_pairs = 0;
|
||||
|
||||
TEST_ASSERT_FAIL(rte_cryptodev_configure(ts_params->valid_devs[0],
|
||||
&ts_params->conf, ts_params->session_mpool),
|
||||
&ts_params->conf),
|
||||
"Failed test for rte_cryptodev_configure, dev_id %u,"
|
||||
" invalid qps: %u",
|
||||
ts_params->valid_devs[0],
|
||||
@ -608,7 +607,7 @@ test_device_configure_invalid_queue_pair_ids(void)
|
||||
ts_params->conf.nb_queue_pairs = UINT16_MAX;
|
||||
|
||||
TEST_ASSERT_FAIL(rte_cryptodev_configure(ts_params->valid_devs[0],
|
||||
&ts_params->conf, ts_params->session_mpool),
|
||||
&ts_params->conf),
|
||||
"Failed test for rte_cryptodev_configure, dev_id %u,"
|
||||
" invalid qps: %u",
|
||||
ts_params->valid_devs[0],
|
||||
@ -619,7 +618,7 @@ test_device_configure_invalid_queue_pair_ids(void)
|
||||
ts_params->conf.nb_queue_pairs = MAX_NUM_QPS_PER_QAT_DEVICE + 1;
|
||||
|
||||
TEST_ASSERT_FAIL(rte_cryptodev_configure(ts_params->valid_devs[0],
|
||||
&ts_params->conf, ts_params->session_mpool),
|
||||
&ts_params->conf),
|
||||
"Failed test for rte_cryptodev_configure, dev_id %u,"
|
||||
" invalid qps: %u",
|
||||
ts_params->valid_devs[0],
|
||||
@ -649,7 +648,7 @@ test_queue_pair_descriptor_setup(void)
|
||||
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
|
||||
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0],
|
||||
&ts_params->conf, ts_params->session_mpool),
|
||||
&ts_params->conf),
|
||||
"Failed to configure cryptodev %u",
|
||||
ts_params->valid_devs[0]);
|
||||
|
||||
@ -663,7 +662,8 @@ test_queue_pair_descriptor_setup(void)
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
|
||||
ts_params->valid_devs[0], qp_id, &qp_conf,
|
||||
rte_cryptodev_socket_id(
|
||||
ts_params->valid_devs[0])),
|
||||
ts_params->valid_devs[0]),
|
||||
ts_params->session_mpool),
|
||||
"Failed test for "
|
||||
"rte_cryptodev_queue_pair_setup: num_inflights "
|
||||
"%u on qp %u on cryptodev %u",
|
||||
@ -677,7 +677,8 @@ test_queue_pair_descriptor_setup(void)
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
|
||||
ts_params->valid_devs[0], qp_id, &qp_conf,
|
||||
rte_cryptodev_socket_id(
|
||||
ts_params->valid_devs[0])),
|
||||
ts_params->valid_devs[0]),
|
||||
ts_params->session_mpool),
|
||||
"Failed test for"
|
||||
" rte_cryptodev_queue_pair_setup: num_inflights"
|
||||
" %u on qp %u on cryptodev %u",
|
||||
@ -691,7 +692,8 @@ test_queue_pair_descriptor_setup(void)
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
|
||||
ts_params->valid_devs[0], qp_id, &qp_conf,
|
||||
rte_cryptodev_socket_id(
|
||||
ts_params->valid_devs[0])),
|
||||
ts_params->valid_devs[0]),
|
||||
ts_params->session_mpool),
|
||||
"Failed test for "
|
||||
"rte_cryptodev_queue_pair_setup: num_inflights"
|
||||
" %u on qp %u on cryptodev %u",
|
||||
@ -706,7 +708,8 @@ test_queue_pair_descriptor_setup(void)
|
||||
TEST_ASSERT_FAIL(rte_cryptodev_queue_pair_setup(
|
||||
ts_params->valid_devs[0], qp_id, &qp_conf,
|
||||
rte_cryptodev_socket_id(
|
||||
ts_params->valid_devs[0])),
|
||||
ts_params->valid_devs[0]),
|
||||
ts_params->session_mpool),
|
||||
"Unexpectedly passed test for "
|
||||
"rte_cryptodev_queue_pair_setup:"
|
||||
"num_inflights %u on qp %u on cryptodev %u",
|
||||
@ -721,7 +724,8 @@ test_queue_pair_descriptor_setup(void)
|
||||
TEST_ASSERT_FAIL(rte_cryptodev_queue_pair_setup(
|
||||
ts_params->valid_devs[0], qp_id, &qp_conf,
|
||||
rte_cryptodev_socket_id(
|
||||
ts_params->valid_devs[0])),
|
||||
ts_params->valid_devs[0]),
|
||||
ts_params->session_mpool),
|
||||
"Unexpectedly passed test for "
|
||||
"rte_cryptodev_queue_pair_setup:"
|
||||
"num_inflights %u on qp %u on cryptodev %u",
|
||||
@ -735,7 +739,8 @@ test_queue_pair_descriptor_setup(void)
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
|
||||
ts_params->valid_devs[0], qp_id, &qp_conf,
|
||||
rte_cryptodev_socket_id(
|
||||
ts_params->valid_devs[0])),
|
||||
ts_params->valid_devs[0]),
|
||||
ts_params->session_mpool),
|
||||
"Failed test for"
|
||||
" rte_cryptodev_queue_pair_setup:"
|
||||
"num_inflights %u on qp %u on cryptodev %u",
|
||||
@ -750,7 +755,8 @@ test_queue_pair_descriptor_setup(void)
|
||||
TEST_ASSERT_FAIL(rte_cryptodev_queue_pair_setup(
|
||||
ts_params->valid_devs[0], qp_id, &qp_conf,
|
||||
rte_cryptodev_socket_id(
|
||||
ts_params->valid_devs[0])),
|
||||
ts_params->valid_devs[0]),
|
||||
ts_params->session_mpool),
|
||||
"Unexpectedly passed test for "
|
||||
"rte_cryptodev_queue_pair_setup:"
|
||||
"num_inflights %u on qp %u on cryptodev %u",
|
||||
@ -766,7 +772,8 @@ test_queue_pair_descriptor_setup(void)
|
||||
TEST_ASSERT_FAIL(rte_cryptodev_queue_pair_setup(
|
||||
ts_params->valid_devs[0],
|
||||
qp_id, &qp_conf,
|
||||
rte_cryptodev_socket_id(ts_params->valid_devs[0])),
|
||||
rte_cryptodev_socket_id(ts_params->valid_devs[0]),
|
||||
ts_params->session_mpool),
|
||||
"Failed test for rte_cryptodev_queue_pair_setup:"
|
||||
"invalid qp %u on cryptodev %u",
|
||||
qp_id, ts_params->valid_devs[0]);
|
||||
@ -776,7 +783,8 @@ test_queue_pair_descriptor_setup(void)
|
||||
TEST_ASSERT_FAIL(rte_cryptodev_queue_pair_setup(
|
||||
ts_params->valid_devs[0],
|
||||
qp_id, &qp_conf,
|
||||
rte_cryptodev_socket_id(ts_params->valid_devs[0])),
|
||||
rte_cryptodev_socket_id(ts_params->valid_devs[0]),
|
||||
ts_params->session_mpool),
|
||||
"Failed test for rte_cryptodev_queue_pair_setup:"
|
||||
"invalid qp %u on cryptodev %u",
|
||||
qp_id, ts_params->valid_devs[0]);
|
||||
|
@ -423,7 +423,7 @@ testsuite_setup(void)
|
||||
"session mempool allocation failed");
|
||||
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->dev_id,
|
||||
&ts_params->conf, ts_params->sess_mp),
|
||||
&ts_params->conf),
|
||||
"Failed to configure cryptodev %u",
|
||||
ts_params->dev_id);
|
||||
|
||||
@ -433,7 +433,8 @@ testsuite_setup(void)
|
||||
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
|
||||
ts_params->dev_id, qp_id,
|
||||
&ts_params->qp_conf,
|
||||
rte_cryptodev_socket_id(ts_params->dev_id)),
|
||||
rte_cryptodev_socket_id(ts_params->dev_id),
|
||||
ts_params->sess_mp),
|
||||
"Failed to setup queue pair %u on cryptodev %u",
|
||||
qp_id, ts_params->dev_id);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user