From 58266cc91efbf45e24fee3a15e23816da6941501 Mon Sep 17 00:00:00 2001 From: Apeksha Gupta Date: Fri, 9 Apr 2021 18:39:14 +0530 Subject: [PATCH] examples/l2fwd-crypto: skip masked devices 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 Acked-by: Akhil Goyal --- examples/l2fwd-crypto/main.c | 6 ++++++ 1 file changed, 6 insertions(+) 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) { -- 2.20.1