examples/l2fwd-crypto:skip dev configure for masked devices

Message ID 20200116074332.13176-1-apeksha.gupta@nxp.com (mailing list archive)
State Rejected, archived
Delegated to: akhil goyal
Headers
Series examples/l2fwd-crypto:skip dev configure for masked devices |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Apeksha Gupta Jan. 16, 2020, 7:43 a.m. UTC
  The devices which are masked by cryptodev mask should not be initialized
and skipped while traversing the device list.

Fixes: 61a7018ba0 ("examples/l2fwd-crypto:skip dev configure for masked devices")
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 Jan. 28, 2020, 6:12 a.m. UTC | #1
> 
> The devices which are masked by cryptodev mask should not be initialized
> and skipped while traversing the device list.
> 
> Fixes: 61a7018ba0 ("examples/l2fwd-crypto:skip dev configure for masked
> devices")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Applied to dpdk-next-crypto

Thanks.
  
Akhil Goyal Feb. 4, 2020, 1:38 p.m. UTC | #2
> 
> 
> >
> > The devices which are masked by cryptodev mask should not be initialized
> > and skipped while traversing the device list.
> >
> > Fixes: 61a7018ba0 ("examples/l2fwd-crypto:skip dev configure for masked
> > devices")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
> > ---
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> 
> Applied to dpdk-next-crypto
> 
This patch is taken back. It is not fixing the issue properly.
  

Patch

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 9b3aa6d07..df48d180a 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2294,6 +2294,12 @@  initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 		struct rte_cryptodev_qp_conf qp_conf;
 		struct rte_cryptodev_info dev_info;
 
+		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) {