From patchwork Thu Apr 25 13:34:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shreyansh Jain X-Patchwork-Id: 53083 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6A1271B59E; Thu, 25 Apr 2019 15:45:06 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id B93971B59B for ; Thu, 25 Apr 2019 15:45:05 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 544CA1A0238; Thu, 25 Apr 2019 15:45:05 +0200 (CEST) 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 2671B1A02A7; Thu, 25 Apr 2019 15:45:03 +0200 (CEST) Received: from GDB1.ap.freescale.net (GDB1.ap.freescale.net [10.232.132.179]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 2FED9402DD; Thu, 25 Apr 2019 21:44:59 +0800 (SGT) From: Shreyansh Jain To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Shreyansh Jain , sunil.kori@nxp.com Date: Thu, 25 Apr 2019 19:04:56 +0530 Message-Id: <20190425133456.23074-1-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] net/dpaa2: fix incorrect loop increment 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" Identified by LGTM, the loop was incorrectly incrementing a different variable and conditional on another. Fixes: fe2b986ac662 ("net/dpaa2: support generic flow") Cc: sunil.kori@nxp.com Suggested-by: Ferruh Yigit Signed-off-by: Shreyansh Jain --- drivers/net/dpaa2/dpaa2_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c index 98f68139b..9ef46d47e 100644 --- a/drivers/net/dpaa2/dpaa2_flow.c +++ b/drivers/net/dpaa2/dpaa2_flow.c @@ -1734,7 +1734,7 @@ dpaa2_dev_verify_patterns(struct dpaa2_dev_priv *dev_priv, /* more than DPKG_MAX_NUM_OF_EXTRACTS. Verify this limitation too. */ for (i = 0; pattern[i].type != RTE_FLOW_ITEM_TYPE_END; i++) { for (j = 0; j < MAX_TCS + 1; j++) { - for (k = 0; k < DPKG_MAX_NUM_OF_EXTRACTS; j++) { + for (k = 0; k < DPKG_MAX_NUM_OF_EXTRACTS; k++) { if (dev_priv->pattern[j].pattern_type[k] == pattern[i].type) break; }