From patchwork Tue Feb 23 06:13:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 386247 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp1904670jap; Mon, 22 Feb 2021 22:25:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxSGby7D4wdiQl5MgNEHGNFySDIfx9E79p/8JwmnBLntpCDTIuUMDV60tEKtba1qLjQkLk X-Received: by 2002:a17:906:a287:: with SMTP id i7mr1923880ejz.363.1614061504807; Mon, 22 Feb 2021 22:25:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614061504; cv=none; d=google.com; s=arc-20160816; b=DDHIIyDFc2RhqqTmxIAieO+yrLCScH3gzq4viEMVCo431AOR8y+kSrTgnFqoWNaw+y Tqhj+xlYEhhZot59SrbupKtHFDq1gtO2CxzMNKmmbgsAwtf7DbOZiJd+vsuFep0Y+gM+ m2/EhSUgPO0gZGg5JTZ9Oie0aP94AhfvC5zhLDCKkPvdzK1JMKtcrPx8dm4FA2W0w2Us WPdTsHgSG2VFuio0/0L4oRUcbfeoQhwPRei0MjnAyHwqjkZkl60HyYVg5llzGWPLO0cd tuK1ivRQY/JUwwethWh96sazP7XOMPuqdsOLVUtmOMB3XFTlH260D/zyGd/HVtjBAQ4h CZvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:cc:to :from; bh=BmBV3UZjx988klwgyVJFYi9SeOK0mrPb8CKtxd+laX8=; b=0eDNb2qVdH0jbouYalEieefJ7Jv6ZkcumjA/yty6YX+8EaT/DLlEmSAaZPqP5eQloT DTKoJQPuxDhHNH0+i8FV99AiQP7n/UVE4nHqGcvBLmsvl6u9jU45Zp9Qo8jonUl1ULhC d/yaMuZA1+xygZNmDLfw/tL8djW1ztYmERMt+r9LKhcqyyHOp2QzIdhOCR+YzJ7fVaUT +5AqtYzd2VLwfc/dH7T9uMd4RF60bn/w8tzIpobDUiOQMf32ax9rouRMy3kdlB7ZTwtY f6wIjdXuZq1GsG4trooeFNnX9PjEbGM+3nssRe+eyDe++BcFWRYCKzwnQj5PJ3SCkUrh C9qw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id z15si15328748ejr.160.2021.02.22.22.25.04; Mon, 22 Feb 2021 22:25:04 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77BE14068B; Tue, 23 Feb 2021 07:25:04 +0100 (CET) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by mails.dpdk.org (Postfix) with ESMTP id 6EEDC40041 for ; Tue, 23 Feb 2021 07:25:03 +0100 (CET) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 3D19F201745; Tue, 23 Feb 2021 07:25:03 +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 281B220173D; Tue, 23 Feb 2021 07:25:01 +0100 (CET) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 7AF16402B7; Tue, 23 Feb 2021 07:24:58 +0100 (CET) From: Hemant Agrawal To: dev@dpdk.org, declan.doherty@intel.com Cc: Apeksha Gupta Date: Tue, 23 Feb 2021 11:43:00 +0530 Message-Id: <20210223061300.22719-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] l2fwd-crypto: skip dev configure for masked devices X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" From: Apeksha Gupta The devices which are masked by cryptodev mask should not be initialized and skipped while traversing the device list. Signed-off-by: Apeksha Gupta --- examples/l2fwd-crypto/main.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index e7a1eea30..656b14036 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -2265,6 +2265,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) {