diff mbox

[dpdk-dev] net/mlx5: fix invalid flow item check

Message ID 20180413150036.112498-1-xuemingl@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Shahaf Shuler
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Xueming Li April 13, 2018, 3 p.m. UTC
This patch fixed invalid flow item check.

Fixes: 4f1a88e3f9b0 ("net/mlx5: standardize on negative errno values")
Cc: nelio.laranjeiro@6wind.com

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Shahaf Shuler April 22, 2018, 9:19 a.m. UTC | #1
Friday, April 13, 2018 6:01 PM, Xueming Li:
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix invalid flow item check
> 
> This patch fixed invalid flow item check.
> 
> Fixes: 4f1a88e3f9b0 ("net/mlx5: standardize on negative errno values")
> Cc: nelio.laranjeiro@6wind.com
> 
> Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

Applied to next-net-mlx, thanks.
diff mbox

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index e6af3243d..a777cae43 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -817,8 +817,10 @@  mlx5_flow_convert_items_validate(const struct rte_flow_item items[],
 				break;
 			}
 		}
-		if (!token)
+		if (!token) {
+			ret = -ENOTSUP;
 			goto exit_item_not_supported;
+		}
 		cur_item = token;
 		ret = mlx5_flow_item_validate(items,
 					      (const uint8_t *)cur_item->mask,