Skip to content

Commit

Permalink
test/event: fix crypto null device creation
Browse files Browse the repository at this point in the history
[ upstream commit cf57682e1b6fea41566325eb92b0978bd0209904 ]

Create crypto null device only if no other crypto devices
were found.

Fixes: 3c2c535 ("test: add event crypto adapter auto-test")

Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
  • Loading branch information
asasidharan authored and kevintraynor committed Oct 31, 2023
1 parent 107d68a commit 9ff70c4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/test/test_event_crypto_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,10 @@ configure_cryptodev(void)
return TEST_FAILED;
}

/* Create a NULL crypto device */
nb_devs = rte_cryptodev_device_count_by_driver(
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_NULL_PMD)));

nb_devs = rte_cryptodev_count();
if (!nb_devs) {
/* Create a NULL crypto device */
ret = rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_NULL_PMD), NULL);

Expand Down

0 comments on commit 9ff70c4

Please sign in to comment.