+ /*
+ * Create a separate mempool for the slaves, as they need different
+ * session size and then configure them to store the pointer
+ * to this mempool
+ */
+ unsigned int session_size = sizeof(struct rte_cryptodev_sym_session) +
+ rte_cryptodev_get_private_session_size(i);
+
+ if (ts_params->slave_session_mpool == NULL) {
+ ts_params->slave_session_mpool = rte_mempool_create(
+ "test_slave_sess_mp",
+ info.sym.max_nb_sessions,
+ session_size,
+ 0, 0, NULL, NULL, NULL, NULL,
+ SOCKET_ID_ANY, 0);
+
+ TEST_ASSERT_NOT_NULL(ts_params->slave_session_mpool,
+ "session mempool allocation failed");
+ }
+
+ TEST_ASSERT_SUCCESS(rte_cryptodev_configure(i,
+ &ts_params->conf, ts_params->slave_session_mpool),
+ "Failed to configure cryptodev %u with %u qps",
+ i, ts_params->conf.nb_queue_pairs);
+