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 9BD67A04FD for ; Tue, 14 Jan 2020 12:15:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 639401C026; Tue, 14 Jan 2020 12:15:14 +0100 (CET) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 9082A1C026 for ; Tue, 14 Jan 2020 12:15:12 +0100 (CET) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 29EF4200796; Tue, 14 Jan 2020 12:15:11 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D301220045F; Tue, 14 Jan 2020 12:15:09 +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 E0A46402A8; Tue, 14 Jan 2020 19:15:07 +0800 (SGT) From: Apeksha Gupta To: apeksha.gupta@nxp.com Cc: stable@dpdk.org Date: Tue, 14 Jan 2020 16:45:04 +0530 Message-Id: <20200114111504.530-1-apeksha.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-stable] [PATCH] UP:examples/l2fwd-crypto:skip dev configure for masked devices X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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