From patchwork Fri Apr 9 13:09:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 418175 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1557729jai; Fri, 9 Apr 2021 06:10:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKxmWoJ8s9kDlPz9HFqjTizHrYk33Lntq5y38Ndwk11IhWI/RuFQ7Hgp9z4I68nPJ8nR6D X-Received: by 2002:a17:906:3190:: with SMTP id 16mr16328003ejy.355.1617973851742; Fri, 09 Apr 2021 06:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617973851; cv=none; d=google.com; s=arc-20160816; b=l+xm8YiXy+FezLKXHPJe0eyasWXGTaQ1dlV1Vnu8t7sP43Hxi0AgOCi+QW2rTBBCzs JypUd+4kkLA0ACsuXM2vo60TPyqtTuJivsT12Od1vQNxemhK0g380kgtoY7aVsgaySrx XyNDNfa5P1bwhi4xokcuws2F9n+Ga+F4mcGeaATcHC2LgHG4iV6scuLFDAzuoR9dYOL3 WcnYOFALuq/XJjdAAGpiXlW1k0CuzmrVjDclXNWCRcCv5mjaYKU8KKCmM4tH1g3X4mht n9eORL6pJE80Nv5Y3d/vddhUaLN6bd3TF32Asj2Xrvl6kZMadoyBl1nGos3kWYcmO9a2 LvHw== 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:references:in-reply-to :message-id:date:cc:to:from; bh=CAgYVUkoEHWT4cTCYG4XM1IMQzCd0RBwLoPUBIsoeL8=; b=Wrt1fsVIBfLN39rHWMDD7A2j9E0VOXKFFL2m8cHbh4ChdGZEs1BncmGPgzlsOzYptz vI5WuPMtYxys3oEd7sqclhPXtHXEmpVhoijSr1lag6tUfnxZLvhElH9pZMjxdn+Q2M0h 4bnHaKeHoBBjQmI5o4KfMnJWFkwEEC3NCoYtfRBzkWG2RE6i5Z80mOAN9TknWdLCcs35 PdOujX6BlMPaywHIm/zI+6berON3pqiW741i+5AVdjKyrVpmlmF/Ltps2sT/5pGqBscc K2nx5KcFxbZ6QRU2ehhb/g2ZXh7VPH12Gb5oVN2lGOYiKFLevm0YC0vaFOXMIerUJzZE WZWA== 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 hq38si2019045ejc.350.2021.04.09.06.10.51; Fri, 09 Apr 2021 06:10:51 -0700 (PDT) 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 1C2224068B; Fri, 9 Apr 2021 15:10:51 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by mails.dpdk.org (Postfix) with ESMTP id 065644014D; Fri, 9 Apr 2021 15:10:48 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C06EB201341; Fri, 9 Apr 2021 15:10:48 +0200 (CEST) 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 CB83E204602; Fri, 9 Apr 2021 15:10:46 +0200 (CEST) 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 E1C6C402C9; Fri, 9 Apr 2021 15:10:43 +0200 (CEST) From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: stable@dpdk.org, Apeksha Gupta Date: Fri, 9 Apr 2021 18:39:14 +0530 Message-Id: <20210409130914.13353-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210223061300.22719-1-hemant.agrawal@nxp.com> References: <20210223061300.22719-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2] l2fwd-crypto: fix 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. Fixes: 6ae3fb9df66e ("examples/l2fwd-crypto: fix session mempool size") Cc: stable@dpdk.org Signed-off-by: Apeksha Gupta --- examples/l2fwd-crypto/main.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 Acked-by: Akhil Goyal 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) {