@@ -703,12 +703,11 @@ test_crypto_adapter_free(void)
static int
test_crypto_adapter_create(void)
{
- struct rte_event_port_conf conf = {
- .dequeue_depth = 8,
- .enqueue_depth = 8,
- .new_event_threshold = 1200,
- };
int ret;
+ struct rte_event_port_conf conf;
+
+ ret = rte_event_port_default_conf_get(TEST_CDEV_ID, 0, &conf);
+ TEST_ASSERT_SUCCESS(ret, "Failed to get port0 info");
/* Create adapter with default port creation callback */
ret = rte_event_crypto_adapter_create(TEST_ADAPTER_ID,
@@ -747,14 +746,12 @@ test_crypto_adapter_qp_add_del(void)
static int
configure_event_crypto_adapter(enum rte_event_crypto_adapter_mode mode)
{
- struct rte_event_port_conf conf = {
- .dequeue_depth = 8,
- .enqueue_depth = 8,
- .new_event_threshold = 1200,
- };
-
uint32_t cap;
int ret;
+ struct rte_event_port_conf conf;
+
+ ret = rte_event_port_default_conf_get(TEST_CDEV_ID, 0, &conf);
+ TEST_ASSERT_SUCCESS(ret, "Failed to get port0 info");
/* Create adapter with default port creation callback */
ret = rte_event_crypto_adapter_create(TEST_ADAPTER_ID,
Instead of hardcoded event device capabilities, it is better to enquire and use the device supported caps. Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> --- app/test/test_event_crypto_adapter.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) -- 2.17.1