diff mbox series

[v2] l2fwd-crypto: fix dev configure for masked devices

Message ID 20210409130914.13353-1-hemant.agrawal@nxp.com (mailing list archive)
State Accepted
Delegated to: akhil goyal
Headers show
Series [v2] l2fwd-crypto: fix dev configure for masked devices | 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 success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Hemant Agrawal April 9, 2021, 1:09 p.m. UTC
From: Apeksha Gupta <apeksha.gupta@nxp.com>

The devices which are masked by cryptodev mask should not be initialized
and skipped while traversing the device list.

Fixes: 6ae3fb9df66e ("examples/l2fwd-crypto: fix session mempool size")
Cc: stable@dpdk.org

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
---
 examples/l2fwd-crypto/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Akhil Goyal April 13, 2021, 12:59 p.m. UTC | #1
> From: Apeksha Gupta <apeksha.gupta@nxp.com>
> 
> The devices which are masked by cryptodev mask should not be initialized
> and skipped while traversing the device list.
> 
> Fixes: 6ae3fb9df66e ("examples/l2fwd-crypto: fix session mempool size")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
> ---
Acked-by: Akhil Goyal <gakhil@marvell.com>

Applied to dpdk-next-crypto

Thanks.
diff mbox series

Patch

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 0ee3e1470a..1016ceb841 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2251,6 +2251,12 @@  initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 		if (enabled_cdevs[cdev_id] == 0)
 			continue;
 
+		if (check_cryptodev_mask(options, cdev_id) < 0)
+			continue;
+
+		if (check_capabilities(options, cdev_id) < 0)
+			continue;
+
 		retval = rte_cryptodev_socket_id(cdev_id);
 
 		if (retval < 0) {