From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C5FFC33CB1 for ; Tue, 14 Jan 2020 11:31:00 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 5FE7124673 for ; Tue, 14 Jan 2020 11:31:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5FE7124673 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA9871C1E1; Tue, 14 Jan 2020 12:30:59 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 497D81C1E0; Tue, 14 Jan 2020 12:30:58 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id DFEAF1A07E4; Tue, 14 Jan 2020 12:30:57 +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 817071A0411; Tue, 14 Jan 2020 12:30:55 +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 F07E4402AF; Tue, 14 Jan 2020 19:30:51 +0800 (SGT) From: Apeksha Gupta To: akhil.goyal@nxp.com Cc: thomas@monjalon.net, dev@dpdk.org, Apeksha Gupta , stable@dpdk.org Date: Tue, 14 Jan 2020 17:00:48 +0530 Message-Id: <20200114113048.1331-1-apeksha.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] UP: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