struct rte_mempool *large_mbuf_pool;
struct rte_mempool *op_mpool;
struct rte_mempool *session_mpool;
+ struct rte_mempool *session_priv_mpool;
struct rte_cryptodev_config conf;
struct rte_cryptodev_qp_conf qp_conf;
return TEST_FAILED;
}
- ts_params->session_mpool = rte_mempool_create(
- "test_sess_mp",
- MAX_NB_SESSIONS * 2,
- session_size,
- 0, 0, NULL, NULL, NULL,
- NULL, SOCKET_ID_ANY,
- 0);
-
+ ts_params->session_mpool = rte_cryptodev_sym_session_pool_create(
+ "test_sess_mp", MAX_NB_SESSIONS, 0, 0, 0,
+ SOCKET_ID_ANY);
TEST_ASSERT_NOT_NULL(ts_params->session_mpool,
"session mempool allocation failed");
+ ts_params->session_priv_mpool = rte_mempool_create(
+ "test_sess_mp_priv",
+ MAX_NB_SESSIONS,
+ session_size,
+ 0, 0, NULL, NULL, NULL,
+ NULL, SOCKET_ID_ANY,
+ 0);
+ TEST_ASSERT_NOT_NULL(ts_params->session_priv_mpool,
+ "session mempool allocation failed");
+
+
+
TEST_ASSERT_SUCCESS(rte_cryptodev_configure(dev_id,
&ts_params->conf),
"Failed to configure cryptodev %u with %u qps",
ts_params->qp_conf.nb_descriptors = DEFAULT_NUM_OPS_INFLIGHT;
ts_params->qp_conf.mp_session = ts_params->session_mpool;
- ts_params->qp_conf.mp_session_private = ts_params->session_mpool;
+ ts_params->qp_conf.mp_session_private = ts_params->session_priv_mpool;
for (qp_id = 0; qp_id < info.max_nb_queue_pairs; qp_id++) {
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
}
/* Free session mempools */
+ if (ts_params->session_priv_mpool != NULL) {
+ rte_mempool_free(ts_params->session_priv_mpool);
+ ts_params->session_priv_mpool = NULL;
+ }
+
if (ts_params->session_mpool != NULL) {
rte_mempool_free(ts_params->session_mpool);
ts_params->session_mpool = NULL;
/* Reconfigure device to default parameters */
ts_params->conf.socket_id = SOCKET_ID_ANY;
+ ts_params->qp_conf.nb_descriptors = MAX_NUM_OPS_INFLIGHT;
+ ts_params->qp_conf.mp_session = ts_params->session_mpool;
+ ts_params->qp_conf.mp_session_private = ts_params->session_priv_mpool;
TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0],
&ts_params->conf),
*/
qp_conf.nb_descriptors = MIN_NUM_OPS_INFLIGHT; /* min size*/
qp_conf.mp_session = ts_params->session_mpool;
- qp_conf.mp_session_private = ts_params->session_mpool;
+ qp_conf.mp_session_private = ts_params->session_priv_mpool;
for (qp_id = 0; qp_id < ts_params->conf.nb_queue_pairs; qp_id++) {
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
/* Create crypto session*/
rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
ut_params->sess, &ut_params->cipher_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
/* Generate crypto op data structure */
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_CCP_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_CCP_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_VIRTIO_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_CAAM_JR_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_CAAM_JR_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_CAAM_JR_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_CCP_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_ARMV8_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_MVSAM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_MVSAM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_MVSAM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_MVSAM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_MVSAM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool, ts_params->session_mpool,
+ ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool, ts_params->session_mpool,
+ ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool, ts_params->session_mpool,
+ ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool, ts_params->session_mpool,
+ ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool, ts_params->session_mpool,
+ ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD)),
ts_params->session_mpool);
rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->auth_xform, ts_params->session_mpool);
+ &ut_params->auth_xform,
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
return 0;
}
ts_params->session_mpool);
rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->cipher_xform, ts_params->session_mpool);
+ &ut_params->cipher_xform,
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
return 0;
}
ts_params->session_mpool);
rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->cipher_xform, ts_params->session_mpool);
+ &ut_params->cipher_xform,
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
return 0;
ts_params->session_mpool);
rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->cipher_xform, ts_params->session_mpool);
+ &ut_params->cipher_xform,
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
return 0;
ts_params->session_mpool);
rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->auth_xform, ts_params->session_mpool);
+ &ut_params->auth_xform,
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_CAAM_JR_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_CAAM_JR_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_CCP_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_CCP_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD)),
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
ts_params->op_mpool,
- ts_params->session_mpool,
+ ts_params->session_mpool, ts_params->session_priv_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD)),
ts_params->session_mpool);
rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->aead_xform, ts_params->session_mpool);
+ &ut_params->aead_xform,
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
ut_params->sess, &ut_params->auth_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
if (ut_params->sess == NULL)
return TEST_FAILED;
rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
sessions[i], &ut_params->auth_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(sessions[i],
"Session creation failed at session number %u",
i);
/* Next session create should fail */
rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
sessions[i], &ut_params->auth_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT_NULL(sessions[i],
"Session creation succeeded unexpectedly!");
ts_params->valid_devs[0],
sessions[i],
&ut_paramz[i].ut_params.auth_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(sessions[i],
"Session creation failed at session number %u",
rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
ut_params->sess,
&ut_params->cipher_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
/* Generate Crypto op data structure */
/* Create Crypto session*/
rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
ut_params->sess, &ut_params->auth_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
/* Generate Crypto op data structure */
/* Create Crypto session*/
rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
ut_params->sess, &ut_params->cipher_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
/* Generate Crypto op data structure */
/* Create Crypto session*/
rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
ut_params->sess, &ut_params->cipher_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
/* Generate Crypto op data structure */
/* Create Crypto session*/
ret = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
ut_params->sess, &ut_params->cipher_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT(ret < 0,
"Session creation succeeded unexpectedly");
/* Create Crypto session*/
ret = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
ut_params->sess, &ut_params->auth_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT(ret < 0,
"Session creation succeeded unexpectedly");
/* Create Crypto session*/
rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
ut_params->sess, &ut_params->cipher_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
TEST_ASSERT_EQUAL(rte_crypto_op_bulk_alloc(ts_params->op_mpool,
rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
&ut_params->auth_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
&ut_params->auth_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
&ut_params->auth_xform,
- ts_params->session_mpool);
+ ts_params->session_priv_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
for (i = 0; i < rte_cryptodev_count() && nb_devs_attached < 2;
i++) {
struct rte_cryptodev_info info;
+ unsigned int session_size;
rte_cryptodev_info_get(i, &info);
if (info.driver_id != rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)))
continue;
+ session_size = rte_cryptodev_sym_get_private_session_size(i);
/*
* Create the session mempool again, since now there are new devices
* to use the mempool.
rte_mempool_free(ts_params->session_mpool);
ts_params->session_mpool = NULL;
}
- unsigned int session_size =
- rte_cryptodev_sym_get_private_session_size(i);
+ if (ts_params->session_priv_mpool) {
+ rte_mempool_free(ts_params->session_priv_mpool);
+ ts_params->session_priv_mpool = NULL;
+ }
if (info.sym.max_nb_sessions != 0 &&
info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
return TEST_FAILED;
}
/*
- * Create mempool with maximum number of sessions * 2,
+ * Create mempool with maximum number of sessions,
* to include the session headers
*/
if (ts_params->session_mpool == NULL) {
- ts_params->session_mpool = rte_mempool_create(
- "test_sess_mp",
- MAX_NB_SESSIONS * 2,
+ ts_params->session_mpool =
+ rte_cryptodev_sym_session_pool_create(
+ "test_sess_mp",
+ MAX_NB_SESSIONS, 0, 0, 0,
+ SOCKET_ID_ANY);
+ TEST_ASSERT_NOT_NULL(ts_params->session_mpool,
+ "session mempool allocation failed");
+ }
+
+ /*
+ * Create mempool with maximum number of sessions,
+ * to include device specific session private data
+ */
+ if (ts_params->session_priv_mpool == NULL) {
+ ts_params->session_priv_mpool = rte_mempool_create(
+ "test_sess_mp_priv",
+ MAX_NB_SESSIONS,
session_size,
0, 0, NULL, NULL, NULL,
NULL, SOCKET_ID_ANY,
0);
- TEST_ASSERT_NOT_NULL(ts_params->session_mpool,
+ TEST_ASSERT_NOT_NULL(ts_params->session_priv_mpool,
"session mempool allocation failed");
}
+ ts_params->qp_conf.mp_session = ts_params->session_mpool;
+ ts_params->qp_conf.mp_session_private =
+ ts_params->session_priv_mpool;
+
ret = rte_cryptodev_scheduler_slave_attach(sched_id,
(uint8_t)i);