From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 6BA75A05D3 for ; Thu, 25 Apr 2019 15:45:07 +0200 (CEST) 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" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190425133456.P4UhR5hYEeqzuHm3jv01s6M6c0W2SfBlvqVN-imaUIM@z> 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; } -- 2.17.1