diff mbox series

[v1] eventdev: fix case to initiate crypto adapter service

Message ID 20210409070809.456444-1-sthotton@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Jerin Jacob
Headers show
Series [v1] eventdev: fix case to initiate crypto adapter service | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/Intel-compilation fail Compilation issues
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/github-robot success github build: passed
ci/travis-robot success travis build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Shijith Thotton April 9, 2021, 7:08 a.m. UTC
Initiate software crypto adapter service, only if hardware capabilities
are not reported.

Case 1.a. OP_FORWARD mode -> HW Dequeue + SW enqueue, should also check
OP_FORWARD capability is not supported by the PMD to initiate service.

Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
 lib/librte_eventdev/rte_event_crypto_adapter.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jerin Jacob April 12, 2021, 7:30 a.m. UTC | #1
On Fri, Apr 9, 2021 at 12:38 PM Shijith Thotton <sthotton@marvell.com> wrote:
>
> Initiate software crypto adapter service, only if hardware capabilities
> are not reported.
>
> Case 1.a. OP_FORWARD mode -> HW Dequeue + SW enqueue, should also check

Case 1.a is required in the commit message?


> OP_FORWARD capability is not supported by the PMD to initiate service.
>
> Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")
>
> Signed-off-by: Shijith Thotton <sthotton@marvell.com>

@Gujjar, Abhinandan S

Any comments on this?


> ---
>  lib/librte_eventdev/rte_event_crypto_adapter.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c b/lib/librte_eventdev/rte_event_crypto_adapter.c
> index d903cdd48..e1d38d383 100644
> --- a/lib/librte_eventdev/rte_event_crypto_adapter.c
> +++ b/lib/librte_eventdev/rte_event_crypto_adapter.c
> @@ -861,6 +861,7 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t id,
>          *          b. OP_NEW mode -> SW Dequeue
>          */
>         if ((cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW &&
> +            !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
>              adapter->mode == RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD) ||
>              (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW) &&
>               !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c b/lib/librte_eventdev/rte_event_crypto_adapter.c
index d903cdd48..e1d38d383 100644
--- a/lib/librte_eventdev/rte_event_crypto_adapter.c
+++ b/lib/librte_eventdev/rte_event_crypto_adapter.c
@@ -861,6 +861,7 @@  rte_event_crypto_adapter_queue_pair_add(uint8_t id,
 	 *          b. OP_NEW mode -> SW Dequeue
 	 */
 	if ((cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW &&
+	     !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
 	     adapter->mode == RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD) ||
 	     (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW) &&
 	      !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&