From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 28108A0352; Thu, 16 Jan 2020 08:43:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EA9FB1C136; Thu, 16 Jan 2020 08:43:43 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 02A951C066; Thu, 16 Jan 2020 08:43:42 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 637051A010D; Thu, 16 Jan 2020 08:43:42 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 04E5C1A02B4; Thu, 16 Jan 2020 08:43:40 +0100 (CET) Received: from lsv03186.swis.in-blr01.nxp.com (lsv03186.swis.in-blr01.nxp.com [92.120.146.182]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id CB305402AF; Thu, 16 Jan 2020 15:43:36 +0800 (SGT) From: Apeksha Gupta To: akhil.goyal@nxp.com Cc: thomas@monjalon.net, dev@dpdk.org, Apeksha Gupta , stable@dpdk.org Date: Thu, 16 Jan 2020 13:13:32 +0530 Message-Id: <20200116074332.13176-1-apeksha.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] examples/l2fwd-crypto:skip dev configure for masked devices X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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 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) { -- 2.17.1