DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/dpaa2: fix incorrect loop increment
@ 2019-04-25 13:34 Shreyansh Jain
  2019-04-25 13:34 ` Shreyansh Jain
  2019-04-25 15:49 ` Ferruh Yigit
  0 siblings, 2 replies; 4+ messages in thread
From: Shreyansh Jain @ 2019-04-25 13:34 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Shreyansh Jain, sunil.kori

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 <ferruh.yigit@intel.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH] net/dpaa2: fix incorrect loop increment
  2019-04-25 13:34 [dpdk-dev] [PATCH] net/dpaa2: fix incorrect loop increment Shreyansh Jain
@ 2019-04-25 13:34 ` Shreyansh Jain
  2019-04-25 15:49 ` Ferruh Yigit
  1 sibling, 0 replies; 4+ messages in thread
From: Shreyansh Jain @ 2019-04-25 13:34 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Shreyansh Jain, sunil.kori

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 <ferruh.yigit@intel.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] net/dpaa2: fix incorrect loop increment
  2019-04-25 13:34 [dpdk-dev] [PATCH] net/dpaa2: fix incorrect loop increment Shreyansh Jain
  2019-04-25 13:34 ` Shreyansh Jain
@ 2019-04-25 15:49 ` Ferruh Yigit
  2019-04-25 15:49   ` Ferruh Yigit
  1 sibling, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2019-04-25 15:49 UTC (permalink / raw)
  To: Shreyansh Jain, dev; +Cc: sunil.kori

On 4/25/2019 2:34 PM, Shreyansh Jain wrote:
> 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 <ferruh.yigit@intel.com>
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] net/dpaa2: fix incorrect loop increment
  2019-04-25 15:49 ` Ferruh Yigit
@ 2019-04-25 15:49   ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-04-25 15:49 UTC (permalink / raw)
  To: Shreyansh Jain, dev; +Cc: sunil.kori

On 4/25/2019 2:34 PM, Shreyansh Jain wrote:
> 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 <ferruh.yigit@intel.com>
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-25 15:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-25 13:34 [dpdk-dev] [PATCH] net/dpaa2: fix incorrect loop increment Shreyansh Jain
2019-04-25 13:34 ` Shreyansh Jain
2019-04-25 15:49 ` Ferruh Yigit
2019-04-25 15:49   ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).